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 (March 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 19 Mar 2002 14:22:30 -0500
Reply-To:     "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:      Re: Put
Comments: To: Thomas Allen Schmitt <schmitta@CSD.UWM.EDU>
Content-Type: text/plain

> From: Thomas Allen Schmitt [mailto:schmitta@CSD.UWM.EDU] > Hi All! could someone give me an idea on how to write the program > correctly below for the three variables. When I use just one > variable the > data files come out correct, but when I add a second or third the data > doesn't come out exactly correct. I've tested each > separately and they > all work but I can't get them to output correctly together. Thanks!

gee whiz! Are you still working on this?

> file 'first'; > if t = 1 then put @1 var1 @; > else if t = 2 then put @11 var1 @; [snippage occurs] > else if t = 12 then put @51 var1 @;

COMMENT #1: you have a held line here end it with: PUT;

> file 'second'; > if t = 1 then put @1 var2 @; > else if t = 2 then put @11 var2 @; [snippage occurs] > else if t = 12 then put @51 var2 @;

INSERT COMMENT #1 HERE, TWO

> file 'third'; > if t = 1 then put @1 var3 @; [snippage occurs] > else if t = 12 then put @51 var3 @;

INSERT COMMENT #1 HERE, ... ALSO

> end; > put; > end; > run .....^ and you'll want a semi-truck after the RUN

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

--> cheerful provider of UNTESTED SAS code from the Clue?Gee!Wrx <--

Repetition obfuscates! Repetition reduction enhances elegance! Repetition reduction furthers finesse!


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