IBM Z and LinuxONE IBM Z

IBM Z

The enterprise platform for mission-critical applications brings next-level data privacy, security, and resiliency to your hybrid multicloud.

 View Only
Expand all | Collapse all

abend 0C7 - not find error - HELP ME

  • 1.  abend 0C7 - not find error - HELP ME

    Posted Wed July 07, 2021 04:03 PM
    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
    ------------------------------


  • 2.  RE: abend 0C7 - not find error - HELP ME

    Posted Fri July 09, 2021 05:31 AM
    Can you share the actual code and the run time outputs.

    ------------------------------
    Julian Smallman
    ------------------------------



  • 3.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 10:32 AM

    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

     

     

    Sent from Mail for Windows 10

     






  • 4.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 10:15 PM
    thank you, it helped me a lot.

    ------------------------------
    Flavio Lima Silva
    ------------------------------



  • 5.  RE: abend 0C7 - not find error - HELP ME

    Posted Fri July 09, 2021 01:28 PM
    Dear Flavio,

    I find it really very hard to believe that there could be a S0C7 on that second move statement if there is no other code in between the two move statements.

    Can you post a more complete version of your code as well as some kind of proof that the S0C7 is really on that move?

    Cheers,

    Jantje.

    ------------------------------
    Jan Moeyersons
    Inetum
    n/a
    n/a
    ------------------------------



  • 6.  RE: abend 0C7 - not find error - HELP ME

    Posted Fri July 09, 2021 01:29 PM
    Can you try changing the declaration of those two packed decimal fields by removing the "V" (Assumed decimal) towards the end.

    05 WS-NUMBER-1  PIC S9(13) USAGE COMP-3.
    05 WS-NUMBER-2  PIC S9(13) USAGE COMP-3.

    ------------------------------
    Jeyaananthen Balasubramaniyan
    ------------------------------



  • 7.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 02:12 AM
    I have seen this before. Try the following which moves a signed zero to the first packed number:

    MOVE +0 TO WS-NUMBER-1
    MOVE WS-NUMBER-1 TO WS-NUMBER-2

    I am going to guess you are using an older version of COBOL?

    Chris

    ------------------------------
    Christopher Hanks
    Architect
    Citibank
    Jacksonville FL
    ------------------------------



  • 8.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 10:12 PM
    Yes. I'm using an older version of COBOL.

    ------------------------------
    Flavio Lima Silva
    ------------------------------



  • 9.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 09:34 AM

    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
    ------------------------------



  • 10.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 12, 2021 04:21 PM
    >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
    ------------------------------



  • 11.  RE: abend 0C7 - not find error - HELP ME

    Posted Tue July 20, 2021 08:02 PM
    Peter's comment is either wrong or the Compiler is wrong:

    I looked what Enterprise Cobol V6.3 generates: It does an MVC moving a decimal packed zero (x'0000000000000C0')

    That is not a valid packed decimal value. A valid value would be (x'00000000000000C'). 



    ------------------------------
    Wayne Bickerdike
    ------------------------------



  • 12.  RE: abend 0C7 - not find error - HELP ME

    Posted Wed July 21, 2021 07:48 AM
    Wayne
    Thanks catching that mistake. It is in fact a typo I overlooked.
    I wanted to write: It does an MVC moving a decimal packed zero (x'0000000000000C')

    ------------------------------
    --
    Peter
    ------------------------------



  • 13.  RE: abend 0C7 - not find error - HELP ME

    Posted Mon July 19, 2021 06:58 AM
    Hi Flavio,

    There's nothing wrong with the code as presented, so I think the abend may actually be taking place in the statement after the MOVE WS-NUMBER-1 TO WS-NUMBER-2.
    Take a look at that next statement and make sure the source fields are properly initialized.

    Bernie

    PS.  It always helps to let people know which compiler you're using.

    ------------------------------
    Bernie Rataj
    Senior Software Developer
    IBM Canada Ltd.
    Markham ON Canada
    https://www.ibm.com/marketplace/ibm-compilers
    ------------------------------