Getting abend ABENDU0476 in COBOL-IMS DB program



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Getting abend ABENDU0476 in COBOL-IMS DB program

Postby jithinraghavan » Wed May 09, 2012 5:18 pm

Hi,

I am getting ABENDU0476 for a job which using COBOL-IMS program.
It contains the following statement in the COBOL program

PROCEDURE DIVISION.
ENTRY 'DLITCBL' USING IO-PCB,
IO-PCB2,
MED-PCB.

When I changed this into
PROCEDURE DIVISION USING IO-PCB
IO-PCB2
MED-PCB.

Then the job went fine. Could you please tell me the issue in the first statement?
jithinraghavan
 
Posts: 5
Joined: Wed Aug 25, 2010 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby Akatsukami » Wed May 09, 2012 6:23 pm

Why did you think that the ENTRY statement would be necessary?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby jithinraghavan » Wed May 09, 2012 7:33 pm

I don't think ENTRY statement is necessary. But My question is why the abend is coming when I put the ENTRY statement?
jithinraghavan
 
Posts: 5
Joined: Wed Aug 25, 2010 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby Akatsukami » Wed May 09, 2012 7:42 pm

jithinraghavan wrote:I don't think ENTRY statement is necessary. But My question is why the abend is coming when I put the ENTRY statement?

Simply, because the parameters (USING...) applied to the alternate and incorrect entry point, not to the application program. When the program was called, it did not receive the PCB address; this caused the abend.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby jithinraghavan » Wed May 09, 2012 8:12 pm

Second time I just removed ENTRY 'DLITCBL' and the job works fine. So you mean to say we are not supposed to code ENTRY 'DLITCBL' USING after PROCEDURE DIVISION for an COBOL-IMS program?Instead use only USING?
jithinraghavan
 
Posts: 5
Joined: Wed Aug 25, 2010 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby BillyBoyo » Wed May 09, 2012 8:16 pm

If you put all the same parameters on the ENTRY USING and PROCEDURE DIVISION USING then the program will work (as far as getting the linkage, anyway) whether called as the main program or called as the entry. If you don't have anything on the PROCEDURE DIVISION USING then if you call it as the prorgam name, no linkage will be established. The ENTRY statement is not executable, the compiler generates code to avoid it unless the ENTRY is used in a CALL.

If the ENTRY is not needed, get rid of it.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby Akatsukami » Wed May 09, 2012 8:25 pm

jithinraghavan wrote:Second time I just removed ENTRY 'DLITCBL' and the job works fine. So you mean to say we are not supposed to code ENTRY 'DLITCBL' USING after PROCEDURE DIVISION for an COBOL-IMS program?Instead use only USING?

That is correct.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby jithinraghavan » Wed May 09, 2012 9:04 pm

Thanks for your replies...
jithinraghavan
 
Posts: 5
Joined: Wed Aug 25, 2010 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby Ed Goodman » Thu May 10, 2012 12:34 am

You guys just blew my mind. Every IMS program I've ever used/written has the ENTRY format. I didn't even know that it was optional.

When we get U0476 around here, it's because the link-edit step did not have the
LIBRARY SDFSRESL(CBLTDLI) or
ENTRY DLITCBL
entries from the IMS PROCLIB(CBLTDLI) member.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: Getting abend ABENDU0476 in COBOL-IMS DB program

Postby Akatsukami » Thu May 10, 2012 12:49 am

Ed Goodman wrote:You guys just blew my mind. Every IMS program I've ever used/written has the ENTRY format. I didn't even know that it was optional.

I've never seen one that did use it. In fact, local standards forbid the use of alternate entry points (not that my shop actually enforces standards or anything like that, but no one has seen a need to break that one).
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post