Abend U4038



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Abend U4038

Postby alok1984 » Tue Jun 18, 2013 3:59 pm

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.
alok1984
 
Posts: 5
Joined: Tue Jun 18, 2013 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Abend U4038

Postby Robert Sample » Tue Jun 18, 2013 4:52 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Abend U4038

Postby alok1984 » Tue Jun 18, 2013 6:12 pm

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.
alok1984
 
Posts: 5
Joined: Tue Jun 18, 2013 3:51 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Abend U4038

Postby Robert Sample » Tue Jun 18, 2013 6:45 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Abend U4038

Postby alok1984 » Wed Jun 19, 2013 10:02 am

Thanks for the reply... This resolves my query...
alok1984
 
Posts: 5
Joined: Tue Jun 18, 2013 3:51 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post