[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: convert sysparm to macro variables
From:       "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2 () CDC ! GOV>
Date:       2007-02-28 18:13:29
Message-ID: 2C6B65AAC3623140922DE580669C456A35DE81 () LTA3VS001 ! ees ! hhs ! gov
[Download RAW message or body]

> From: Droogendyk, Harry
> There's been a couple discussions on SAS-L about this type of
> thing in the past.

<sigh> note2self: -always- search the archives first.

> I think I'd find it easier to make definitions of this nature
> in a separate file, and use -sysparm to include that file.

That idea makes passing the parameters into a two step operation.
1. write the file containing parms
2. write the call referencing the file

you are correct, Harry: doing it that way
I don't have to worry about the translation from parm=value
to macro variables

the issue are:
* what delimiters to use between multiple parms
  I saw examples using comma
  semicolon seemed a natural choice
* how to move information in sysparm
  to actual use in program

for my case global macro variables are
the appropriate choice before calling a parameterized include file
one of my examples below shows passing the macro call in sysparm
I think we went round and round to discover that one cannot have
a percent sign as first character of sysparm
thus' -sysparm ';%DoThis(parm1=x)'

the reason I asked is because
I have started doing R&D for abstracts for fall SUG paper(s)

I had posted a note earlier about a suggestion to write calls to a .bat
file

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0701D&L=sas-l&P=R26006

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0702B&L=sas-l&P=R23665

using that idea and the code posted beginning this thread
I have a written a caller for my FreqAll routine
for every member in a library.

I am always amazed at how little code it takes
to do umpteen iterations of a large process.

here's the output from the driver program
- - - FreqAll-exec-calls.bat - - -
rem     28FEB2007:09:56:04
call sas FreqAll-call-one -sysparm 'in_lib=SASHELP;in_data=ACCBW' -print
..\lst\ACCBW.lst
call sas FreqAll-call-one -sysparm 'in_lib=SASHELP;in_data=ACCBWMT'
-print ..\lst\ACCBWMT.lst
...
call sas FreqAll-call-one -sysparm 'in_lib=SASHELP;in_data=ZTC' -print
..\lst\ZTC.lst

Ron Fehd  the macro maven  CDC Atlanta GA USA RJF2 ata cdc d0t g0v

check our most excellent archives:
http://www.listserv.uga.edu/archives/sas-l.html
      search for: -sysparm
substring search: [X]
subject contains:
author's address:
           since: Jan 2000
           until:
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic