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
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 Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts purge jobs with return code 0 and ret... JCL & VSAM 4
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
Search our Forums:

Back to Top