Thanks Mars looks like a good starting point.



I have a program to check the enqueues for a dataset in ISPF:

         LA    R10,RNAMELEN
         ISGQUERY ANSAREA=ANSWER,ANSLEN=ANSLEN,                        X
               GATHERFROM=SYSPLEX,ANSDETAIL=FULL,                      X
               SEARCH=BY_FILTER,SCANACTION=START,SCOPE=SYSPLEX,        X
               REQINFO=QSCAN,RESUMETOKEN=RESUMETK,                     X
               RNAME=RNAME,QNAME=SYSDSN,RNAMELEN=(R10),                X
               RNAMEMATCH=PATTERN,RETCODE=RETCODE,                     X
               QNAMEMATCH=SPECIFIC,RSNCODE=RSNCODE
*
         LA    R6,ANSWER                 Address returned area R6
         USING ISGYQUAAHDR,R6            Map the header
*
*
ISGLOOP0 L     R3,ISGYQUAAHDRFIRSTRECORD31      Address first record
         L     R4,ISGYQUAAHDRNUMRECORDS         Address the count
ISGLOOP  EQU   *
         USING ISGYQUAARS,R3                  Map the next Resource Rec
         TM    ISGYQUAARSFLAGS1,ISGYQUAARSRQSOMITTED    Any dropped?
         BNO   ISGLOOP1                                 No, branch
*
* Requester area too small
*
ISGLOOP1 EQU   *
         L     R5,ISGYQUAARSFIRSTRQ31         Address first requester
         L     R6,ISGYQUAARSNUMRQ             Address count
ISGLOOP2 EQU   *
         USING ISGYQUAARQ,R5                  Map Requester area
         MVC   ENQTYPE,=CL4'SHR '
         TM    ISGYQUAARQFLAGS1,ISGYQUAARQCONTROL  Is the ENQ=SHR?
         BO    ISGLOOP3                            Yes branch
         MVC   ENQTYPE,=CL4'EXC '
ISGLOOP3 TM    ISGYQUAARQFLAGS1,ISGYQUAARQOWNER    Is this the OWNER?
         BNO   ISGLOOP4                            No branch
         MVC   ENQOWNR,=CL6'USING '
         B     ISGLOOP5                            Branch
ISGLOOP4 EQU   *
         TM    ISGYQUAARQFLAGS1,ISGYQUAARQMATU   Is Requester using it?
         BO    ISGLOOP5                          Yes branch
         MVC   ENQOWNR,=CL6'WAIT  '
ISGLOOP5 DS    0H
*                            Is Requester Data Record Extension valid?
         TM    ISGYQUAARQFLAGS2,ISGYQUAARQRQXVALID
         BNO   ISGLOOP9                          No branch
         L     R7,ISGYQUAARQRQX31                Address the area
         USING ISGYQUAARQX,R7                    Map the extension area
         MVC   OUTREC+47(2),ISGYQUAARQXSYSNAME   Put in the system
         MVC   OUTREC+51(8),ISGYQUAARQXJOBNAME   Put in the jobname
         MVC   OUTREC+61(3),ENQTYPE              Put in the ENQ type
         MVC   OUTREC+66(5),ENQOWNR              Put in the OWNER field
         DROP  R7
ISGLOOP  DS    0H

Thanks,
Mark.

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of esst...@juno.com
Sent: 13 February 2016 16:56
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Would ISGQUERY be the proper macro/service

.
I have a Started Task (STC), and sometimes a batch job will hold a VSAM dataset 
needed by this STC. This prevents the STC from properly re-opening the dataset.
.
Share Options are 2,3 and Transactional VSAM (RLS) is not an option.
.
.
Im looking for a macro or callable service that will allow the Started Task to 
identify the name of the batch job that has opened a VSAM dataset which the 
Started Task needs.
.
.
I started reading the description of the ISGQUERY and its various Mapping 
Macros but i dont see where it would returns the name of a batch job that has 
allocated a VSAM dataset. I suspect I would use GATHERFROM=SYSTEM  with 
SCOPE=SYSTEM, since the batch processing occurs on the same LPAR as the Started 
Task.

Is ISGQUERY the proper macro/service to accomplish this ?
.
Would someone provide some sample code and point me to the proper macro/service 
to invoke.
.
.
The Started Task happens to be a CICS Address Space and we would use a CICS 
Supplied Open Exit to drive this.
.
.
Paul D'Angelo
*************
*************
This message is private and confidential and may also be legally privileged. If 
you have received this message in error, please email it back to the sender and 
immediately permanently delete it from your computer system. Please do not 
read, print, re-transmit, store or act in reliance on it or any attachments. 
British Airways may monitor email traffic data and also the content of emails, 
where permitted by law, for the purposes of security and staff training and in 
order to prevent or detect unauthorised use of the British Airways email 
system. Virus checking of emails (including attachments) is the responsibility 
of the recipient. British Airways Plc is a public limited company registered in 
England and Wales. Registered number: 1777777. Registered office: Waterside, PO 
Box 365, Harmondsworth, West Drayton, Middlesex, England, UB7 0GB. Additional 
terms and conditions are available on our website: www.ba.com

Reply via email to