View previous topic :: View next topic
|
Author |
Message |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Sorry for putting you all in confusion:
I had by mistake added SHR to the line:
"
Quote: |
ALLOC F(ISFIN) TRACKS SPACE(1) SHR REU" /* USED BY SDSF */ |
That was causing the error:
IKJ56701I Missing dataset name
IKJ56701I Missing name of dataset to be allocated.
IRX0555E The input or output file ISFIN is not allocated. It can not be opened for I/O.
IRX067OE EXECIO error while trying to GET or PUT a record.
Now my code looks like this:
********************** rexx ****************************/
ARG JOBNAME JOBID
ADDRESS TSO
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('U153134.TEMP') SHR"
QUEUE "SET CONFIRM OFF"
QUEUE "OWNER MDS9AB"
QUEUE "ST"
QUEUE "SELECT "JOBNAME JOBID
QUEUE "FIND "JOBNAME
QUEUE "++?"
QUEUE "FIND JESYSMSG"
QUEUE "++S"
QUEUE "PRINT FILE TEMPPRT"
QUEUE "PRINT"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE " "
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
ADDRESS TSO "FREE F(ISFIN,ISFOUT,TEMPPRT)"
EXIT
But now the problem is when I have more than 1 jobs with same jobname but different jobid, it is always picking up first job with same jobname. It seems like filter or Select for Jobid is not working . Though it works well when i do it manually online.
eg:
MDS9ABTT JOB123454
MDS9ABTT JOB123463
MDS9ABTT JOB123474
When i execute my exec with arguents 'MDS9ABTT JOB123463',
it is putting JESYSMSG of MDS9ABTT JOB123454 into print dataset.
It works well when there is only one job with a jobname.
I tried replacing:
QUEUE "SELECT "JOBNAME JOBID
with
QUEUE "filter JOBNAME eq " JOBNAME " JobID eq " JOBID"
But, still it is picking first job only.
Thanks,
Ajay |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Friends,
Quote: |
But now the problem is when I have more than 1 jobs with same jobname but different jobid, it is always picking up first job with same jobname. |
It seems like filter or Select for Jobid is not working . Though it works well when i do it manually online.
eg:
MDS9ABTT JOB123454
MDS9ABTT JOB123463
MDS9ABTT JOB123474
When i execute my exec with arguents 'MDS9ABTT JOB123463',
it is putting JESYSMSG of MDS9ABTT JOB123454 into print dataset.
It works well when there is only one job with a jobname.
I tried replacing:
QUEUE "SELECT "JOBNAME JOBID
with
QUEUE "filter JOBNAME eq " JOBNAME " JobID eq " JOBID"
But, still it is picking first job only.
Thanks,
Ajay |
|
Back to top |
|
|
kavya123 Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 34 Location: hyderabad
|
|
|
|
Hi,
see i have included a delete statement at the end so that after reading the CPU time the PS created was deleted and after you use it second time for other jobname and job id new lines will be printed in the same PS.
Code: |
"DELETE "U153134.TEMP"" |
MAy be you are getting the same value because it is displaying the same value from the PS always when ever you run the macro.
Once check the PS wether changes are reflected if you give a new jobname and jobid. |
|
Back to top |
|
|
Ashwin_mudikon
New User
Joined: 03 Apr 2007 Posts: 32 Location: Chennai
|
|
|
|
Chinna,
Use outtrap funtion with the "STATUS" command. You will get the status of all the jobs in the stem that u ve given in the outtrap. stem.0 will be the no of jobs. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi,
I am not using the macro. I am allocating the temporary print file before running the exec. The exec should write the JESYSMSG to it.
But now the problem is:
When I have more than 1 jobs with same jobname but different jobid, it is always picking up first job with same jobname. It seems like filter or Select for Jobid is not working . Though it works well when i do it manually online.
For eg:
MDS9ABTT JOB123454
MDS9ABTT JOB123463
MDS9ABTT JOB123474
When i execute my exec with arguents 'MDS9ABTT JOB123463',
it is putting JESYSMSG of MDS9ABTT JOB123454 into print dataset.
It works well when there is only one job with a jobname.
I tried replacing:
QUEUE "SELECT "JOBNAME JOBID
with
QUEUE "filter JOBNAME eq " JOBNAME " JobID eq " JOBID"
But, still it is picking first job only.
code:
Code: |
********************** rexx ****************************/
ARG JOBNAME JOBID
ADDRESS TSO
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('U153134.TEMP') SHR"
QUEUE "SET CONFIRM OFF"
QUEUE "OWNER MDS9AB"
QUEUE "ST"
QUEUE "SELECT "JOBNAME JOBID
QUEUE "FIND "JOBNAME
QUEUE "++?"
QUEUE "FIND JESYSMSG"
QUEUE "++S"
QUEUE "PRINT FILE TEMPPRT"
QUEUE "PRINT"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE " "
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
ADDRESS TSO "FREE F(ISFIN,ISFOUT,TEMPPRT)"
EXIT |
Please suggest.
Thanks,
Ajay |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Never seen so much hijacking of a single thread...
chinna asked a simple question,
Sathishk answered by "My requirement is..."
then tarunsharma1981 wrote "i also have a similar requirement in CMS..."
and Huzefa added "I just don't want to save..."
and last thilakvs and kavya123 started a subject of their own...
what happened to this thread ????? |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Friends,
I hope i was clear in stating my SDSF problem. Please let me know if my explanation of problem is unclear.
Kavya, I tried your method of making owner and prefix to * at the beginning before issuing ST Command. But still my problem persists. That is, when there are multiple jobs with SAME JOBNAME but with DIFFERENT JOBIDs, it is always picking up the first job with that jobname even though i want to print 2nd or later job with that same jobname. It is always picking up the first job with that jobname.
The only good difference b/w your code and mine is: I am not using "AFD REFRESH" in my code. It is a SDSF server command (something i came to know from SDSF help and I may not be authorized to use it!). I can not use AFD refresh command.
I am just giving:
s jobname jobid.
It works well in the case when there is only one job with a unique JOBNAME. But it fails when there are multiple jobs with SAME JOBNAME but with DIFFERENT JOBIDs. It is always picking up the first job with that jobname.
I hope I am clear in stating my requirement.
Kavya:
Is your code handling above situation with/without using AFD REFRESH ?
Thanks,
Ajay |
|
Back to top |
|
|
kavya123 Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 34 Location: hyderabad
|
|
|
|
The code is handling this with "AFD REFRESH" .
kavya |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Kavya,
Thanks a lot. I was a bit reluctant to use the command "AFD REFRESH". Finally, i used it. Yes, you are right and Now i saw i it myself. Now i am getting the desired result. Though still I don't know what magic does it create when i get my particular job when i use it and not if i don't use it.
I will have dig into this command a bit.
But Thanks once again for your prompt attention.
-Ajay |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi All,
My requirement is to know all the jobs submitted(both running(DA) and finished(ST)).
I tried the code given, but its not working. I pasted the code till filter and then removed the other step till print, but somehow it was not working.
Secondly, in my spool i can't see JobId, does that mean we don't have jobid column or the jobid column is hidden, if yes how to unhide it.
Can somebody guide me through the mess. Its kind of urgent. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
saurabh39 wrote: |
Secondly, in my spool i can't see JobId, does that mean we don't have jobid column or the jobid column is hidden, if yes how to unhide it. |
Have you tried F1? |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Thanks Craq.
But anyidea how to retrieve the jobs submitted by a user into a PS file. |
|
Back to top |
|
|
|