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 (August 1996, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 15 Aug 1996 21:00:00 -0500
Reply-To:     H.MCLEAN@PLUM.FRUIT.COM
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Hays McLean <H.MCLEAN@PLUM.FRUIT.COM>
Subject:      Multiple file statements in one data step

The following code is intended to print to (and overwrite) a file already on the disk. The subsequent conditional statements are to print certain data to a completely different file and to append certain data to the original print file ... all in one data step. The problem is that apparently the MOD option on the second FILE PRINT statement becomes operative throughout the data step. So instead of overwriting the file to begin with, it appends everything to the file on the disk.

If the statements are in separate data steps, it works.

Is there a reason for this or is it a bug?

data; file 'test.tst' print notitles; put 'xyz'; do j=1 to 2; if j=1 then do; file 'test2.tst'; put 'xyz2'; end; else do; file 'test.tst' print notitles mod; put 'xyz3'; end; end; run;

--Hays McLean


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