I am encountering soc7 can you please help me to solve this.
I am not sure if this is a data problem or I am not handling the comp-3 properly.
error-> CEE3207S The system detected a data exception (System Completion Code=0C7).
Details->
I am having an input file of fixed length (declared as X(1020) ) and
in that I have 4 comp-3 variables starting at location 68 to a length of 28( 7 Bytes each).
Declaration of each comp-3 is PIC S9(10)V9(2) COMP-3.
so it like this
var1 PIC S9(10)V9(2) COMP-3. 68-74
var2 PIC S9(10)V9(2) COMP-3. 75-81
var3 PIC S9(10)V9(2) COMP-3. 82-88
var4 PIC S9(10)V9(2) COMP-3. 89-95
i am having three input records as below. This is the taken using HEX ON.
input-> record 1,2 and 3 from position 68 to length of 28 are as below
I need to get total sum of var1, var2, var3 and var4 respectively
for all the input records above.
program.
working-storage.
01 WS-var-TOT.
05 WS-var1 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var2 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var3 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var4 PIC S9(10)V9(2) COMP-3 value zeroes.
01 WS-var-TOTALS.
05 WS-var5 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var6 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var7 PIC S9(10)V9(2) COMP-3 value zeroes.
05 WS-var8 PIC S9(10)V9(2) COMP-3 value zeroes.
procedure division.
move zeroes
to WS-var-TOT
loop starts ( read file until eof)
Read file.
move file-record(68:28) to ws-var-totals.
move zeroes
to ws-var-totals
add ws-var1 to ws-var5 ( getting Soc 7 here by looking at hex loc)
add ws-var2 to ws-var6
add ws-var3 to ws-var7
add ws-var4 to ws-var8
loop-end
I am also attaching the input records as attachment.