Previous Topic: $PSCALL OPT=HOLD

Next Topic: $PSCALL OPT=MODIFY


$PSCALL OPT=INFO

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:

OPT=INFO

Specifies that definition information is to be returned.

INFO={ PRINTER | FORM | SETUP | USER }

Specifies the type of information to be returned.

PRINTER

Returns information from a printer definition.

FORM

Returns information from a form definition.

SETUP

Returns information from a setup definition.

USER

Returns the name of the user's default printer.

PRINTER={ printer name | prefix? | ? }

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.

TYPE={ JES | VTAM | EXIT | ALIAS }

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.

FORM={ form name | prefix?| ? }

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.

SETUP={ setup name | prefix? | ? }

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.

USERID=userid

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:

&RETCODE = 0

$PSCALL completed successfully. The variables returned are as follows:

&$PSPRTNAME

Printer name.

&$PSPRTRNAME

Name of the printer for which the printer is an alias, if the printer type is ALIAS.

&$PSPRTTYPE

Printer type: JES, VTAM, EXIT or ALIAS.

&$PSPRTRTYPE

Printer type of the printer for which the printer is an alias, if the printer type is ALIAS.

&$PSPRTCASE

Lower case flag: YES or NO.

&$PSPRTDESC

Description of the printer.

&$PSPRTLLIMIT

Line limit.

&$PSPRTDEST

JES remote destination name if the printer type is JES.

&$PSPRTCLASS

JES output class if the printer type is JES.

&$PSPRTLUNAME

VTAM defined network name for the printer if the printer type is VTAM.

&$PSPRTEXIT

Name of a printer exit if the printer type is EXIT.

&$PSPRTEXDATA

Printer exit data if the printer type is EXIT.

&$PSPRTLOGMOD

Name of an entry in the logmode table if the printer type is VTAM.

&$PSFORMNAME

Form name.

&$PSFORMDESC

Description of the form.

&$PSFORMLINES

Maximum number of lines to be printed per page.

&$PSFORMCOLS

Maximum number of columns to be printed per page.

&$PSFORMBANR

The banner page flag (*DEFAULT or *NONE), or the name of a banner exit NCL procedure.

&$PSSETUPNAME

Setup name.

&$PSSETUPDESC

Description of the setup.

&RETCODE = 4

$PSCALL completed successfully. The request was denied. &SYSMSG is set to an error message and &$PSFDBK is set to one of the following values:

2

Printer not defined

4

No printers defined with the specified prefix and/or type

5

Printer not selected from Printer List

6

Form not defined

8

No forms defined with the specified prefix

9

Form not selected from Form List

10

Setup not defined

12

No setups defined with the specified prefix

13

Setup not selected from Setup List

14

Default printer not defined for specified user ID

&RETCODE = 8

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.