View previous topic :: View next topic |
Author |
Message |
shyamsaravan Beginner
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
|
Posted: Wed Nov 09, 2011 5:21 am Post subject: SOC4 Error in MOVE |
|
|
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 |
|
|
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Wed Nov 09, 2011 8:46 am Post subject: |
|
|
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 |
|
|
shyamsaravan Beginner
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
|
Posted: Wed Nov 09, 2011 8:58 am Post subject: |
|
|
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 |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Nov 09, 2011 12:05 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|