Date: Tue, 6 Jun 2000 21:44:20 -0400
Reply-To: Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject: Re: Not creating output file
The FILE statement sets up a buffer at compile time and erases the old file.
In order to have this not happen you need a macro %IF to decide whether the
FILE statement should be generated or not.
You may also want to consider a disposition parameter on the FILE statement.
When the disposition is MOD then the original file is not erased, the
material is added at the end. The syntax is dependent on which system you
are operatng on.
Ian Whitlock <firstname.lastname@example.org>
From: Eric Hardy
Sent: 6/6/00 4:52 PM
Subject: Not creating output file
Is it possible to not create the file OUT1 (which is a CSV file)? With
program, when the macro var. &headerf is 'NO', it is still creating (or
overwriting) the file OUT1.
IF &headerf = 'YES' THEN DO;
FILE OUT1 LRECL = 400;
IF &doctors = 'YES' THEN DO;
IF _N_ = 1 THEN PUT %sortie(mon) mon24 ',' %sortie(mon) mon24;
IF _N_ = 1 THEN PUT %sortie(mon) mon24;