$DSCALL OPT=FOPEN

Combines the ALLOC option for new or existing data sets and the OPEN option into one call.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=FOPEN
             DD=DD_name [ ID=path_name ]
             DSN=dataset_name
             FORMAT=dataset_format
             ORG=dataset_organization
             RLSE= { NO | YES }
             SPACE= { TRK | CYL } , pri ,sec [ ,dir ]
           [ BLKSIZE=blocksize ]
           [ DATACLS=class ]
           [ DISP= { KEEP | DELETE } [ , { KEEP | DELETE } ] ]
           [ DSNTYPE= { LIBRARY | PDSE } ]
           [ FREE= { UNAL | CLOSE } ]
           [ LRECL=logical_record_length ]
           [ MEMBER=member_name ]
           [ MGMTCLS=class ]
           [ MIGRATE= { YES | NO } ]
           [ MODE= { INPUT | OUTPUT } ]
           [ MOUNT= { NO | YES } ]
           [ STAT= {  NEW | OLD | MOD | SHR } ]
           [ STORCLS=class ]
           [ VOL=volser [ UNIT=unit ] ]

This call is used as a more simple interface than the combination of OPT=ALLOC and OPT=OPEN. It allows a single call to be made to allocate and open a new or existing cataloged data set.

Operands:

Return Codes:

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

Return Variables:

Example: OPT=FOPEN

EXEC $DSCALL OPT=FOPEN DSN=SYS.WORK.DEV01 MEMBER=TEST01 +
   STAT=OLD MODE=OUTPUT

Notes:

Only cataloged data sets are supported. Unit and volume parameters are not supported by this function.

Most non-VSAM data sets are allocated. IS and DA data sets are not supported. If MEMBER= was specified, the member is opened. If the allocation was for a sequential data set, the data set is opened.


Copyright © 2009 CA. All rights reserved.