View previous topic :: View next topic
|
Author |
Message |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Hi friends,
I want to trap the users/jobs using these 2 datasets and eliminate the duplicates and put it in to a dataset.
I generally use
TSO WHOHAS 'TEST.DATASET1'
TSO WHOHAS 'TEST.DATASET2'
seperately to just display the data but I tried to trap the data using OUTTRAP, it not trapping.
So, is there any other method where we can trap the output of 'WHOHAS' command?
or
Is there any other method to get the users holding the datasets and write it to an flat file?
Thanks,
Balu |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Take a look at the ISPF service QUERYENQ.
O. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Thanks for the quick response.
I went thru the link provided above
I found it very useful and I have coded as follows:
Code: |
/*rexx*/
MINOR = 'TEST.DATASET1'
ASN = 'C'
ASNAME = ASN'*'
ENQ = 'ENQ1'
MAJOR = '*'
ADDRESS ISPEXEC
"QUERYENQ TABLE(QUERYENQ) QNAME(MAJOR) RNAME(MINOR) XSYS",
"REQ("ASNAME") SAVE("ENQ")"
IF RC = 0 THEN
"TBEND QUERYENQ"
exit
|
This is working fine but it is displaying the jobs/ids used only in TSOP4(I have executed from TSOP4 only). If an user is using the dataset from TSOP3 it is not writing to the dataset.
One output record looked something like this:
Code: |
CGPO GHP4 SHARE OWN SYSTEMS GLOBAL SYSDSN 'TEST.DATASET1'
|
'TSO WHOHAS' is showing more no of ids than this.
I think GHP4 is representing the system, which is for TSOP4.
All the records in the output file are GHP4.
If I need the users using in GHP3 also
what modifications needed to the above code to get the desired result.
Regards,
Balu |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Just guessing... your WHOHAS probably does not filter by job name, whereas your QUERYENQ is filtering by job name. Trying removing the REQ("ASNAME") parameter. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
I am not exactly sure how 'WHOHAS' works, but it is showing all the users using the dataset (either from TSOP4/TSOP3)
But the above code what I gave is showing only the ids in TSOP4
I have tried by removing the REQ parameter, but didn't work!
I don't thing REQ("ASNAME") will make any impact, as it will just limit the ENQ search to specific requesters.
Thanks,
Balu |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
I have done more analysis and found the following:
The parameter 'XSYS' which will get the ENQs on other systems is not functioning as expected.
When I ran the macro(mentioned above) in TSOP4.
Retrun code: 0
It is not displaying the ENQ from other systems(TSOP3).
But When I ran the same the macro in TSOP3.
Retrun code: 2
and it is displaying all the ENQ from other systems also(TSOP4).
My question is why is the macro not working fine in TSOP4 which is working perfectly in TSOP3.
Please let me know if any thing wrong and what needs to be done to get it right?
Regards,
Balu |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Did you check the meaning of the return codes? The return codes are documented in ISPF Services Guide. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Yaa I checked..
RC 0: It may not reflect all ENQs on all systems.
RC 2: Data set written
When in TSOP3 --> RC 2 --> Writing all data
When in TSOP4 --> RC 0 --> Not writing all data, happens when XSYS is not specified. But I have specified.
Retrun codes are showing up properly, but why is the return code '0' in TSOP4
Thanks,
Balu |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
My book also mentions something about the system running in STAR mode... not sure what that means, but make sure your IPL parameters for GRS are similar on both systems.
Quote: |
I have tried by removing the REQ parameter, but didn't work!
I don't thing REQ("ASNAME") will make any impact, as it will just limit the ENQ search to specific requesters. |
"didn't work" is not very detailed debugging information.
I think you are complaining that the lists returned are not the same, which is exactly what filtering will do. Please confirm that you are no long specifying REQ() parameter. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Hi
REQ("ASNAME") : Is filtering the ENQ list based on the Job Name. when I gave ASNAME = C'*', it is displaying only the jobs stating with 'C'.
But still I have removed that REQ() parameter and tested.
By basic problem here is
the same REXX code is giving differet results in TSOP3 and TSOP4.
TSOP3 - Jobs from all the systems(P3 and P4).
TSOP4 - Jobs only from TSOP4.
Quote: |
system running in STAR mode |
Even I am not aware of it. May be some thing to do with this.
Quote: |
make sure your IPL parameters for GRS.. |
How to check these IPL parameters, I am not sure. Please help me.
Thanks,
Balu |
|
Back to top |
|
|
|