|
There are many INFILE/INPUT features. Most of them aren't too hard to
understand in isolation. Their interactions can be tricky.
A couple of things in your test program are odd in the sense that they
cause features to work at cross purposes or disable one another:
1. Using the "&" modifier when a space is not one of the delimiter
characters. Try
delimiter=' !'
2. Not using the ":" modifier for variable NAME. Try
name : & $60.
On Tue, 2 Mar 2004 05:33:00 -0800, kanthan <airaha_m@REDIFFMAIL.COM> wrote:
>Hi all,
>
>I was trying to learn modified list inputs. I wrote the below program,
>I didnt understand how it works?
>
>data one;
>infile cards delimiter='!' dsd;
>input @1 test : $20. name & $60. street ~ $30.;
>cards;
>first second!third four!five!!six seven!! "eight!nine"
>;
>
>O/P is:
>Obs test name street
> 1 first second third four!five!!six seven! "eight!nine"
>
>I understand about : and ~ format modifeiers. But I dont understand
>how & modifier works?
>I presume that:
>1. & modifier could be used well only with default space delimiter.
>2. It overrides the default delimiter's effect and considers
>'a delimiter+space' as a delimiter and stops reading input. I assume
>this only from the above example's output. Just see variable 'name' is
>read until a
>'!+space' comes.
>
>Can anybody clear my assumptions about & modifier?
>
>Thanks in advance.
>
>- Kanthan !!!
>---------------------------------------------------------------------------
|