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
 

 

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: 2502
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: 7904
Location: Bellevue, IA

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: 1712
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: 7904
Location: Bellevue, IA

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
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
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 How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm


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