Date: Mon, 16 Dec 2002 14:26:07 -0800
Reply-To: Twiggy182 <twiggy182@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Twiggy182 <twiggy182@HOTMAIL.COM>
Subject: Passing parameter to a script under UNIX
Content-Type: text/plain; charset=ISO-8859-1
I got a script that print some information in two differents files.
But now I need to change the name of theses files ( who were hardcoded
) at each execution. So I tried to pass parameter to my script this
"sas myscriptname.sas -sysparm 'file1.ext file2.ext'"
and access them with
"proc printto print = %scan( &sysparm, 1 )"
"proc printto print = %scan( &sysparm, 2 )"
but the two files produce are "file1.lst" and "ext.lst".
Then I tried
"proc printto print = %scan( &sysparm, 1, ' ')"
"proc printto print = %scan( &sysparm, 2, ' ')"
but then the two files were print in the file "myscriptname.lst".
So could you please help me to understand how parameter work!