IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to resolve U4038?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vk0022789

New User


Joined: 24 Sep 2008
Posts: 15
Location: hyderabad

PostPosted: Fri Oct 24, 2008 9:15 am
Reply with quote

Hi,

How to resolve the U4038 abend?

while i submit the JCL. I got his error.
Error :
--------
'' IGZ0035S There was an unsuccessful OPEN or CLOSE of file FACEFILE in program CA97611A at relative location X'0734'.

FILE STATUS nor an ERROR declarative were specified. The status code was 90."

But i checked my cobol program,i properly closed and opened my i/p and o/p file.

can u pls help me?

Thanks! icon_sad.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 24, 2008 9:35 am
Reply with quote

Hello,

Something is most likely wrong with your code or your jcl.

There is probably additional diagnostic info presented by this run.

If you post your select, fd, open, read and the jcl for the FACEFILE, we may be able to help.

Use the "Code" tag when posting this information.
Back to top
View user's profile Send private message
vk0022789

New User


Joined: 24 Sep 2008
Posts: 15
Location: hyderabad

PostPosted: Fri Oct 24, 2008 10:14 am
Reply with quote

Hi,
pls see the below structure
Code:
FILE-CONTROL.                                             
    SELECT INPUT-FACE-FILE      ASSIGN TO UT-S-FACEFILE.   
    SELECT OUT-CAV07B-FILE      ASSIGN TO UT-S-CAV0BDD.   
FD  INPUT-FACE-FILE                                         
    RECORDING MODE IS F                                     
    LABEL RECORDS ARE STANDARD                             
    BLOCK CONTAINS 0 RECORDS                               
    RECORD CONTAINS 1521 CHARACTERS                         
    DATA RECORD IS IN-FACE-REC.                             
                                                           
01  IN-FACE-REC              PIC X(1521).                   
                                                           
FD  OUT-CAV07B-FILE                                         
    RECORDING MODE IS F                                     
    LABEL RECORDS ARE OMITTED                               
    BLOCK CONTAINS 0 CHARACTERS                             
    RECORD CONTAINS 719 CHARACTERS                         
    DATA RECORD IS OUT-CAV07B-REC.                         
                                                           
01  OUT-CAV07B-REC           PIC X(719).                   


  READ INPUT-FACE-FILE INTO INPUT-FACE-REC AT END         
       MOVE 'Y' TO END-OF-FACE-SW                         
  END-READ.                                               


Thanks!

Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Fri Oct 24, 2008 11:24 am
Reply with quote

As dick mentioned,

Quote:
If you post your select, fd, open, read and the jcl for the FACEFILE, we may be able to help.


we can see select,fd,read .... but your open/close & jcl's missing ...

please post your jcl & use the code tags(preview before posting it icon_biggrin.gif ).... we can see nothing worng with part of code you have posted.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 24, 2008 1:30 pm
Reply with quote

Hi,

U4038 is generic abend, it can have multiple reasons behind. May be
- LRECL mismatch,
- some logical flaw
- when you dont write stoprun in your program then you will get this error..

And add status clause, variable and check the status after any I/O & post it back. For the time being, check these similar links on the same topic, might help:

ibmmainframes.com/viewtopic.php?t=28939&highlight=u4038
ibmmainframes.com/viewtopic.php?t=28780&highlight=u4038
ibmmainframes.com/viewtopic.php?t=31292&highlight=u4038
ibmmainframes.com/viewtopic.php?t=32916&highlight=u4038
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 24, 2008 3:43 pm
Reply with quote

how do you know that:
Quote:

But i checked my cobol program,i properly closed and opened my i/p and o/p file.


since you do not have:
Quote:

FILE STATUS nor an ERROR declarative were specified. The status code was 90


since a 90 is an attempted close on an unopened file, i would guess that the instruction at:
Quote:

at relative location X'0734'.


is a close.

you are making to many assumptions and your program logic is faulty.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 24, 2008 5:33 pm
Reply with quote

Quote:
CA97611A at relative location X'0734'.
Compile your program with the LIST or OFFSET options and this will tell you exactly which line of your program was being executed when the error occurred. No assumptions required!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
No new posts COBOL program error ENDED AT SVSCJES2... COBOL Programming 1
No new posts How to resolve SYNCH15! & SYNCH16... Compuware & Other Tools 0
No new posts How to resolve sqlcode of CALL ATTACH... DB2 3
Search our Forums:

Back to Top