ISGENQ conditional and unconditional requests

The ISGENQ macro uses the COND keyword to determine if a request is conditional or unconditional. The COND keyword is set to either YES or NO. No is the default.

Use the following descriptions to guide your ISGENQ conditional requests.

Use REQUEST(OBTAIN) TEST(YES) to test the status of the corresponding qname, rname, and scope combination. When you specify TEST(YES) on the OBTAIN request an answer area is mapped in ISGYENQ. The answer area can provide detailed information about the RNL and global resource serialization exit processing. When you use an answer area you must also indicate the length of the answer area through the ANSLEN keyword. Additionally, if a request already exists from the same task that matches the specified resource, the ENQ token of that request will be returned.

Note: See ISGQUERY SEARCH=BY_ENQTOKEN to obtain information on a specific outstanding ENQ request. ISGQUERY and ISGENQ can be found in z/OS MVS Programming: Assembler Services Reference IAR-XCT.

Use REQUEST(OBTAIN) TEST(NO) CONTENTIONACT(FAIL) if you want your task to receive control of the resource only if the resource is immediately available. If the resource is not immediately available, no entry will be made on the list and the task will not be made to wait. This request is useful when there is other processing that can be done without using the resource. For example, by issuing a preliminary ISGENQ with CONTENTIONACT(FAIL) in an interactive task, you can attempt to gain control of a needed resource without locking your terminal session. If the resource is not available, you can do other work rather than enter a long wait for the resource.

Use REQUEST(OBTAIN) TEST(NO) CONTENTIONACT(WAIT) to specify a conditional request for control of a resource when you do not know whether you have already requested control of that resource. If the resource is owned by another task, you will be put in a wait condition until the resource becomes available.

Use REQUEST(CHANGE) to change a previous request from shared to exclusive control.