DATA Step, Macro, Functions and more

Call Execute producing truncated output

Reply
N/A
Posts: 0

Call Execute producing truncated output

Hi all,

I have the below piece of code,

%MACRO COPYREP(RNAME);
DATA OMDATA;
FILENM=&RNAME;
INFILE DUMMY FILEVAR=FILENM END=DONE MISSOVER LENGTH=LINELEN;
DO WHILE (NOT DONE);
INPUT @1 REC $VARYING200. LINELEN;
OUTPUT;
END;

DATA _NULL_;
SET OMDATA;
FBREC = SUBSTR(REC,2,133);
FILE OUT1 NOTITLES NOPRINT;
PUT @1 FBREC $CHAR133.;
%MEND;

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.
Valued Guide
Posts: 2,177

Re: Call Execute producing truncated output

Posted in reply to deleted_user
are you running SAS on z/OS?
N/A
Posts: 0

Re: Call Execute producing truncated output

Yes...
Valued Guide
Posts: 2,177

Re: Call Execute producing truncated output

Posted in reply to deleted_user
then provide a bit more log information, even the jes joblog [which is where I imaging a B37 equivalent "out-of-space" message might appear.]
Frequent Contributor
Posts: 106

Re: Call Execute producing truncated output

Posted in reply to deleted_user
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:
[pre]
data _null_ ;
infile report print ;
file outfile noprint ;
input ;
put _infile_ ;
run ;
[/pre]
N/A
Posts: 0

Re: Call Execute producing truncated output

Posted in reply to Robert_Bardos
It does not produce any error, is what is the problem.
Super Contributor
Super Contributor
Posts: 3,174

Re: Call Execute producing truncated output

Posted in reply to deleted_user
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.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 6 replies
  • 148 views
  • 0 likes
  • 4 in conversation