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 (August 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 13 Aug 2003 14:14:30 -0400
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: Why do two infiles of same file read only once ?

A little strange.

If you use two FILENAME statements:

filename x1 'c:\temp\x1.txt'; filename x1again 'c:\temp\x1.txt';

then use the filerefs rather than the OS paths and names in the INFILE statements:

infile x1 unbuffered recfm=N eof=endX1; infile x1again unbuffered recfm=N eof=endX1Again;

you get what you expected.

1st c=65 1st c=66 1st c=67 1st c=13 1st c=10 X1 2nd c=65 2nd c=66 2nd c=67 2nd c=13 2nd c=10 X1Again

On Wed, 13 Aug 2003 12:53:30 -0400, Richard A. DeVenezia <radevenz@IX.NETCOM.COM> wrote:

>Why would this code input from 'c:\temp\x1.txt' only one time ? > >data _null_; > file 'c:\temp\x1.txt'; > put 'ABC' ; >run; > >data char; > infile 'c:\temp\x1.txt' unbuffered recfm=N eof=endX1; > do while (1); > input c pib1.; > put '1st ' c=; > output; > end; >endX1: > put 'X1'; > > infile 'c:\temp\x1.txt' unbuffered recfm=N eof=endX1Again; > do while (1); > input c pib1.; > put '2nd ' c=; > output; > end; >endX1Again: > put 'X1Again'; > stop; >run; > >log >NOTE: The infile 'c:\temp\x1.txt' is: > File Name=c:\temp\x1.txt, > RECFM=N,LRECL=256 > >1stc=65 >1stc=66 >1stc=67 >1stc=13 >1stc=10 >X1Again > > > >-- >Richard A. DeVenezia


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