Date: Tue, 5 May 1998 10:52:19 +0200
Reply-To: martin trollope <martint@HOLLARD.CO.ZA>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: martin trollope <martint@HOLLARD.CO.ZA>
Subject: Re: PROBLEM WITH INPUT STATMENT
Content-Type: text/plain; charset="us-ascii"
Try using the $char. informat, which, in spite of popular belief, does not behave the same as the $w. informat because it preserves the leading spaces. Also, change the 'MISSOVER' to 'TRUNCOVER' so that SAS doesn't populate your field with missing values when your input line is shorter than the field length.
Your program may look something like this:
length field $30.;
format field $char30.; *<== This is so that it prints with leading spaces as well.;
INFILE 'H:\USER\TEST.DOT' LS=159 DLM='#' truncover ;
input field $char30.;
From: Zahra Ghasemi[SMTP:zghasemi@BRACCO.COM]
Reply To: Zahra Ghasemi
Sent: 04 May 1998 11:40
Subject: PROBLEM WITH INPUT STATMENT
I have a file which contains following observations
I read it with the following statment
INFILE 'H:\USER\TEST.DOT' LS=159 DLM='#' MISSOVER ;
the result is
The input statment take away the spaces which are in the begining of
the first line.
I need the same result as input.
(I am working with PC)
Thanks in advance