Help with DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON...



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Help with DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON...

Postby vicioprz » Fri Feb 10, 2017 2:54 am

I'm trying to run a simple program which does a select to a table into their copy variables.

The sql is as follows:
EXEC SQL                                      
     SELECT NRO_DOCU,                        
            CUENTA_DOCU,                      
            BANCO_DOCU,                      
            SUC_DOCU,                        
            C_POST_DOCU,                      
            IMPORTE_DOCU,                    
            CHEQ_NRO_CUENTA,                  
       INTO
            :COEL12,              (PIC S9(9) COMP.)
            :COEL16,              (PIC S9(17) COMP-3.)
            :COEL13,              (PIC S9(4) COMP.)        
            :COEL14,              (PIC S9(4) COMP.)        
            :COEL15,              (PIC S9(6) COMP-3.)      
            :COEL17,              (PIC S9(9)V99 COMP-3.)    
            :CHEQ-NRO-CUENTA, PIC S9(16) USAGE COMP-3.)
       FROM TABLE1, TABLE2
      WHERE CHEQ_NRO_CHEQUE = :COEL12        
        AND CHEQ_BCO_EMIS   = :COEL13        
        AND CHEQ_SUC_EMIS   = :COEL14        
        AND CHEQ_COD_POSTAL = :COEL15        
        AND FECHA           = :WS-TODAY
END-EXEC.                                    
 

and I'm getting error:
SQLCODE:      000310-
DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON DECIMAL DATA.


I guess something's going on with the "into" part of the select. something related to reg IMPORTE_DOCU (PIC S9(9)V99 COMP-3) but i'm lost trying to solve it.

Can someone help me out please.

All variables are declared or belong to a copy.

Thanks.

edited by moderator
vicioprz
 
Posts: 1
Joined: Sat Feb 04, 2017 12:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: Help with DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NON...

 

Re: Help with DECIMAL HOST VARIABLE OR PARAMETER CONTAINS NO

Postby NicC » Fri Feb 10, 2017 6:07 am

ppl?

What is the DDL for those columns? What is th COBOL definition? Can any of the columns be NULL?

As an aside, why are you selecting COEL12/13/14/15 when you already know their values?

Please use the code tags when posting code/data.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2820
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post