DATA Step, Macro, Functions and more

sysparm option

Reply
N/A
Posts: 0

sysparm option

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;
Super User
Posts: 5,434

Re: sysparm option

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: sysparm option

I was wondering what does &sysparm resolve to.
Super User
Posts: 5,434

Re: sysparm option

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: sysparm option

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,
Super Contributor
Posts: 394

Re: sysparm option

Posted in reply to deleted_user
Super Contributor
Super Contributor
Posts: 3,174

Re: sysparm option

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.
Ask a Question
Discussion stats
  • 6 replies
  • 403 views
  • 0 likes
  • 4 in conversation