BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi, I've this code. Can anyone explain me how the sysparm option is resolving the macro program parameters?

%macro master(qtr,date,prodate,doyrend);

options source1;
...
..
...
...
%mend master;

%master(%scan(&sysparm,1,'\'),%scan(&sysparm,2,'\'),%scan(&sysparm,3,'\'),%scan(&sysparm,4,'\'));

endsas;
6 REPLIES 6
LinusH
Tourmaline | Level 20
It seems that the macro program parameter will be entered as a sysparm delimited by a backslash. %scan returns the n'th word from a string delimited, in your case, by a backslash.

Is that what you were asking for?

/Linus
Data never sleeps
deleted_user
Not applicable
I was wondering what does &sysparm resolve to.
LinusH
Tourmaline | Level 20
It resolves to the value you set to the -sysparm option at SAS invocation. It's the most common way to pass input parameters to a SAS batch job. It could look like this:

sas -autoexec '/opt/sas/sas9/autoexec.sas' -config '/opt/sas/sas9/autoexec.sas' -sysparm '2008Q1\01Jan2008\03Jan2008\xxxx'

/Linus
Data never sleeps
deleted_user
Not applicable
I want to run this in the mainframe OS in batch mode. What kind of a statement will I use to invoke sysparm varibale. How will I be specifying the value to it?

If you could explain with an exapmle that would be great.

Thanks,
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will need to review your site's SAS batch JCL procedure (PROC) to determine whether or not you have an explicit SYSPARM= JCL symbol or whether you must code an OPTIONS= JCL symbolic override, and supply the SAS OPTIONS/CONFIG setting for SYSPARM= within the OPTIONS parameter.

The SAS support website http://support.sas.com/ has this very specific gem to answer your question:

http://support.sas.com/kb/22/376.html

But, again, the local site's SAS JCL PROC setup may require your adjustment. Consider contacting your SAS System Administrator if needed.


Scott Barry
SBBWorks, Inc.

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
  • 6 replies
  • 1786 views
  • 0 likes
  • 4 in conversation