LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Eric Hardy <ehardy@CA.IMSHEALTH.COM>
Content-Type: text/plain

Eric,

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 <whitloi1@westat.com>

-----Original Message----- From: Eric Hardy To: SAS-L@LISTSERV.UGA.EDU Sent: 6/6/00 4:52 PM Subject: Not creating output file

Hello everybody.

Is it possible to not create the file OUT1 (which is a CSV file)? With that 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; END; ELSE DO; IF _N_ = 1 THEN PUT %sortie(mon) mon24; END; END;

Eric


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