BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello,

I have question runing SAS on mainframe,but I am not sure what category of the topic belongs to for my question, so I choose General question as a Location,if you know please tell me.thanks.

 

My SAS question on mainframe is :

 Is there an auto variable like &SYSDATE or &SYSJOBID. that can show the current JCL job file's full name in SAS log?

i.e. the current full job file is "user.research.pds(test1)". I want call an auto variable in the curent program to show that in SAS log.I am not sure there was such an auto variable,please advise.

 

Thank you!

4 REPLIES 4
Astounding
PROC Star

In non-mainframe environments, I have always used something along these lines:

 

title "Program:  %sysfunc(getoption(sysin))";

 

You can try it on the mainframe to see if it works there.

GeorgeSAS
Lapis Lazuli | Level 10
Thank you Astounding,this does not work on mainframe,I think that is an UNIX way.
LinusH
Tourmaline | Level 20
What about &SYSJOBID?
Data never sleeps
GeorgeSAS
Lapis Lazuli | Level 10

%sysjpbid is the id of the job, not the job file.

 

Thank you.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 658 views
  • 0 likes
  • 3 in conversation