Previous Topic: $PSCALL OPT=MODIFY

Next Topic: $PSCALL OPT=PUT


$PSCALL OPT=OPEN

Opens a print request.

&CONTROL SHRVARS=($PS)

To open a print request for a printer that is defined to PSM:

-EXEC $PSCALL   OPT=OPEN
                DEST=PSM
              [ PRINTER=printer name ]
              [ USERID=userid ]
              [ JESCLASS=class ]
              [ VTAMLOG=logmode ]
              [ FORM=form name ]
              [ SETUP=setup name ]
              [ LOWCASE={ YES | NO } ]
              [ LINES=n ]
              [ COLS=n ]
              [ BANNER={ *DEFAULT | *NONE | proc name } ]
              [ JESFORM=JES Form name ]
              [ JESFCB=JES FCB name ]
              [ JESUCS=JES UCS code ]
              [ JESPGM=JES PGM name ]
              [ EXITDATA=c ]
              [ COPIES=n ]
              [ PRTY=n ]
              [ HOLD={ YES | NO } ]
              [ KEEP={ YES | NO } ]

To open a print request for a printer that is not defined to PSM and is a JES printer:

-EXEC $PSCALL   OPT=OPEN
                DEST=JES
              [ JESDEST=destid.userid ]
              [ JESCLASS=class ]
              [ FORM=form name ]
              [ SETUP=setup name ]
              [ LOWCASE={YES | NO } ]
              [ LINES=n ]
              [ COLS=n ]
              [ BANNER={ *DEFAULT | *NONE | proc name } ]
              [ JESFORM=JES Form name ]
              [ JESFCB=JES FCB name ]
              [ JESUCS=JES UCS code ]
              [ JESPGM=JES PGM name ]
              [ COPIES=n ]
              [ PRTY=n ]
              [ HOLD={YES | NO} ]
              [ KEEP={YES | NO} ]

To open a print request for a printer that is not defined to PSM and is a VTAM printer:

-EXEC $PSCALL   OPT=OPEN
                DEST=VTAM
                VTAMLU=luname
              [ VTAMLOG=logmode ]
              [ FORM=form name ]
              [ SETUP=setup name ]
              [ LOWCASE={ YES | NO } ]
              [ LINES=n ]
              [ COLS=n ]
              [ BANNER={ *DEFAULT | *NONE | proc name } ]
              [ COPIES=n ]
              [ PRTY=n ]
              [ HOLD={YES | NO} ]
              [ KEEP={YES | NO} ]

Allocates a print request number and opens it. You can then add output to the request using the PUT option.

Operands:

OPT=OPEN

Specifies that a print request is to be opened.

DEST={ PSM | JES | VTAM }

Specifies the type of output destination.

PSM

Indicates the printer is defined to PSM.

JES

Indicates the printer is not defined to PSM and is a JES printer.

VTAM

Indicates the printer is not defined to PSM and is a VTAM printer.

PRINTER=printer name

Specifies the name of the printer on which the request is to be printed.

USERID=userid

Specifies the user ID that is to be the owner of the print request. If not specified, the user ID set in the &USERID system variable will be the owner of the request. If the DEST operand is set to PSM and the PRINTER operand is not specified, this operand specifies the user ID whose default printer is the printer on which the request is to be printed. If a user ID is not specified, the default printer for the user ID set in the &USERID system variable is used.

JESDEST=destid.userid

Specifies the JES2 or JES3 remote destination of the printer on which the request is to be printed. destid is the remote destination name and userid is the remote user ID. userid is optional but, if specified, destid must also be specified.

JESCLASS=class

Specifies the JES2 or JES3 output class. If the DEST operand is set to JES and an output class is not specified, the output class defined in the defaults definition is used. If DEST is set to PSM, this class, if specified, is used instead of that defined in the printer definition.

VTAMLU=luname

Specifies the VTAM defined network name of the printer on which the request is to be printed.

VTAMLOG=logmode

Specifies the name of an entry in the LU's logmode table which is to be used for the session. If the DEST operand is set to VTAM and a logmode is not specified, the LU's default logmode entry is used. If DEST is set to PSM, this logmode, if specified, is used instead of that defined in the printer definition.

FORM=form name

Specifies the name of the form definition to be used. If the DEST operand is set to JES or VTAM, the default is that defined in the defaults definition. If DEST is set to PSM, this form name, if specified, is used instead of that defined in the printer definition.

