1. I think you need to check your input file first. Please use the option "COUNT" to check the exact number of lines in the flat file..
this will give you the number of records in the text file.
After you know the number of records try reading only the first "character" using @ just to check if the file is complete or not.
After getting done with this
Try changing the output parameters
SPACE=(CYL,(500,100),RLSE),
RECFM=FB, LRECL= 250,BLKSIZE=0
Try increasing the assigned cylinders "500" till the point it works....
make sure u put BLKSIZE=0...
This should surely help you out of your problem....
The file was not created in the mainframe. I used the mainframe only as a placeholder. The file was created in another server.
I understand your point.
But you need to narrow down your problem.
First try to figure out as to how many records in actual are there in Mainframe by using COUNT OPTION of MAINFRAME.
This is bcs sometimes it is possible that the complete file did not get FTP.
Once you are aware of the number of records in the flat file you know EXACTLY how many records are required to be read.
Then as others have specified CHECK use of MISSOVER/TRUNCOVER functions...
Now the problem narrows down to 2 things.
One some problem with SAS CODE.
TWO some problem with mainframe properties of output dataset.
ONE: Check for any missing ";" and also all code. Make sure SAS is not going into any indefinite loop.
TWO: I have encountered problems in mainframe while creating large datasets..In such case defining properties of the output dataset plays a vital role.You will have to go a little deep in to the mainframe commands like :
DISP=(XXXXX), UNIT=(XX,XX),SPACE,RECFM,LRECL,BLKSIZE etc....
I hope it helps
Park,
The fact that the data were not created on the mainframe may be key. If the step to upload the data to the mainframe is flawed, then it doesn't matter what you have done on download.
If the data started out as text (say on a unix box of some sort), then the user can upload it as text (rather than binary) and you can FTP it down as text. The FTP service will do the conversion from one coding schema to another.
Doc Muhlbaier
Duke
On your INFILE statement make certain you include the LRECL parameter. Michelle Burlew in her excellent book Reading External Data Files Using SAS notes that external files downloaded from EBCDIC system of fixed length do not contain End-of-Record (EOR) markers. As others have pointed out, you will need to determine the record length of the data set on the mainframe. Are you using $ebcdic informat for character variables and s370ff informat for numeric variables? As others have noted, check with the person who created the file to see if it contains binary or packed decimal data. I hope this solves your problem.
Charles
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: