LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 way

"sas -sysparm 'file1.ext file2.ext'"

and access them with

"proc printto print = %scan( &sysparm, 1 )" and "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!

Thank you


Back to: Top of message | Previous page | Main SAS-L page