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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2181 views
  • 0 likes
  • 4 in conversation