Combines the deallocating and closing data set functions into a single call.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=FCLOSE
{ DD=DD_name | ID=path_name }
DISP={ KEEP | DELETE }
This call is used as a more simple interface than the combination of OPT=CLOSE and OPT=UNALL. It allows a single call to close and deallocate a data set.
Operands:
Specifies that a data set is to be closed and deallocated.
Specifies the ddname to be closed and deallocated.
Specifies the path name that allows multiple paths to the same data set. If no path ID is specified, the ddname is used as the path ID.
You must specify a ddname. If the ddname specified is other than ID, you also need to specify the ID parameter; otherwise you do not.
Note: Any combination of OPEN, FOPEN, CLOSE, FCLOSE, READ, and WRITE requests must be done in a single procedure.
Specifies the override of the Normal Disposition that was specified when the data set was allocated to your product region.
Note: If the data set name was generated by the system, then it is deleted, regardless of the disposition specified.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Return Variables:
DYNALLOC error code
DYNALLOC information code
Example: OPT=FCLOSE
EXEC $DSCALL OPT=FCLOSE DD=&Q$DD
Notes:
For an OUTPUT data set, the final block is written. This may cause an ABEND message if the data set exceeds its size limit.
A temporary data set, whose name was generated at allocation, is deleted when it is deallocated-regardless of the disposition value that was specified.
If a concatenated data set is freed, the first data set in the concatenation is deallocated and the other ddnames in the concatenation become visible. The net effect is the same as a deconcatenation followed by a deallocation of the first ddname in the concatenation.