Returns printer, form or setup information. Optionally, presents a list of printers, forms, or setups from which a selection is made.
&CONTROL SHRVARS=($PS)
-EXEC $PSCALL OPT=INFO
INFO=PRINTER
PRINTER={ printer name | prefix? | ? }
[ TYPE={ JES | VTAM | EXIT | ALIAS } ]
-EXEC $PSCALL OPT=INFO
INFO=FORM
FORM={ form name | prefix? | ? }
-EXEC $PSCALL OPT=INFO
INFO=SETUP
SETUP={ setup name | prefix? | ? }
-EXEC $PSCALL OPT=INFO
INFO=USER
[ USERID=userid ]
Validates a printer, form or setup name entered on a panel, or provides a list of valid values for a printer, form or setup field, from which a selection is made. This option also enables you to determine the name of a user's default printer. The information returned regarding the printer, form, or setup, could be used to determine how to format the output for a print request.
Operands:
Specifies that definition information is to be returned.
Specifies the type of information to be returned.
Returns information from a printer definition.
Returns information from a form definition.
Returns information from a setup definition.
Returns the name of the user's default printer.
Specifies the name of the printer. If a prefix followed by a question mark is specified, a Printer List is presented from which a selection is made. The list will contain all printers with names starting with the specified prefix. If a question mark is specified, a Printer List containing all the defined printers is presented.
Specifies the type of printers to be displayed in the Printer List. This operand is ignored if the PRINTER operand is not set to a question mark, or a prefix followed by a question mark.
Specifies the name of the form. If a prefix followed by a question mark is specified, a Form List is presented from which a selection is made. This list will contain all forms with names starting with the specified prefix. If a question mark is specified, a Form List containing all the defined forms is presented.
Specifies the name of the setup. If a prefix followed by a question mark is specified, a Setup List is presented from which a selection is made. This list will contain all setups with names starting with the specified prefix. If a question mark is specified, a Setup List containing all the defined setups is presented.
Specifies the user ID for which the default printer is to be returned. If the INFO operand is set to USER and USERID is not specified, the default printer for the user ID set in the system variable &USERID, is returned.
Return Codes:
$PSCALL completed successfully. The variables returned are as follows:
Printer name.
Name of the printer for which the printer is an alias, if the printer type is ALIAS.
Printer type: JES, VTAM, EXIT or ALIAS.
Printer type of the printer for which the printer is an alias, if the printer type is ALIAS.
Lower case flag: YES or NO.
Description of the printer.
Line limit.
JES remote destination name if the printer type is JES.
JES output class if the printer type is JES.
VTAM defined network name for the printer if the printer type is VTAM.
Name of a printer exit if the printer type is EXIT.
Printer exit data if the printer type is EXIT.
Name of an entry in the logmode table if the printer type is VTAM.
Form name.
Description of the form.
Maximum number of lines to be printed per page.
Maximum number of columns to be printed per page.
The banner page flag (*DEFAULT or *NONE), or the name of a banner exit NCL procedure.
Setup name.
Description of the setup.
$PSCALL completed successfully. The request was denied. &SYSMSG is set to an error message and &$PSFDBK is set to one of the following values:
Printer not defined
No printers defined with the specified prefix and/or type
Printer not selected from Printer List
Form not defined
No forms defined with the specified prefix
Form not selected from Form List
Setup not defined
No setups defined with the specified prefix
Setup not selected from Setup List
Default printer not defined for specified user ID
An error occurred. &SYSMSG is set to an error message.
Examples: OPT=INFO
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=PRINTER PRINTER=?
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=PRINTER PRINTER=FLOOR5
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=PRINTER TYPE=JES PRINTER=?
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=FORM FORM=AREA1?
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=SETUP SETUP=TPAPER
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=USER USERID=USER01
&CONTROL SHRVARS=($PS) -EXEC $PSCALL OPT=INFO INFO=USER
Notes:
When the INFO operand is set to USER or PRINTER, all of the variables returned for return code 0 are set. When INFO is set to FORM, only the variables starting with the characters $PSFORM and $PSSETUP are set and the others are null. When INFO is set to SETUP, only the variables starting with the characters $PSSETUP are set and the others are null.
When variable &$PSPRTTYPE is set to JES, EXIT or VTAM, variables &$PSPRTRNAME and &$PSPRTRTYPE are null.
| Copyright © 2009 CA. All rights reserved. |
|