View previous topic :: View next topic
|
Author |
Message |
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
Hi,
I am getting a SOC7 Abend here below, The bold is the area where I am getting the SOC7 abend.
01 WS-ALARM-PCT-AREA.
05 WS-ALARM-PCT PIC 9(09).
05 WS-ALARM-PCT-X REDEFINES WS-ALARM-PCT PIC X(09).
IF D303-CSAR-PREM2-AMT (CSAR-IDX) > ZEROS
MOVE D303-CSAR-PREM2-AMT (CSAR-IDX) TO WS-ALARM-PCT
MOVE WS-ALARM-PCT-X TO AV-ALMB
END-IF.
IF D303-CSAR-PREM3-AMT (CSAR-IDX) > ZEROS
MOVE D303-CSAR-PREM3-AMT (CSAR-IDX) TO WS-ALARM-PCT
MOVE WS-ALARM-PCT-X TO AV-ALMC
END-IF.
Copy book variable
10 D303-CSAR-PREM2-AMT PIC S9(09)V99 COMP-3.
10 D303-CSAR-PREM3-AMT PIC S9(09)V99 COMP-3.
can any one tell me what needs to be done. |
|
Back to top |
|
|
calspach
New User
Joined: 05 May 2006 Posts: 32 Location: USA
|
|
|
|
Only thing I would say is look at what is being put in D303-CSAR-PREM2-AMT before your move. If it's nothing, and you haven't initialized the table, you could have garbage in it, hence the soc7. |
|
Back to top |
|
|
calspach
New User
Joined: 05 May 2006 Posts: 32 Location: USA
|
|
|
|
Oh, and change the zeros to zero or 0. I think zeros is handled a bit different, it doesn't necessarily check it for numeric, just that it is greater than the hex equivalent of all zeroes. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
It is a good practice to double-check data that comes from external source:
Code: |
IF D303-CSAR-PREM2-AMT (CSAR-IDX) IS NUMERIC
MOVE D303-CSAR-PREM2-AMT (CSAR-IDX) TO WS-ALARM-PCT
ELSE
MOVE 0 TO WS-ALARM-PCT
END-IF. |
|
|
Back to top |
|
|
som_infotech
New User
Joined: 25 Feb 2006 Posts: 38 Location: chennai-india
|
|
|
|
is it working out for you |
|
Back to top |
|
|
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
Hi,
This Program is compiled through Endevor and we have some other programs which are going to compile manual. So I have not made changes to the manual programs its comeout with the data out of sync, ended with SOC7.
Now its working fine.
Thanks to all of you |
|
Back to top |
|
|
OldSystemProgrammer
New User
Joined: 12 May 2006 Posts: 7
|
|
|
|
Packed decimal (COMP-3) field handling need to use the digit "0". When you use the ZERO or ZEROES figurative constans the result of an operation will be unpredictable. The packed decimal fields do not like the figurativ constans. At a packed decimal field checking result is better with a following comparation.
IF (D303-CSAR-PREM2-AMT (CSAR-IDX) >= 0) AND
(D303-CSAR-PREM2-AMT (CSAR-IDX) <=9) THEN ........
ELSE ................
ENDIF |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
OldSystemProgrammer wrote: |
Packed decimal (COMP-3) field handling need to use the digit "0". When you use the ZERO or ZEROES figurative constans the result of an operation will be unpredictable. The packed decimal fields do not like the figurativ constans. |
Never seen or heard of such a problem. I would be very very surprised if this is correct. |
|
Back to top |
|
|
ioro
New User
Joined: 16 Jun 2006 Posts: 1
|
|
|
|
it seems correct.. |
|
Back to top |
|
|
|