Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Control variable to pull JOBID from spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
lalitha_gld

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Thu Oct 11, 2007 6:14 pm    Post subject: Control variable to pull JOBID from spool
Reply with quote

Hi,

I'm trying to send a notification to user regarding a job status. If I use the control variable '&sysjobid', it is giving the job name. But I actually want the JOBID which is listed in the SDSF spool against the JOBNAME.
Can anyone pease let me know of the corresponding control variable.

Thanks,
Lalitha.
Back to top
View user's profile Send private message

Aaru

Senior Member


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

PostPosted: Thu Oct 11, 2007 6:21 pm    Post subject: Reply to: Control variable to pull JOBID from spool
Reply with quote

Quote:
I actually want the JOBID


By JOBID, Are you referring to the job number?
Back to top
View user's profile Send private message
lalitha_gld

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Thu Oct 11, 2007 6:37 pm    Post subject: Reply to: Control variable to pull JOBID from spool
Reply with quote

yes, is there a varaible to get the job number?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Oct 11, 2007 10:50 pm    Post subject:
Reply with quote

Yoy can do it all from REXX, using SDSF Batch Commands and TSO's SEND command.

O.
Back to top
View user's profile Send private message
lalitha_gld

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Fri Oct 12, 2007 10:43 am    Post subject:
Reply with quote

I would be using a SAS MACRO to send the email notification with the job number. For this I require the control variable to be coded as similar to '&sysjobid' for the job name.

Is there a specific variable for getting the job number similarly !

Thanks,
Lalitha.
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Fri Oct 12, 2007 11:08 am    Post subject: Reply to: Control variable to pull JOBID from spool
Reply with quote

As suggested by offer, you can do it in REXX with
SDSF batch commands. Do search this forum for
SDSF commands.
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Fri Oct 12, 2007 11:13 am    Post subject: Reply to: Control variable to pull JOBID from spool
Reply with quote

You can get the job number using this code in REXX.

This traps the output once the job gets submitted. Finally, the variable job_number will have the job number.

Code:
ADDRESS "TSO"                                             
x = outtrap(out.)                                           
"SUB '"file99"'"                                           
x = OUTTRAP(OFF)                                           
parse var out.1 left_part right_part                     
parse var RIGHT_PART job_name '(' job_number ')'


Hope this helps
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us