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

Saving jobid in a PS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sayandutt
Currently Banned

New User


Joined: 15 Jun 2007
Posts: 5
Location: india

PostPosted: Wed Feb 13, 2008 4:40 pm
Reply with quote

When I submit any job in JCL, I want to save this message

"IKJ56250I JOB jobname(jobid) SUBMITTED" i n a PS.

i.e. I want to have the jobid in a ps.

How can I achieve this using JCL.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 13, 2008 4:46 pm
Reply with quote

You can not achieve it thru jcl

/rant on
what do people think jcl is, some kind of wizard, able to do everything ??
JCL in se does just nothing,
it only coordinates and interprets the sequence of jcl statement
in order to execute the program specified in the "EXEC PGM=...."
making available the control blocks pointing to the relevant resources
/rant off
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 13, 2008 4:48 pm
Reply with quote

but...
if You write a rexx script to submit the jcl in question
You can trap the message from the submit command
and act on it in any way You want
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Feb 13, 2008 5:01 pm
Reply with quote

But I am just a little puzzled by the requirement .......

Dare I ask why
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Feb 13, 2008 5:20 pm
Reply with quote

You can write your own SUBMIT macro, and then replace the usual SUBMIT by yours.

In your macro, you can use OUTTRAP to get the message and do whatever you want with it.

O.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 13, 2008 5:23 pm
Reply with quote

what about searching the forums with
... for example "rexx submit"
... and maybe refine the search with "rexx submit outtrap"
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Feb 14, 2008 2:45 am
Reply with quote

sayandutt,

Submit the job using REXX and as suggested use OUTTRAP command. I use this piece of code in my shop to extract the job number. Change qas per your requirements.

Code:
x = outtrap(out.)
 "sub '"file2"'"
  x = OUTTRAP(OFF)
   parse var out.1 left_part right_part
   parse var RIGHT_PART job_name '(' job_number ')' .
   say 'job number of back up job is:' job_number


Then u can use the EXECIO write command to write it into a PDS.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Feb 14, 2008 2:59 am
Reply with quote

This topic contains a link to a site that shows how to retrieve the running jobid in a COBOL program.

This topic shows how to retrieve the running jobid in a REXX program.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu Feb 14, 2008 3:14 am
Reply with quote

Kevin...thanks for that link to ISPF tips.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Do we need to restart DB2 Z/OS for DA... DB2 0
No new posts saving your settings in ISPF. TSO/ISPF 9
No new posts Daylight Saving this Weekend All Other Mainframe Topics 1
No new posts Regarding 'TSO OUTPUT jobname(jobid)' TSO/ISPF 17
No new posts Address TSO STATUS JOBNAME - Not gett... CLIST & REXX 4
Search our Forums:

Back to Top