>The first MOVE is correct because the system will use ZAP instruction that initialize
That much depends on the compiler version.
I looked what Enterprise Cobol V6.3 generates: It does an MVC moving a decimal packed zero (x'0000000000000C0') from the static area to WS-NUMBER-01 for the first MOVE. And it generates a ZAP for the second MOVE.
------------------------------
--
Peter
------------------------------
Original Message:
Sent: Fri July 09, 2021 06:17 PM
From: Giovanni Bozzetti
Subject: abend 0C7 - not find error - HELP ME
Hello Flavio
I am not expert in COBOL, use more assembler, however seems the both fields are not initialized and they are COMP-3 that means PACKED they need signal
The first MOVE is correct because the system will use ZAP instruction that initialize and add zero and work ok has signal
The second move is trying to MOVE or ADD ZERO to a field not initialized them S0C7 any PACKED decimal field invalid not have correct format for PACKED
Use MOVE ZEROS for the second field after that you can use both fields or I don't remember correct you can initialize both fields with ZEROS in the COMP-3 declaration
And you don't need to use two instruction MOVE in the PROCEDURE
Hope this Help
Giovanni
TPF Software Inc
------------------------------
Giovanni Bozzetti
Original Message:
Sent: Wed July 07, 2021 01:02 PM
From: Flavio Lima Silva
Subject: abend 0C7 - not find error - HELP ME
I`m used in COBOL:
DCLGEN.
01 WS-DATA.
05 WS-NUMBER-1 PIC S9(13)V USAGE COMP-3.
05 WS-NUMBER-2 PIC S9(13)V USAGE COMP-3.
MOVE ZEROS TO WS-NUMBER-1
MOVE WS-NUMBER-1 TO WS-NUMBER-2 -> here the abend occurs. Help me.
------------------------------
Flavio Lima Silva
------------------------------