Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CICS called COBOL module fails with Program Interrupt

Status
Not open for further replies.

rss0213

Programmer
Jul 12, 2007
58
US
Hi. I have an MQ I-O routine that I want to be callable from a batch or CICS program. So I have coded my first CICS calling module as such:

Code:
CALL  MQ-API-PROGRAM  USING  MQ-DATA-AREA.

The LINKAGE SECTION and PROCEDURE DIVISION header of the called MQ module are coded as such:

Code:
 LINKAGE SECTION.
*.---------------------------------------------------------------.
*|           L  I  N  K  A  G  E      S  E  C  T  I  O  N        
*'---------------------------------------------------------------'
 01  MQ-DATA-AREA.
                                     COPY MQMS.
     EJECT
 PROCEDURE DIVISION USING MQ-DATA-AREA.

The 'program interrupt' error I'm getting (CEE3200S error) occurs when the called module moves zeroes to one of the linkage section's data fields. This is the exact line of code where the program interrupt occurs:

Code:
MOVE ZEROS  TO  MQ-RETURN-CODE.

My question is: why is this happening? I've done some research on the web and the closest thing I can find appears to be with the compiler options. I have both modules compiled with the RENT option, AMODE(31), RMODE(ANY). So I'm not sure what else to check to resolve this. Any assistance would be greatly appreciated!

Thanks!
Scott
 
What was the interrupt code (from the ceedump)?

What might have corrupted the address of the linkage section?

What else does the code do to fields immediately before the linkage section?
 
papadba:

interruption code is 0010.

I have no idea what could have corrupted the address of the linkage section. The MOVE statement where the interrupt occurs is the third statement executed in the procedure division. The first two statements are a PERFORM and a DISPLAY. So no other DATA DIVISION fields are updated before the MOVE statement is executed and the program interrupt occurs.

Thanks!
Scott
 
What is done in the PERFORM?

What happens if some "stub" is called? Replace the MQ program with a small bit of code that will only be entered and exited with no MQ (or any other) work done. Use the same name as the MQ program so the calling program needs no changes. Use the same linkage section as the MQ program uses.

If the stub works correctly, then add the MOVE that currently fails and see what happens.

 
papadba, I resolved this. I had used the CICS pre-compiler with the CALLED program, which replaced my PROCEDURE DIVISION statement in the program with "PROCEDURE DIVISION USING DFHCOMMAREA", so my linkage was not addressable because it didn't exist!

Thanks for all the feedback. Lesson learned!

Thanks!
Scott
 
Good to hear it is working - thank you for posting your solution[pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top