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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1740 views
  • 0 likes
  • 4 in conversation