View previous topic :: View next topic
|
Author |
Message |
sayandutt Currently Banned New User
Joined: 15 Jun 2007 Posts: 5 Location: india
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
But I am just a little puzzled by the requirement .......
Dare I ask why |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what about searching the forums with
... for example "rexx submit"
... and maybe refine the search with "rexx submit outtrap" |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
Kevin...thanks for that link to ISPF tips. |
|
Back to top |
|
|
|