SETUP=setup name

Specifies the name of the setup definition to be used. This setup name is used instead of that defined in the form definition.

LOWCASE={ YES | NO }

Specifies whether the printer supports lower case characters. If the DEST operand is set to PSM, the value of this operand is used instead of that defined in the printer definition. If DEST is set to JES or VTAM, the default is that defined in the defaults definition.

LINES=n

Specifies the maximum number of lines to be printed per page. The range is 0 to 999. If there is no limit to the number of lines per page (that is, the paper is continuous), 0 must be specified. If the DEST operand is set to PSM, the value of this operand is used instead of that defined in the form definition. If the DEST operand is set to JES or VTAM, the default is that defined in the defaults definition.

COLS=n

Specifies the maximum number of columns to be printed per page. The range is 1 to 256. If the DEST operand is set to PSM, the value of this operand is used instead of that defined in the form definition. If the DEST operand is set to JES or VTAM, the default is that defined in the defaults definition.

BANNER={ *DEFAULT | *NONE | proc name }

Specify *DEFAULT if the default banner page is to be printed, *NONE if no banner page is to be printed, or the name of an NCL procedure which is to be executed as a banner exit. If the DEST operand is set to PSM, the value of this operand is used instead of that defined in the form definition. If the DEST operand is set to JES or VTAM, the default is that defined in the defaults definition. The banner exit is described in the following pages of this chapter.

JESFORM=JES form name

Specifies the name of a JES form that is to be used when processing the SYSOUT data set. It the DEST operand is set to PSM, this JES form name is used instead of that defined in the form definition. This operand is ignored if the printer specified is not a JES printer.

JESFCB=JES FCB name

Specifies the name of a JES FCB (forms control buffer) that is to be used when processing the SYSOUT data set. If the DEST operand is set to PSM, this JES FCB name is used instead of that defined in the form definition. This operand is ignored if the printer specified is not a JES printer.

JESUCS=JES UCS code

Specifies the JES UCS (universal character set) code to be associated with the SYSOUT data set. If the DEST operand is set to PSM, this JES UCS code is used instead of that defined in the form definition. This operand is ignored if the printer specified is not a JES printer.

JESPGM=JES PGM name

Specifies the JES PGM (program) name to be associated with the SYSOUT data set. If the DEST operand is set to PSM, this JES PGM name is used instead of that defined in the form definition. This operand is ignored if the printer specified is not a JES printer.

EXITDATA=c

Specifies exit data that is to be passed to the printer exit NCL procedure instead of that defined in the printer definition. Exit data is from 1 to 120 characters long and must be quoted if it contains imbedded blanks. This operand is ignored if the DEST operand is set to JES or VTAM.

COPIES=n

Specifies the number of copies to be printed. The range is 1 to 255; the default is 1.

PRTY=n

Specifies a priority for the print request. The range is 1 to 99. The highest priority is 1 and the lowest is 99; the default is 50. Print requests for a printer will be printed in priority order starting with priority 1.

HOLD={ YES | NO }

Specifies whether the print request is to be assigned a status of HELD when closed (that is, will not be printed until released). The default is NO.

KEEP={ YES | NO }

Specifies whether the print request is to be kept after being printed. The default is NO.

Return Codes:

&RETCODE = 0

$PSCALL completed successfully. &$PSREQ# is set to the 4-digit request number allocated by the system.

&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

6

Form not defined

10

Setup not defined

14

Default printer not defined for specified user ID

20

JES printing not supported on operating system

&RETCODE = 8

An error occurred. &SYSMSG is set to an error message.

Example: OPT=OPEN

&CONTROL SHRVARS=($PS) 
-EXEC $PSCALL OPT=OPEN DEST=PSM PRINTER=FLOOR5
&CONTROL SHRVARS=($PS)
-EXEC $PSCALL OPT=OPEN DEST=JES JESDEST=RMT15 JESCLASS=F +
       LOWCASE=NO LINES=60 COLS=80
&CONTROL SHRVARS=($PS)
-EXEC $PSCALL OPT=OPEN DEST=PSM USERID=USER01 COPIES=2 +
       PRTY=3
&CONTROL SHRVARS=($PS)
-EXEC $PSCALL OPT=OPEN DEST=VTAM VTAMLU=PLUA01 HOLD=YES