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 (March 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 3 Mar 2004 23:07:39 -0500
Reply-To:   Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:   Re: how its working? (Modified list input)

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 !!! >---------------------------------------------------------------------------


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