MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SOC4 Error in MOVE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
shyamsaravan
Beginner


Joined: 12 May 2010
Posts: 44
Topics: 12
Location: India

PostPosted: Wed Nov 09, 2011 5:21 am    Post subject: SOC4 Error in MOVE Reply with quote

Hi;

I am receiving the SOC04 error.Please find the details
Code:

01 WS-RECV-PARM-FULL                   PIC X(51775). 
01 WS-RECV-PARM-NEXT REDEFINES      WS-RECV-PARM-FULL.   
   05 WS-ROW-CNT               PIC 9(4).     
   05 WS-RECV-PARM-NEXT-TABLE OCCURS 24 TIMES       
                                INDEXED BY REC-COUNT.
       10  WS-CNTL-IND            PIC X(01).     
       10  WS-POLICY-LOC          PIC X(05).     
       10  WS-POLICY-NO           PIC X(09).     
        :
        :

TOTAL LENGTH OF ONE RECORD IS 2132
so occurs 24 times 2132*24=51168

Input record like below(CONTAINS 3 Records..2 records for Update,1 Record for insert)
Code:

0003UFLORI123459789 .......UGTRLE234567891.......IWRTYU345678910......

0003 -->Row count

Front end program will send the input string to the database and the values going to be stored into the table

For the above input example the String length will be 2132*3=6396+4= 6400
Code:

LINKAGE SECTION.                                     
01  INPUT-DETAIL.                                   
    49  INPUT-STRING-LEN       PIC S9(04) USAGE COMP.
    49  INPUT-STRING          PIC X(51775).       


PROCEDURE DIVISION USING INPUT-DETAIL.
:
:

MOVE INPUT-STRING          TO  WS-RECV-PARM-FULL   

The Soc error indicates the above MOVE statemnt .Please help
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Wed Nov 09, 2011 8:46 am    Post subject: Reply with quote

S0C4. The abend code is S0C4. This is a protection exception. Your program is referencing storage that it is not authorized to access. Make sure that your program is not trying to access data beyond the length specified in INPUT-STRING-LEN. Try Reference Modification using INPUT-STRING-LEN as the length

Code:
MOVE INPUT-STRING(1:INPUT-STRING-LEN) TO WS-RECV-PARM-FULL

Make sure you initialize the WS table before the move.
Back to top
View user's profile Send private message
shyamsaravan
Beginner


Joined: 12 May 2010
Posts: 44
Topics: 12
Location: India

PostPosted: Wed Nov 09, 2011 8:58 am    Post subject: Reply with quote

Thanks for the reply..

I checked once..already,intialized the WS table values..

I will try with the MOVE statement changes and let you know..
Thanks again..
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Nov 09, 2011 12:05 pm    Post subject: Reply with quote

Hello,

The redefines in your first bit of code does not match the variable beibg redefined.

Quote:

Front end program will send the input string to the database and the values going to be stored into the table
I suspect the front end will provide the data to this program, not the database - unless there is something i misunderstand and you have not posted.

Why are there level 49s in the linkage section?
_________________
All the best,

di
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu Nov 10, 2011 12:26 pm    Post subject: Reply with quote

shyamsaravan,

Please check this topic

http://www.mvsforums.com/helpboards/viewtopic.php?p=25410#25410

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group