View previous topic :: View next topic
|
Author |
Message |
lalitha_gld
New User
Joined: 12 Jul 2006 Posts: 24
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
I actually want the JOBID |
By JOBID, Are you referring to the job number? |
|
Back to top |
|
|
lalitha_gld
New User
Joined: 12 Jul 2006 Posts: 24
|
|
|
|
yes, is there a varaible to get the job number? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Yoy can do it all from REXX, using SDSF Batch Commands and TSO's SEND command.
O. |
|
Back to top |
|
|
lalitha_gld
New User
Joined: 12 Jul 2006 Posts: 24
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
As suggested by offer, you can do it in REXX with
SDSF batch commands. Do search this forum for
SDSF commands. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
|