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 15:46:09 -0400
Reply-To:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:   Re: Multiple output files
Comments:   cc: David Kellerman <kellermandavid@YAHOO.COM>
Content-Type:   text/plain

> From: David Kellerman [mailto:kellermandavid@YAHOO.COM] > 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 ;

you may be surprised to learn that your call execute statement which defines the macro variable FN executes -after- your filename statement.

but you're way more off base than that filename is not a statement that you can execute within the data step since it is a global statement 'used anywhere' it should certainly not be thought to be conditionally executed as you have written here

what you want for these multiple external files is the filevar option of the file statement.

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

My computer must be broken: whenever I ask a wrong question, I get a wrong answer. -- Pot-Shots by Ashleigh Brilliant

My computer must be broken: whenever I instruct it to do something peculiar it sits awaiting ungarbled commands. -- RJF2

RTFM: I'm an engineer, I don't get paid to know, I get paid to know where to look it up. RTFM: Read The Finite Manual.


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