IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Checking the SPOOL for no of jobs using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 07, 2008 7:16 pm
Reply with quote

Take a look at http://www.ibmmainframes.com/viewtopic.php?t=20505

For CPU time I would suggest SMF records, which your performance and capacity people should already have the details that you might need.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Mon Apr 07, 2008 10:20 pm
Reply with quote

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
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Tue Apr 08, 2008 8:38 pm
Reply with quote

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
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Wed Apr 09, 2008 4:34 pm
Reply with quote

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
View user's profile Send private message
Ashwin_mudikon

New User


Joined: 03 Apr 2007
Posts: 32
Location: Chennai

PostPosted: Wed Apr 09, 2008 6:05 pm
Reply with quote

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
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed Apr 09, 2008 7:39 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Apr 09, 2008 8:16 pm
Reply with quote

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
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Sat Apr 12, 2008 6:49 pm
Reply with quote

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
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Mon Apr 14, 2008 4:11 pm
Reply with quote

The code is handling this with "AFD REFRESH" .

kavya
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Fri Apr 18, 2008 5:51 am
Reply with quote

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
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 19, 2008 8:59 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon May 19, 2008 9:28 pm
Reply with quote

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
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 19, 2008 9:39 pm
Reply with quote

Thanks Craq.

But anyidea how to retrieve the jobs submitted by a user into a PS file.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top