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 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Aug 2004 09:07:51 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: merging datafiles without using named datasets
Comments: To: shiling zhang <shiling99@YAHOO.COM>

But not nearly as much fun!

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of shiling zhang Sent: Tuesday, August 10, 2004 8:27 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: merging datafiles without using named datasets

It may be easier to fix it under a text editor. Don't you think?

rune@fastlane.no (Rune Runnestoe) wrote in message news:<24410121.0408092259.17dee232@posting.google.com>... > Hi, > I am trying to fix a hurted file of 55092 records. The injury is a > dislocation of 3 positions to the left in record # 36011. > > By running the code below, I manage to make to nice files. The idea is > to solve the problem of dislocation by concatenating these two files > in a third datastep, so that the file 'goodfile' will contain 55092 > records. > > > filename badfile 's:\fremkon\r03-innra.dat'; > filename fixed_1 'D:\TEST\fixed_files\fixed_1.dat'; > filename fixed_2 'D:\TEST\fixed_files\fixed_2.dat'; > filename goodfile 'd:\test\fixed_ok.dat'; > > data _null_; > infile badfile lrecl=407; > file fixed_1 lrecl=407; > input; > if _n_ <= 36010 then put _infile_; > run; > > data _null_; > infile badfile lrecl=407; > file fixed_2 lrecl=407; > input; > if _n_ > 36010 then put _infile_; > run; > > Can anyone suggest a code to concatenate the two part-datafiles to one > without going through a named datastep (use rather data _null_; ....; > run;) ? > > > > This doesn't work: > data _null_; > infile fixed_1 lrecl=407; > infile fixed_2 lrecl=407; > file goodfile lrecl=407; > input; > run; > > And neither does this: > data _null_; > infile fixed_1 fixed_2 lrecl=407; > file goodfile lrecl=407; > input; > run;


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