SDSF is an output display / management tool accessible through TSO (and batch as well). The JES (Job Entry Subsystem) facility actually assigns the JobID (also called the JES job number to some).
When you refer to "..sdsf Jobid.." - are you actually interested in printing the JES JobID in the SASLOG? And would that be the JOB_NAME or assigned JOB_NUMBER?
If this is the case, I suggest you look at printing the SAS automatic macro variables that are available - issue this command in your job to display them (and choose the appropriate one of interest) - there is a SYSJOBID but that is the JOB_NAME:
If you are looking to extract the JES-assigned job_number, you will need to investigate using CALL SYSTEM possibly to invoke a REXX EXEC - here is a REXX-related post/article:
However, the simplest approach would be to issue a FILENAME statement to allocate an unused and allocate it to SYSOUT=* in your SAS program. Then you can use the PATHNAME CALL function to get back the JES-assigned dataset name, which will include your JOB_NAME and JOB_NUMBER - parse it and display as needed, either with a DATA step or with MACRO language.
Some history: when SAS re-vamped its software with SAS 6.0x in the early '90s, printing of the JOB_NAME and JOB_NUMBER went away and it was up to users to display this information.
And here's a bit of the collection that I've been using (based on some REXX code I found in MVS forums):
%let tiot_pointer = %sysfunc(peek(%sysfunc(peek(540))+12));
%let job_name = %sysfunc(peekc(&tiot_pointer,8));
%let proc_step = %sysfunc(peekc(&tiot_pointer+8,8));
%let step_name = %sysfunc(peekc(&tiot_pointer+16,8));
%let jscb_pointer = %sysfunc(peek(%sysfunc(peek(540))+180));
%let pgm_name = %sysfunc(peekc(&jscb_pointer+360,8));
%let ssib_pointer = %sysfunc(peek(&jscb_pointer+316));
%let job_id = %sysfunc(peekc(&ssib_pointer+12,8));
%let job_number = %sysfunc(peekc(&ssib_pointer+15,5));
%let jct_pointer = %sysfunc(peek(&jscb_pointer+260));
%let job_class = %sysfunc(peekc(&jct_pointer+47,1));
%let msg_class = %sysfunc(peekc(&jct_pointer+22,1));
%let act_pointer = 00%sysfunc(peekc(&jct_pointer+56,3),hex6.);
%let act_pointer = %sysfunc(inputn(&act_pointer,hex8.));
%let pgmr_field = %sysfunc(peekc(&act_pointer+24,20));
%let system_id = %sysfunc(peek(%sysfunc(peek(16,4))+196,4));
%let system_id = %sysfunc(peekc(&system_id+16,4));
%let user_id = %sysfunc(peek(%sysfunc(peek(548))+108));
%let user_id = %sysfunc(peekc(&user_id+192,8));
Can't tell whether they're still valid with the latest and greatest of z/OS releases (we are at z/OS 1.10 now). Nor can I guarantee for the field names being super-accurate ;-)
sorry I missed this a couple of weeks ago.
Here is how I get %sysjesID to provide the JES job ID.
%put the sdsf jes job-id is %sysJesID ;
based on my little macro[pre]%macro sysjesid() /des='get jes/sdsf jobID ' ;
%local ascb assb jsab ; %*******mvs jargon ! ;
/* ASCB is at 548 */
/* ASSB is at ASCB+336 */
/* JSAB is at ASSB+168 */
%let ascb = %sysfunc( peek( 548) );
%let assb = %sysfunc( peek( %eval( 336 + &ascb ) ) );
%let jsab = %sysfunc( peek( %eval( 168 + &assb ) ) );
/* now get job ID as in JES/sdsf */
%sysfunc( PEEKc(%eval( 20 + &jsab), 8 ))