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
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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