BookmarkSubscribeRSS Feed
meenakshim
Fluorite | Level 6

I am trying to use 2 infile statements in a program , the first one to read the list of filenames and the second one is to read the data from the file read using first infile statement.

 

infile datalines truncover;
length fil2read $200.;
input fil2read $;
infile dummy filevar=fil2read end=done dlm="~" dsd missover ; 
do while(not done);
informat RECTY $1.;
input RECTY $ @;.

 

Down the line i am trying to use IF or WHEN statements to check for various condition.

when i an trying to execute this program it is always struck with data step processing message. 

 


NOTE: The infile DUMMY is:
Filename=C:\Users\Desktop\SASCode\sample.txt,
RECFM=V,LRECL=32767,File Size (bytes)=5722,
Last Modified=01Feb2019:05:00:40,
Create Time=13May2019:11:15:00

 

After this part in log , nothing is coming out. Only i can see the message like DATASTEP executing in the window bar. Kindly help where i went wrong???

 

I recently find it out that it is working good for one record in the second input file. When it comes to more than 1 record in the second input file (which is data file , not the filename file) it is looping. Kindly clarify.

2 REPLIES 2
Astounding
PROC Star
Remove the word "missover". Once you understand what it means, you will see that it is incompatible with using a trailing @
meenakshim
Fluorite | Level 6

I think , i found out the problem that my code was looping for not satisfied records. I have IF condition based on record type. I was checking for only few record type and just skipped others without handling it properly. Thanks for ur response.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 437 views
  • 2 likes
  • 2 in conversation