Previous Topic: $DSCALL OPT=ALLOC STAT=NEW

Next Topic: $DSCALL OPT=ALLOCINFO


$DSCALL OPT=ALLOC SYSOUT=class

Allocates a SYSOUT data set.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=ALLOC
             SYSOUT=class
           [ BLKSIZE=blocksize ]
           [ COPIES=copies ]
           [ DD=DD_name ]
           [ DESTID=destination_ID ]
           [ FCB=fcb ]
           [ FOLD= { NO | YES } ]
           [ FORMAT=dataset_format ]
           [ FREE= { UNAL | CLOSE } ]
           [ HOLD= { NO | YES } ]
           [ LRECL=logical_record_length ]
           [ PGM=program_name ]
           [ UCS=ucs ]
           [ USERID=user_ID ]

This call is used to allocate a SYSOUT data set to your product region. The data set remains allocated to your product region until it is explicitly deallocated, until a CLOSE is requested if allocated with FREE=CLOSE, or until your product region terminates.

Operands:

OPT=ALLOC

Specifies that a data set is to be allocated.

SYSOUT=class

Specifies the SYSOUT data set class. The value must be a single alphabetic character which represents a valid SYSOUT class in the system in which your product region is executing.

BLKSIZE=blocksize

Specifies the block size for the data set. The value must be an integer in the range 1 to 32,760.

COPIES=copies

Specifies the number of SYSOUT copies. The value must be an integer in the range 1 to 255. If the operand is not specified, one copy is produced.

DD=DD_name

Specifies the ddname for the allocation. If this operand is omitted, a ddname is generated by the operating system.

DESTID=destination_ID

Specifies the Remote Workstation Identifier of the workstation to which the data set is to be routed. The value must be 1 to 8 characters.

FCB=fcb

Specifies the SYSOUT Forms Control Block (FCB) Image Identifier. The value must be 1 to 4 characters.

FOLD={ NO | YES }

Specifies the SYSOUT fold option.

FORMAT=dataset_format

Specifies the data set format. Valid values are: F, FB, FS, FBS, FA, FBA, FSA, FBSA, FM, FBM, FSM, FBSM, V, VB, VS, VBS, VBSA, VM VBM, VSM, VBSM, U, UA, UM.

FREE={ UNAL | CLOSE }

Specifies whether the data set is to be deallocated by explicit request only (FREE=UNAL) or is to be deallocated when the file is closed (FREE=CLOSE).

HOLD={ NO | YES }

Specifies the SYSOUT hold option.

LRECL=logical_record_length

Specifies the logical record length for the data set. The value must be an integer in the range 1 to 32,760.

PGM=program_name

Specifies the SYSOUT program name. The value must be a 1- to 8-character name that conforms to PDS member naming conventions. See the notes on $DSCALL OPT=ALLOC.

UCS=ucs

Specifies the SYSOUT Universal Character Set name. The value must be 1 to 4 characters.

USERID=user_ID

Specifies the user ID of the user at the remote workstation who will receive the data set.

Return Codes:

$DSRC

$DSFDBK

Meaning

0

0

Data set was allocated; allocation details available in &$DS* variables as described below.

0

non-zero

Data set was allocated; however, allocation details are incomplete.

4

non-zero

Data set was not allocated.

8

non-zero

A Dataset Services Interface error has occurred and the function is incomplete. This is typically an application program specification error. The error is indicated in &SYSMSG with message number DSnnnn.

Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.

Return Variables:

&$DSRECF

Record format; values are F, FB, FS, FBS, FA, FBA, FSA, FBSA, FM, FBM, FSM, FBSM, V, VB, VS, VBS, VBSA, VM, VBM, VSM, VBSM, U, UA, UM

&$DSRECL

Record length

&$DSRECA

Actual usable record length. If the record format is variable length, then the value is record length minus 4. In all other cases, the value is the same as record length.

&$DSBLKS

Block size

&$DSDDNAME

DDname from the allocation, as supplied or as generated by the operating system

&$DSDYNEC

DYNALLOC error code

&$DSDYNIC

DYNALLOC information code

Examples: SYSOUT=class

EXEC $DSCALL OPT=ALLOC +
   SYSOUT=X BLKSIZE=121 LRECL=121 FORMAT=FBA

Note: If PGM=INTRDR is specified, the SYSOUT file is used to submit JCL for execution; however, it is recommended that the $DSCALL OPT=SUBMIT function is used.

More information:

$DSCALL OPT=ALLOC