Previous Topic: $DSCALL OPT=FOPEN

Next Topic: $DSCALL OPT= LISTC


$DSCALL OPT=INFO

Retrieves data set information.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=INFO 
             DSN=dataset_name [ DD=DD_name ] 
           [ MOUNT= { NO | YES } ] 
           [ MIGRATE= { YES | NO } ]

This call is used to obtain data set information for a data set. The information is returned to the calling procedure in variables.

Operands:

OPT=INFO

Specifies the data set information that is to be returned.

DSN=dataset_name

The name of the data set for which information is to be retrieved.

DD=DD_name

Specifies the ddname of a data set allocated to your product region for which information is to be retrieved.

MOUNT={ NO | YES }

Specifies whether a volume mount is allowed. If MOUNT=NO is specified, and an allocation request requires a volume which is off-line, the allocation request fails. If MOUNT=YES is specified and an allocation request requires a volume which is off-line, a MOUNT request for the volume is issued. You cannot use this operand if DD= is specified.

MIGRATE={ YES | NO }

Specifies whether to allocate a data set if it has been migrated. If MIGRATE=NO is specified, Dataset Services checks that the data set has been migrated (for example, by DFHSM). If the data set has been migrated, Dataset Services rejects the allocation request. If MIGRATE=YES is specified, Dataset Services issues the allocation request without checking that the data set has been migrated.

Note: If you specify a ddname, the MIGRATE and MOUNT parameters are ignored.

Return Codes:

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

Return Variables:

&$DSSTAT

Status of data set; values is OLD, MOD, SHR, or NEW

&$DSDSN

Full data set name with member name omitted, and true name if an alias was entered

&$DSDSNTYPE

Type of file or data set; value is HFS or LIBRARY

&$DSMEM

Member name if a member of a PDS

&$DSORG

Data set organization; values are PS, PO, PSU, POU, CX, CQ, MQ, GS, TX, TQ, TR, and VS

&$DSVOL

First volume &$DSUNIT Unit name for the volume

&$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

&$DSNUMEXT

Number of extents

&$DSCDATE

Create date

&$DSEDATE

Expire date

&$DSLREF

Last referenced date

&$DSTPCYL

Tracks per cylinder

&$DSPRITRKS

Primary allocation in tracks

&$DSALCTRKS

Allocated tracks for data set

&$DSUSETRKS

Used tracks

&$DSSECQTY

Secondary space allocation

Examples: OPT=INFO

EXEC $DSCALL OPT=INFO DSN=SYS1.LINKLIB MOUNT=YES

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