INFILE DUMMY FILEVAR=FILENM END=DONE MISSOVER LENGTH=LINELEN;
DO WHILE (NOT DONE);
INPUT @1 REC $VARYING200. LINELEN;
FBREC = SUBSTR(REC,2,133);
FILE OUT1 NOTITLES NOPRINT;
PUT @1 FBREC $CHAR133.;
Now the problem is SAS LOG says,
69161 RECORDS WERE WRITTEN TO THE FILE OUT1.
THERE WERE 69161 OBSERVATIONS READ FROM THE DATA SET WORK.OMDATA.
But when I actually check the output file, it contains lesser number of records (68010).
When I increase the space of the file OUT1 and run the code, it works fine. But my question is, if there was not enough space in the output file, it should have produced an error, but it is not. Please advise.
You are making this way too hard. If your goal is to get rid of the print control character in column one use something like this:
data _null_ ;
infile report print ;
file outfile noprint ;
put _infile_ ;
To gain assistance from this forum, you will be best served by revealing all SAS code executed, in the form of your "complete" SAS-generated log output pasted into your post-reply. Or possibly ask a colleague to offer another set of eyes into reviewing your problem/error, as an alternative.
Also, consider browsing each of your files, side-by-side, to identify at what point in the file you do or do not see what you expect in the output file.