Date: Mon, 16 Jun 2003 11:09:12 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: Multiple output files
Content-Type: text/plain; charset="us-ascii"
I see a number of problems:
1. The macro variable resolution of &FN takes place at compile time so the
CALL EXECUTE does not effect the value of &FN in this step.
2. FILENAME is a global statement, not a datastep executable statement, so
the IF statement will not do what you seem to expect.
3. You would need a FILE statement somewhere or by default, the PUT will
write to the log.
4. Just a note that you should be aware that you cannot have more than one
PDS member (in the same PDS) open for output at the same time.
David Kellerman <kellermandavid@YAHOO.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
06/13/2003 11:33 AM
Please respond to David Kellerman
Subject: Multiple output files
I'm attempting to split a datset into multiple external members of a PDS.
Can anyone see what is wrong with the FILENAME statement?
DATA _NULL_ ;
SET FIXANOM ;
BY JOB ;
CALL EXECUTE('%LET FN = ' || JOB ) ;
IF NOBS = 1 THEN
FILENAME FF "TEST.RPT.CNTL(&FN)" DISP=OLD;
PUT FF @1 JOB @12 CPUTM ;
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).