Date: Tue, 31 Jul 2001 08:37:41 -0400
Reply-To: "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Subject: Re: Infile , column/line pointer control problem .
Basically the trailing double at sign @@ will solve the problem.
A complication comes in at the last record.
input @1 str80 $80. / @1 next $2. @@;
infile cards eof=eof;
> -----Original Message-----
> From: Husain [SMTP:hmuhamma@ATRAXIS.COM]
> Sent: Tuesday, July 31, 2001 8:09 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Infile , column/line pointer control problem .
> I am trying to read in 2 vars , first variable is in line 1 named
> String80 and the second variable is Next_type=substr(String80 ,1,2) of
> line 2 .
> The problem is after the first observation is outputted the line
> pointer is in line 3 but I still have to input data from line 2 for
> Question , how can I get the desired output with only ONE pass of the
> data ?
> Sample Input data set :
> Desired Output dataset :
> String80 Next_Type
> aa111 bb
> bb222 cc