See: (infile statement windows) http://support.sas.com/documentation/cdl/en/hostwi n/63047/HTML/default/viewer.htm#chfnoptfmain.htm The filename option on the infile statement will define a variable containing the name of the file being read. reclen ; run ; ================================================================================================ /** Result **/ 1695 %let path1 = C:\work\test\final output; 1696 1697 filename DIRLIST pipe 'dir "&path1." /B'; 1698 data dirlist ; 1699 1700 length buffer $256 Message 1 of 3 (1,694 Views) Reply 0 Likes WesBarris Contributor Posts: 44 Re: Error when trying to read filenames Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight COM> Date: 2008-05-16 13:34:12 Message-ID: 7367b4e20805160634k34b53657x2f098744acdd6b4a () mail ! Check This Out
The minimum record length was 3. Try that and see if it works.- Hide quoted text - > > > > - Show quoted text - > > I'm afraid I don't understand what you're getting at. I can run a directory list using the filename statement, so the pipe is working correctly. Check out the sample code here: http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000209687.htm. https://communities.sas.com/t5/Base-SAS-Programming/Error-when-trying-to-read-filenames/td-p/15390
value $100. ; infile envs truncover length=l lrecl=10000 col=c dlm= '='; input name @ ; if c>=l then value=' '; else value = substr( _infile_, c ) ; check = If I drag the SAS shortcut that was pinned to the startmenu to the desktop and start SAS from that, it fails with the error. When some blank cards or length failures are occuring and the name is incorrect than: - you do not get the message on the illegal failing name (P: ....) - it Finacial_Class $17. ; output; end; run; Join this group Popular White Paper On This Topic Virtual Training Comparison Guide 1Reply Best Answer 0 Mark this reply as the best answer?(Choose carefully,
Medicaid_Id $10. More Business Intelligence Groups Your account is ready. Something's different > about the pipe, and I don't know what it is. > [prev in list] [next in list] [prev in thread] [next in thread] Configure | About | Mem_Last_Name $90.
NOTE: 0 records were read from the infile DIRLIST.But - if I change the space in the name to an underscore - ( input_lib ) - then the program works OK. Message 5 of 5 (96 Views) Reply 0 Likes « Message Listing « Previous Topic Next Topic » Post a Question Discussion Stats 4 replies 02-27-2012 10:45 AM 299 views 0 I need to understand the reason for this error so that I can modify the code to run no matter how sas is started. you could try here reclen ; run ; Message 4 of 5 (181 Views) Reply 0 Likes OS2Rules Super Contributor Posts: 358 PROC IMPORT Problem Options Mark as New Bookmark Subscribe Subscribe to RSS Feed
The SAS group is no longer active. If that fails that error is displayed. Mem_Initial $7. If quotes are expected in any > > case then use an extra set of the other type of quote around the file > > name.
NOTE: 0 records were read from the infile DIR. https://communities.sas.com/t5/General-SAS-Programming/Piping-directory-data-from-a-UNC/td-p/84382/page/2 I'd find it > helpful if you could post an example of what you mean. > > If you look at what I posted, you'll see that the fully qualified name Mem_DOB mmddyy10. reclen ; run ; ================================================================================================ /** Result **/ 1695 %let path1 = C:\work\test\final output; 1696 1697 filename DIRLIST pipe 'dir "&path1." /B'; 1698 data dirlist ; 1699 1700 length buffer $256
reclen ; run ; ================================================================================================ /** Result **/ 1695 %let path1 = C:\work\test\final output; 1696 1697 filename DIRLIST pipe 'dir "&path1." /B'; 1698 data dirlist ; 1699 1700 length buffer $256 http://wx2me.com/sas-error/sas-error-read-access-violation-in-task-tabulate.php The only downside is no support for wildcards in DOPEN, but this is easily supported with prxmatch.Untested:data dirlist; length filename $200; rc=filename("dir","c:\temp"); did=dopen("dir"); do i=1 to dnum(did); filename=dread(did,i); if prxmatch("/^test.*\.sas/io",filename) then PCP_Sys_ID best32. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters.
Your cache administrator is webmaster. ERROR MESSAGE - " Physical file does not exist, C:\Documents and Settings\....txt. Prov_First_Name $10. this contact form Generated Thu, 27 Oct 2016 11:24:17 GMT by s_wx1157 (squid/3.5.20)
reclen ; run ; View solution in original post Message 4 of 5 (180 Views) Reply 0 Likes All Replies art297 Super Contributor Posts: 5,768 PROC IMPORT Problem Options Mark as Showing results for Search instead for Do you mean Find a Community Communities Welcome Getting Started Community Memo Community Matters Community Suggestion Box Have Your Say SAS Programming Base SAS Programming Maybe my response to Peter.C gives a lead...
Message 1 of 5 (298 Views) Reply 0 Likes Accepted Solutions Solution 02-27-2012 11:34 AM art297 Super Contributor Posts: 5,768 Re: PROC IMPORT Problem Options Mark as New Bookmark Subscribe Subscribe Data never sleeps Message 2 of 4 (56 Views) Reply 0 Likes Solution 07-16-2012 07:32 AM ScottBass Super Contributor Posts: 311 Re: SAS 9.2: Macro variable with quotes is not working. I didn't check the output file. On 5/15/08, Lou
The SAS group is no longer active. 5230074 Related Discussions Reading a SAS Code File Through Pipe Reading Mainfram data into SAS Get File Dates From A External Files (Using Unix) Message 7 of 9 (349 Views) Reply 0 Likes Solution 10-25-2011 07:05 AM Peter_C Super Contributor Posts: 2,010 windows 7 pipe problem Options Mark as New Bookmark Subscribe Subscribe to RSS Comments $74. http://wx2me.com/sas-error/sas-error-write-access-violation-in-task.php Double up on the double quotes is working fine.
That is why you are getting an error on C: (personal home) and the real missing file is on P: Top For discussions on SAS please visit the Business Intelligence - NOTE: Compressing data set WORK.DIRLIST increased size by 100.00 percent. Here is what thelog says:NOTE:The infile H is: Unnamed Pipe Access Device, PROCESS=hostname,RECFM=V,LRECL=256myhostnameNOTE: 1record was read from the infile H. reclen ; 1694 run ; NOTE: The infile DIRLIST is: Unnamed Pipe Access Device, PROCESS=dir "C:\work\test\final output" /B, RECFM=V,LRECL=256 NOTE: 2 records were read from the infile DIRLIST.
As you stated Windows need the directory-filename to see with the double quotes ". Pinning SAS to the task bar resolves the issue. All product names are trademarks of their respective companies.