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

Address TSO STATUS JOBNAME - Not getting the latest JobID


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

New User


Joined: 04 Feb 2008
Posts: 5
Location: India

PostPosted: Thu Feb 27, 2014 12:46 pm
Reply with quote

Hi Guys,

I have the following jobs in SPOOl

JOBNAME JOB ID
TESTJOB1 JOB38042
TESTJOB2 JOB38043


In my REXX program , I use the following
Address TSO STATUS TESTJOB1

The above piece of code always picks the old version of the job TESTJOB1- JOB38042. I expected the program to pick me the latest job JOB38043..

Can you please suggest me how to code to pick the latest job version?

Thanks!!! appreciate your time and response
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Feb 27, 2014 1:21 pm
Reply with quote

JOB38043 = TESTJOB2

So what is the problem?
Back to top
View user's profile Send private message
kumjara

New User


Joined: 04 Feb 2008
Posts: 5
Location: India

PostPosted: Thu Feb 27, 2014 1:26 pm
Reply with quote

Sorry My mistake .. Both JOB38042(failed run) and JOB38043(successful rerun) have the same job name TESTJOB1

JOBNAME JOB ID
TESTJOB1 JOB38042
TESTJOB1 JOB38043

In my REXX program , I use the following
Address TSO STATUS TESTJOB1

The above piece of code always picks the old version of the job TESTJOB1- JOB38042. I expected the program to pick me the latest job JOB38043..

Can you please suggest me how to code to pick the latest job version?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Feb 27, 2014 1:36 pm
Reply with quote

As far as I know, status will return all jobs with the given name.
But let us see your REXX coding maybe there is some logic not
working as expected.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Feb 27, 2014 2:39 pm
Reply with quote

TSO STATUS returns all jobs in spool with the given name. In REXX, you need to properly trap the output using OUTTRAP and display/use.
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

 


Similar Topics
Topic Forum Replies
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Job completes in JES, but the status ... IBM Tools 1
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts To replace jobname in a file with ano... SYNCSORT 12
Search our Forums:

Back to Top