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 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 23 Jul 2004 09:09:50 -0500
Reply-To:     Mai To <Mai.To@UTH.TMC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mai To <Mai.To@UTH.TMC.EDU>
Subject:      add in a value
Content-Type: text/plain; charset="us-ascii"

I have a dataset with many fields. I need to add in a field "YR" with a value "04" at the end of each record to identify the year. This is my code:

DATA _NULL_; INFILE MFR; INPUT @ 1 DATA $140. @ 145 YR $2. ; IF YR=' ' THEN YR='04'; FILE OUT ; PUT _INFILE_;

But it doesn't work. Any help is very much appreciated.

Mia


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