Problem COBOL - CICS Program gives ABEND 4038



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby enrico-sorichetti » Mon Jul 30, 2018 8:46 pm

You were already told NOT to use screen shots ...
the clutter the topic and waste space
and to use the code tags to post code :evil:

help people who spend their time helping You
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby rogerb » Mon Jul 30, 2018 9:45 pm

Good afternoon enrico.
I'm sorry, I'm new here and I'm still learning how to use this.
The code tags you mention are these ?

"[code][/code]"

Thank you,
Roger
rogerb
 
Posts: 65
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby Terry Heinze » Mon Jul 30, 2018 10:39 pm

Yes, when you "POSTREPLY", click on BBCode near the right edge of the screen to learn how to use the various formatting options.
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby rogerb » Mon Jul 30, 2018 10:57 pm

Good afternoon.
Thank you for your answers.
Roger
rogerb
 
Posts: 65
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby Robert Sample » Mon Jul 30, 2018 11:28 pm

This is NOT a CICS program -- because CICS COBOL programs NEVER have a FILE-CONTROL, nor a FILE SECTION, nor a SELECT. The fact that you have invalid coding in your program alone explains the U4038 ABEND. CICS handles all allocations / deallocations / opens / closes for the application program. https://www.ibm.com/support/knowledgece ... rview.html is a link to one version of the CICS Application Programming Guide which tells you how to code CICS programs. I recommend you read it very carefully.

These users thanked the author Robert Sample for the post:
rogerb (Tue Jul 31, 2018 10:38 pm)
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby Robert Sample » Mon Jul 30, 2018 11:57 pm

Do you mean that application programmers are not usually allowed to look at CEEMSG, or do you mean they do not usually know how to look at it? Anyway, the OP's code mentions Hercules as the source and object computer, so I would assume he should be able to look at CEEMSG.
Many sites restrict access to the CICS region jobs, but also many do not understand how to find and look at LE output. And since it is a violation of IBM's licensing for z/OS and CICS as well as copyright laws to run CICS on Hercules, I would hope the topic starter is not actually doing so. But if Hercules is running CICS, then certainly it should be possible to look at the LE output in the CICS job.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby rogerb » Tue Jul 31, 2018 12:59 am

Good afternoon.
When I studied COBOL, all the programs I created to use files always had FILE-CONTROL(with SELECT) and FILE SECTION.
In those programs, I even had to include instructions in the COBOL program to open and close the file.
Those programs weren't created for CICS.
I knew that the CICS controls the opening and closing of the file by itself, but I believed that FILE-CONTROL and FILE SECTION were always needed.
Today, I've seen in a page that a COBOL CICS program should not have ENVIRONMENT DIVISION, so I'm going to remove that entire division.
I'm also going to remove the FILE SECTION.
I hope this solves the problem.
Thank you all,
Roger
rogerb
 
Posts: 65
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby rogerb » Tue Jul 31, 2018 10:38 pm

Good afternoon to everybody.
Mr. Robert Sample nailed it.
After removing the ENVIRONMENT DIVISION and the FILE SECTION, the program executes and shows the map.
So the ABEND 4038 is solved.
Unfortunately now I have another problem, but because it is a problem with VSAM, I'm going to ask it in the VSAM section.
However I would like to ask for your advice on the matter of the storage violation.
In your opinion what is the best practice to avoid storage violation ?
I would like to give thanks to everybody.
Roger
rogerb
 
Posts: 65
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Problem COBOL - CICS Program gives ABEND 4038

Postby Robert Sample » Tue Jul 31, 2018 11:53 pm

In your opinion what is the best practice to avoid storage violation ?
Storage violations can be caused by a number of factors:
- accessing invalid memory
- mismatch between AMODE/RMODE of calling and called program
- table overflows
- DFHCOMMAREA length errors
- using pointers incorrectly

I'm not convinced that all storage violations can be avoided. It is more important to recognize them when they occur and where to look to fix them. And one of the nasty things about storage violations is that when one occurs, innocent programs might be affected and showing the violation when the actual culprit is a different program entirely.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Previous

Return to CICS

 


  • Related topics
    Replies
    Views
    Last post