View previous topic :: View next topic
|
Author |
Message |
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
Hi ,
In my cobol program while doing display i am getting SOC4 abend,
Here the field WS-ABC passed from previous source thru linkage section.
In previous source it has low values and in calling source i just put the
display for WS-ABC and it is giving SOC4 abend. In expedite i have observed, this field has "FETCH PROTECTED AREA" message.
Can you please let me know how to rectify this error.
Thanks and Regards,
Pavan Kumar.M |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
The program has not established addressability or has lost addressability. A S0C4 indicates a Protection Exception of which, there is no established field-address. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You did not post anything that would let us help you. At a minimum, we need to see the variable definition in the calling program for each variable in the CALL statement (and a verfiication that you placed these variables in the WORKING-STORAGE SECTION of your calling program), the CALL statement, the LINKAGE SECTION in the called program, and the PROCEDURE DIVISION USING statement in the called program.
At a guess, you have not used the standard COBOL linkage mechanism thus preventing your called program from accessing the calling program variables. |
|
Back to top |
|
|
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
below is the declartion.
In previous program the declartion is
02 ws-abc.
05 abc-length PIC S9(4) COMP.
05 FILLER PIC X(13998).
in calling program in linkage section:-
01 ls-abc.
05 ls-length pic s9(4) comp.
05 filler pic x(35).
thanks and Regards,
pavan Kumar.M |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
And on your PROCEDURE DIVISION USING statement in the called program as was requested?
And by now you should know how to use the code tags for posting code. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you placed the variable in the LINKAGE SECTION of the CALLING program, and not the CALLED program, how did you establish addressability for the LINKAGE SECTION of the CALLING program? Also, you did NOT post the PROCEDURE DIVISION USING statement of the CALLLED program as requested.
Furthermore, you almost certainly will have problems (such as S0C4 abneds) if your called program defines 37 bytes for the LINKAGE SECTION variable(s) and the calling program defines 14000 bytes. Linkage between calling and called programs need to match within 4096 bytes (assembler addressing limit). I have seen S0C4 abends before where the calling program passed 1500 bytes and the called program was expecting 10,000 bytes due to the mismatch between 1 address needed by the calling program and the 3 needed by the called program caused the S0C4. |
|
Back to top |
|
|
|