Date: Sun, 12 Nov 2000 10:45:48 GMT
Reply-To: Andreas Grueninger <grueninger@IBGRUENINGER.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Andreas Grueninger <grueninger@IBGRUENINGER.DE>
Organization: Ingenieurbuero Grueninger
Subject: Re: Data Step Question
Roger Lustig <julierog@ix.netcom.com> wrote:
Roger's solution creates another structure of the data set as used in
Anna's post.
To get the same structure use the @ (or § in MVS) modifier of the
INPUT statement.
@ holds the line pointer in the record of the flat file.
And remove all '#<n>' if using column based input.
And why column based input when DSD is used?
Data one;
infile 'e:\file10.txt' dsd truncover ;
input Age 1-10 balance 15-20 sales 25-30 @ ;
OUTPUT;
input Age 41-50 balance 55-60 sales 65-70 ;
OUTPUT;
run;
And if there are really delimiters in the data which is implicated by
DSD then used better the following
* --- adapt to your informats ;
Data one;
INFORMAT age 10.0 balance 6.0 sales 6.0;
infile 'e:\file10.txt' dsd truncover ;
input Age balance sales @ ;
OUTPUT;
input Age balance sales ;
OUTPUT;
run;
Ingenieurbuero Grueninger
Uhlbergstr. 15
72631 Aichtal (Germany)
email: grueninger@ibgrueninger.de