Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 23 Apr 2006 @ 18:50:47 GMT


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


Subj:   Re: Creating copybook corresponding to Teradata Field layout
 
From:   Anomy Anom

<-- Anonymously Posted: Sunday, April 23, 2006 11:28 -->

This isn't a Teradata question but a COBOL question.

If the target PICture clause does not contain a sign but the source does (and all SQL numeric fields are signed) then COBOL implicitly invokes "absolute value" function. So always include S for COMP-anything fields. But if your fields are NULLable that may not avoid "data exception" problems - you need to use the NULL indicator flags as well.

If this is mainframe, storage match to SQL INTEGER is S9(9) COMP and SMALLINT is S9(4) COMP. But note that values in such a field may actually be larger (e.g. +65535 to -65536 for SMALLINT) so depending on TRUNC compile option you may need to use S9(10) and S9(5) respectively to avoid problems.



     
  <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