Previous Topic: $DSCALL OPT=CATLIST

Next Topic: $DSCALL OPT=COMPRESS


$DSCALL OPT=CLOSE

Closes an open data set.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL    OPT=CLOSE 
                { DD=DD_name | ID=path_name }

Use this function to close an open data set.

Operands:

OPT=CLOSE

Specifies that a close action be performed.

DD=DD_name

Specifies the ddname of the data set to close. This operand is used if the path ID is not provided.

ID=path_name

Specifies the path ID of the data set to close.

Return Codes:

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

Example: OPT=CLOSE

EXEC $DSCALL OPT=CLOSE DD=SYSDD

Note: For an OUTPUT data set, the final block is written. This may cause an ABEND message if the data set exceeds its size limit.