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

Control variable to pull JOBID from spool


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
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
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: 1287
Location: Chennai, India

PostPosted: Thu Oct 11, 2007 6:21 pm
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
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: 2358
Location: Israel

PostPosted: Thu Oct 11, 2007 10:50 pm
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
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: 1287
Location: Chennai, India

PostPosted: Fri Oct 12, 2007 11:08 am
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: 1287
Location: Chennai, India

PostPosted: Fri Oct 12, 2007 11:13 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top