Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SOC4 abend on field display

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Thu Nov 21, 2013 7:01 pm    Post subject: SOC4 abend on field display
Reply with quote

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

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Nov 21, 2013 7:06 pm    Post subject: Reply to: SOC4 abend on field display
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 21, 2013 7:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Thu Nov 21, 2013 7:21 pm    Post subject: Reply to: SOC4 abend on field display
Reply with quote

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

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Thu Nov 21, 2013 7:23 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 21, 2013 7:28 pm    Post subject:
Reply with quote

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

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us