Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

S0C4 Abend when accessing the Linkage section variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Tue Sep 11, 2012 10:53 am    Post subject: S0C4 Abend when accessing the Linkage section variables
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 11, 2012 11:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Tue Sep 11, 2012 12:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Sep 11, 2012 1:30 pm    Post subject: Reply to: S0C4 Abend when accessing the Linkage section vari
Reply with quote

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
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Tue Sep 11, 2012 2:38 pm    Post subject: Reply to: S0C4 Abend when accessing the Linkage section vari
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 11, 2012 3:41 pm    Post subject:
Reply with quote

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
Code:
MAIN-EXIT.


should give you a compilation error...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 11, 2012 3:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 11, 2012 5:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us