$DSCALL OPT=ENQ

Performs an ENQ on a data set or member.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL    OPT=ENQ
                { DSN=dataset_name | DD=DD_name } 
                [ MEMBER=member_name ]

This call is used to serialize access to a data set or member of a PDS in the same way ISPF does. It is used to prevent another user editing the data set or member while it is being used by your product region.

Operands:

Return Codes:

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

Example: OPT=ENQ

EXEC $DSCALL  DD=DDSYS1

Note: Issue an ENQ before opening a data set when you intend to update the data set. The ENQ option does not protect the data set from simultaneous physical writing, however an internal ENQ is issued on the OPEN to protect the physical data set. If the ENQ function is not explicitly released, it is released when the owning NCL process terminates.


Copyright © 2009 CA. All rights reserved.