Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
Example-PLI Using SYS$GETUAI To Get Quota Information
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT: PLI V3.2     OP/SYS: VMS V5.0


SOURCE:     Digital Customer Support Center


OVERVIEW:

This program demonstrates how to call the system service SYS$GETUAI
to retrieve certain quotas for a particular user.


CAUTION:  This sample program has been tested using:
    PRODUCT: PLI V3.2 on OPERATING SYSTEM: VMS V5.0
However, we cannot guarantee its effectiveness because of the
possibility of errors in transmitting or implementing it.  It is meant
to be used as a template for writing your own program, and it may
require modification for use on your system.


PROGRAM NOTES:

Use the following list to determine the privileges required to use the
$GETUAI service:

- BYPASS or SYSPRV to allow access to any record in the UAF
- GRPRV to allow access to any record in the UAF file whose UIC matches
   that of the requestor
- No privilege required to access a UAF record whose UIC matches
   that of the requestor


PROGRAM SAMPLE:

GETUAI: procedure options(main);

%include SYS$GETUAI;
%include $ssdef;
%include $stsdef;
%include $uaidef;

dcl 1 item_list,
      2 part1,
        3 buffer_length1            fixed binary(15) initial(2),
        3 item_code1                fixed binary(15) initial(uai$_astlm),
        3 buffer_address1           pointer,
        3 return_length_address1    pointer,
      2 part2,
        3 buffer_length2            fixed binary(15) initial(2),
        3 item_code2                fixed binary(15) initial(uai$_biolm),
        3 buffer_address2           pointer,
        3 return_length_address2    pointer,
      2 part3,
        3 buffer_length3            fixed binary(15) initial(4),
        3 item_code3                fixed binary(15) initial(uai$_bytlm),
        3 buffer_address3           pointer,
        3 return_length_address3    pointer,
      2 part4,
        3 buffer_length4            fixed binary(15) initial(2),
        3 item_code4                fixed binary(15) initial(uai$_diolm),
        3 buffer_address4           pointer,
        3 return_length_address4    pointer,
      2 part5,
        3 buffer_length5            fixed binary(15) initial(2),
        3 item_code5                fixed binary(15) initial(uai$_enqlm),
        3 buffer_address5           pointer,
        3 return_length_address5    pointer,
      2 part6,
        3 buffer_length6            fixed binary(15) initial(2),
        3 item_code6                fixed binary(15) initial(uai$_fillm),
        3 buffer_address6           pointer,
        3 return_length_address6    pointer,
      2 part7,
        3 buffer_length7            fixed binary(15) initial(4),
        3 item_code7                fixed binary(15) initial(uai$_pgflquota),
        3 buffer_address7           pointer,
        3 return_length_address7    pointer,
      2 part8,
        3 buffer_length8            fixed binary(15) initial(2),
        3 item_code8                fixed binary(15) initial(uai$_shrfillm),
        3 buffer_address8           pointer,
        3 return_length_address8    pointer,
      2 part9,
        3 buffer_length9            fixed binary(15) initial(4),
        3 item_code9                fixed binary(15) initial(uai$_wsextent),
        3 buffer_address9           pointer,
        3 return_length_address9    pointer,
      2 part10,
        3 buffer_length10           fixed binary(15) initial(4),
        3 item_code10               fixed binary(15) initial(uai$_wsquota),
        3 buffer_address10          pointer,
        3 return_length_address10   pointer,
      2 terminator                  fixed binary(31) initial(0);
dcl username                        char(12) init(' ');
dcl astlm                           fixed bin(15);
dcl astlmlen                        fixed bin(15);
dcl biolm                           fixed bin(15);
dcl biolmlen                        fixed bin(15);
dcl bytlm                           fixed bin(31);
dcl bytlmlen                        fixed bin(15);
dcl diolm                           fixed bin(15);
dcl diolmlen                        fixed bin(15);
dcl enqlm                           fixed bin(15);
dcl enqlmlen                        fixed bin(15);
dcl fillm                           fixed bin(15);
dcl fillmlen                        fixed bin(15);
dcl pgflquota                       fixed bin(31);
dcl pgflquotalen                    fixed bin(15);
dcl shrfillm                        fixed bin(15);
dcl shrfillmlen                     fixed bin(15);
dcl wsextent                        fixed bin(31);
dcl wsextentlen                     fixed bin(15);
dcl wsquota                         fixed bin(31);
dcl wsquotalen                      fixed bin(31);

buffer_address1 = addr(astlm);
return_length_address1 = addr(astlmlen);
buffer_address2 = addr(biolm);
return_length_address2 = addr(biolmlen);
buffer_address3 = addr(bytlm);
return_length_address3 = addr(bytlmlen);
buffer_address4 = addr(diolm);
return_length_address4 = addr(diolmlen);
buffer_address5 = addr(enqlm);
return_length_address5 = addr(enqlmlen);
buffer_address6 = addr(fillm);
return_length_address6 = addr(fillmlen);
buffer_address7 = addr(pgflquota);
return_length_address7 = addr(pgflquotalen);
buffer_address8 = addr(shrfillm);
return_length_address8 = addr(shrfillmlen);
buffer_address9 = addr(wsextent);
return_length_address9 = addr(wsextentlen);
buffer_address10 = addr(wsquota);
return_length_address10 = addr(wsquotalen);

put skip list('Enter the Username for which quotas will be returned: ');
get list(username);

STS$VALUE = SYS$GETUAI(,,username,item_list,,,);
if ^STS$SUCCESS
    then signal vaxcondition(sts$value);

put skip list('ASTLM:     ',astlm);
put skip list('BIOLM:     ',biolm);
put skip list('BYTLM:     ',bytlm);
put skip list('DIOLM:     ',diolm);
put skip list('ENQLM:     ',enqlm);
put skip list('FILLM:     ',fillm);
put skip list('PGFLQUOTA: ',pgflquota);
put skip list('SHRFILLM:  ',shrfillm);
put skip list('WSEXTENT:  ',wsextent);
put skip list('WSQUOTA:   ',wsquota);

put skip file(sysprint) list ('***PROCESSING COMPLETE***');
end GETUAI;



buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms