Page 1 of 1

Abend U4038

PostPosted: Tue Jun 18, 2013 3:59 pm
by alok1984
I am getting below error while running my code:

A file attribute mismatch was detected. File PROCESS-REPORT in program UINSWOC had a record length of 140
and the file specified in the ASSIGN clause had a record length of 139.


There was an unsuccessful OPEN or CLOSE of file PROCRPT in program UINSWOC.
File Status = 39.


Now issue is when I run the Program with side load it runs absolutely fine... but when I run it through Endevor compiled code I get above error.

Below is my FD section.

FD PROCESS-REPORT
RECORDING MODE IS F
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 0 RECORDS
RECORD CONTAINS 139 CHARACTERS
DATA RECORD IS REPORT-REC.
01 REPORT-REC PIC X(139).


Please let me know where is the issue.

Re: Abend U4038

PostPosted: Tue Jun 18, 2013 4:52 pm
by Robert Sample
The issue is that the Endevor compile options do not match the compile options you used. Contact your site support group and work with them on the issue. Have them look at the ADV compile option of COBOL.

Re: Abend U4038

PostPosted: Tue Jun 18, 2013 6:12 pm
by alok1984
ok.... That was my understanding as well....

My only question is that can compiler option really effect the file length??
I mean file length is always what we specify in FD and in JCL.

Re: Abend U4038

PostPosted: Tue Jun 18, 2013 6:45 pm
by Robert Sample
There is a link to IBM Manuals at the top of this page. Click on that link, find the COBOL Programming Guide manual, and read up on the ADV option. You will find that this option, when specified on the compile, adds one byte to the record length of files which have WRITE ... AFTER ADVANCING coded in the PROCEDURE DIVISION. The additional byte is for carriage control. This is, quite specifically, the problem your Endevor compile is showing you -- your program is using 140 bytes for the record length while the physical file is 139 bytes.

So to answer your question, yes, compile options can change file record length.

Re: Abend U4038

PostPosted: Wed Jun 19, 2013 10:02 am
by alok1984
Thanks for the reply... This resolves my query...