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 (June 2003, 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 Jun 2003 11:09:12 -0400
Reply-To:     diskin.dennis@KENDLE.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         diskin.dennis@KENDLE.COM
Subject:      Re: Multiple output files
Comments: To: David Kellerman <kellermandavid@YAHOO.COM>
Content-Type: text/plain; charset="us-ascii"

David,

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.

FWIW, Dennis Diskin

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

To: SAS-L@LISTSERV.UGA.EDU cc: 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).


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