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 (July 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Jul 2003 16:46:51 -0400
Reply-To:     Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:      Re: Writing a text file with "if ... then put" statements
Comments: To: Tyler Barbour <sim7396@HOTMAIL.COM>
Content-Type: text/plain; charset="iso-8859-1"

The 'header= ...' option only works when writing print files. Include the keyword PRINT in the FILE statement. Sig

-----Original Message----- From: Tyler Barbour [mailto:sim7396@HOTMAIL.COM] Sent: Thursday, July 03, 2003 4:13 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Writing a text file with "if ... then put" statements

I want to create a text file using a FILE statement. The code I used resulted in the header line being printed several times, but I only want it printed once at the top of the page (my text file will seldom, if ever, be longer tnan one page)

This is what I tried. What did I do wrong?

data _null_; file "c:\lola.txt" header=pagetop; if (1) then put "This is a test"; if (0) then put "This will not print"; if (1) then put "This is another test"; return; pagetop: put @15 "This is the header line"; return; run;


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