|
> 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.
|