View previous topic :: View next topic
|
Author |
Message |
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
Hi,
I have a CICS Program A which is triggered from the front end. Program A receives data from the front end and Links to Program B
Program A is receiving the data from the front end correctly but when Program A sets the address of the Linkage variables to the pointer defined under DFHCOMMAREA and tries to populate the linkage variables before the Link to Program B it abends with S0C4.
Here is the structure of the Linkage section of Program A
Code: |
LINKAGE SECTION.
01 DFHCOMMAREA.
05 LS-FUNCTION POINTER.
05 LS-REQUEST POINTER.
01 LS-PROGA-F-DATA PIC X(100).
01 LS-PROGA-R-DATA PIC X(1000).
01 LS-PROGB-F-DATA PIC X(500).
01 LS-PROGB-R-DATA PIC X(9000).
|
Procedure Divison of Prog A
Code: |
****Initialization
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGA-R-DATA TO LS-REQUEST
Display LS-PROGA-F-DATA
Display LS-PROGA-R-DATA
****Linking to Program B
SET ADDRESS OF LS-PROGB-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGB-R-DATA TO LS-REQUEST
****The below statement gives S0C4
MOVE 'XXXX' TO LS-PROGB-F-DATA
MOVE 'YYYY' TO LS-PROGB-R-DATA
EXEC CICS
LINK PROGRAM ('PROGRAMB')
COMMAREA(DFHCOMMAREA)
LENGTH (LENGTH OF DFHCOMMAREA)
RESP (WS-CICS-RESPONSE)
END-EXEC
|
I tried defining separate pointers for Program B but it resulted in the same error. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why don't we start with the PROCEDURE DIVISION USING statement of Program A?
now as far as these snipits of code:
Code: |
****Initialization
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGA-R-DATA TO LS-REQUEST
Display LS-PROGA-F-DATA
Display LS-PROGA-R-DATA
****Linking to Program B
SET ADDRESS OF LS-PROGB-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGB-R-DATA TO LS-REQUEST
****The below statement gives S0C4
MOVE 'XXXX' TO LS-PROGB-F-DATA
MOVE 'YYYY' TO LS-PROGB-R-DATA
|
the above is BS. if your programA was actually executing the initialization as well as the Linking to Program B code,
the DISPLAY statements would have returned a SOC4.
(i won't bother to comment about using DISPLAY in a CICS module)
and if you expect any help, provide the info that we ask for
and not the abbreviated stuff that you decide is important.
Why? If it was as important as you thought, you would not have a problem.
Since you do have a problem,
there is obviously something over which you have an incorrect understanding. |
|
Back to top |
|
|
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
dbzTHEdinosauer wrote: |
the above is BS. if your programA was actually executing the initialization as well as the Linking to Program B code,
the DISPLAY statements would have returned a SOC4.
|
The display statements are only put to tell that the code executed fine till that point.
Quote: |
(i won't bother to comment about using DISPLAY in a CICS module)
|
We do not have any debugging tool and hence displays in the CICS spool is our only debugging option
Quote: |
and if you expect any help, provide the info that we ask for
and not the abbreviated stuff that you decide is important.
Why? If it was as important as you thought, you would not have a problem.
Since you do have a problem,
there is obviously something over which you have an incorrect understanding. |
Not sure i understood the question here. If any other additional Information is needed Please let me know. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Debasis Misra,
You have been requested to show the PROCEDURE DIVISION USING
You have been told that the DISPLAY you have shown would have abended first if the MOVE you have shown abended, so you are not showing the actual code, but "selecting" what to show us.
You have to show the actual code. |
|
Back to top |
|
|
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
Thank you Bill and Dick. Sorry i did not understand the questions asked earlier. I did not use USING clause in the procedure Division. The display statements did not abend as i was able to see the results displayed in the spool.
Code: |
PROCEDURE DIVISION.
MAIN-SECTION
PERFORM INITIALIZE-DATA-PARA
PERFORM LINK-PROGB-PARA
PERFORM FINALIZATION-PARA
MAIN-EXIT.
EXIT.
INITIALIZE-DATA-PARA.
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGA-R-DATA TO LS-REQUEST
Display LS-PROGA-F-DATA
Display LS-PROGA-R-DATA
INITIALIZE-EXIT.
EXIT.
LINK-PROGB-PARA.
SET ADDRESS OF LS-PROGB-F-DATA TO LS-FUNCTION
SET ADDRESS OF LS-PROGB-R-DATA TO LS-REQUEST
****The below statement gives S0C4
MOVE 'XXXX' TO LS-PROGB-F-DATA
MOVE 'YYYY' TO LS-PROGB-R-DATA
EXEC CICS
LINK PROGRAM ('PROGRAMB')
COMMAREA(DFHCOMMAREA)
LENGTH (LENGTH OF DFHCOMMAREA)
RESP (WS-CICS-RESPONSE)
END-EXEC
LINK-EXIT.
EXIT.
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
change this:
Code: |
INITIALIZE-DATA-PARA.
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION |
to this:
Code: |
INITIALIZE-DATA-PARA.
IF EIBCALEN > 0 THEN DISPLAY 'YES' ELSE DISPLAY 'NO'
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION |
and let us know what is displayed, please.
also, without a period between
Code: |
PERFORM FINALIZATION-PARA |
and
should give you a compilation error... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
change this:
Code: |
INITIALIZE-DATA-PARA.
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION |
to this:
Code: |
INITIALIZE-DATA-PARA.
DISPLAY LS-FUNCTION, LS-REQUEST
SET ADDRESS OF LS-PROGA-F-DATA TO LS-FUNCTION
MOVE '1' TO LS-PROGA-F-DATA
|
and this:
Code: |
LINK-PROGB-PARA.
SET ADDRESS OF LS-PROGB-F-DATA TO LS-FUNCTION |
to this:
Code: |
LINK-PROGB-PARA.
DISPLAY LS-FUNCTION, LS-REQUEST
SET ADDRESS OF LS-PROGB-F-DATA TO LS-FUNCTION |
NOTE BIEN:
i have added
MOVE '1' TO LS-PROGA-F-DATA
since I originally posted. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if the compiler tells you to try again when you
DISPLAY LS-FUNCTION, LS-REQUEST
redefine each as a PIC S9(8) COMP.
and then display the references to the COMP fields. |
|
Back to top |
|
|
|