Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 29 Aug 2004 @ 09:40:40 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Converting Float In Cobol
 
From:   Capp.Luckett

Hi again:

I have never brought a data defined as a FLOAT into a Cobol program.

The data will never be a larger number than 999. Anyway. I am expecting data like to format like 98.6

I have tried the following as Cobol pictures:

     05 WS01-TEMPERATURE         PIC S9(010)V99 VALUE +0 COMP.  PP2 said unusable host variable
     05 WS01-TEMPERATURE         PIC S9(018)V99 VALUE +0 COMP. ""
      WS01-TEMPERATURE              PIC S9(009)v99 VALUE +0 COMP. ""
     05 WS01-TEMPERATURE         PIC S9(009) VALUE +0 COMP. PP2 warned about an overlfow but compiled.


I tried this DECIMAL (TEMPERATURE,3,2) AS TEMP into a PIC s(5)v99 comp-3

but the PP2 pre compiler errored it on (Temp).

Any suggestions would REALLY be welcome.


Capp Luckett



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023