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 (July 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Jul 2002 17:07:22 -0400
Reply-To:     shiling zhang <shiling_99@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shiling zhang <shiling_99@HOTMAIL.COM>
Subject:      2 bytes delimier (test)
Content-Type: text/plain; charset="iso-8859-1"

I think SAS takes 2 bytes char as delimiter on infile statement. Use hex codes if they are not displayable.

5340 %let d=+(-1) dlm +(-1); 5341 data _null_; 5342 file '~/test.txt' ; 5343 do i =1 to 3; 5344 x='abcd'; y='b'; z='cab'; dlm='$!'; 5345 put x &d y &d z ; 5346 end; 5347 run;

NOTE: 3 records were written to the file '~/test.txt'. The minimum record length was 12. The maximum record length was 12. NOTE: DATA statement used: real time 0.03 seconds cpu time 0.02 seconds

5348 5349 data _null_; 5350 length x y z $5; 5351 infile '~/test.txt' delimiter='2421'x ; 5352 input x y z; 5353 list; 5354 put x= y= z= ; 5355 run;

x=abcd y=b z=cab RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+- ---7----+----8----+----9----+----0 1 abcd$!b$!cab 12 x=abcd y=b z=cab 2 abcd$!b$!cab 12 x=abcd y=b z=cab 3 abcd$!b$!cab 12 NOTE: 3 records were read from the infile '~/test.txt'. The minimum record length was 12. The maximum record length was 12. NOTE: DATA statement used: real time 0.05 seconds cpu time 0.03 seconds


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