View previous topic :: View next topic |
Author |
Message |
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Tue Sep 23, 2008 1:28 pm Post subject: Sample rexx code for QUERYENQ ISPF function !! |
|
|
Hi Team, I searched the forum and found many occurences of QUERYENQ ISPF function and also a link to the ISPF manual to explain about QUERYENQ function, but could not find how I can use it in my TSO REXX to find out the enqueues on a particular data set. The manual does not state what are the valid values of RNAME, QNAME, where the value is placed,etc. If anyone has any rexx code which has QUERYENQ function to find out the data set contention please let me know. Thanks for your help and if there was anything I missed during my search on the forum also please let me know. Thanks again. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Sep 23, 2008 4:33 pm Post subject: |
|
|
I think Anit4u79 means the ISPF service named QUERYENQ...
Code: | /* Rexx */
Address ISPEXEC
"CONTROL ERRORS RETURN"
"TBEND ETABLE" /* Insure table does not exist */
QN = "SYSDSN" /* Set variable for major name */
RN = "*" /* Set variable for minor name */
"QUERYENQ TABLE(ETABLE)", /* Invoke queryenq service */
"QNAME(QN)", /* Specify major name */
"RNAME(RN)", /* Specify minor name */
"REQ(N*)", /* Specify requestors */
"LIMIT(7)" /* Only show 1st 7 enqs */
Say "RETURN CODE WAS "RC
If RC < 5 Then /* If any data was returned */
Do
"TBTOP ETABLE" /* Position table at top */
Do Until RC > 0 /* Loop through table */
"TBSKIP ETABLE"
If RC = 0 Then
Say ZENJOB ZENQNAME ZENRNAME ZENDISP ZENHOLD ZENSCOPE,
ZENSTEP ZENGLOBL ZENSYST ZENRESV
End
End
Else /* If service failed */
Do /* Say error message to screen */
Say ZERRMSG
Say ZERRSM "-" ZERRLM
End
|
_________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
amit4u79 Beginner
Joined: 24 Oct 2005 Posts: 109 Topics: 36 Location: India
|
Posted: Mon Oct 06, 2008 12:11 pm Post subject: |
|
|
Hey Semigeezer, thanks for your code on QUERYENQ. Yes, you are right I asked for a code on how to use this ISPF function. And because of you I have implemented this automation in production environment. Thanks a lot for your help. Thanks again for the great help.
Regards,
-Amit. _________________ I did not fail; I have found 10,000 ways that would not work - Albert Einstein. |
|
Back to top |
|
|
|
|