MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sample rexx code for QUERYENQ ISPF function !!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Sep 23, 2008 1:28 pm    Post subject: Sample rexx code for QUERYENQ ISPF function !! Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Tue Sep 23, 2008 2:23 pm    Post subject: Reply with quote

amit4u79,

You asked a similar question sometime back and semigeezer gave you the code for QUERYENQ here

http://www.mvsforums.com/helpboards/viewtopic.php?t=7772&highlight=whohas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Sep 23, 2008 4:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Mon Oct 06, 2008 12:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group