Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 07 Dec 2007 @ 19:11:46 GMT


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


Subj:   Re: Import/Export data with decimal characters
 
From:   Anomy Anom

<-- Anonymously Posted: Fri, 7 Dec 2007 14:10 -->

The file is on Mainframe.

My define field of fastload is:

     DEFINE
         A    CHAR(1),

         B    CHAR(17),
         C    CHAR(11),
         D    CHAR(8),
         E    CHAR(1),
         F    CHAR(3),
         G    CHAR(5),
         H    CHAR(1),
         I    CHAR(6)

     DDNAME=INFILE;

File definition is:

     A    PIC X(1).
     B    PIC X(17).
     C    PIC S9(9)V9(2).
     D    PIC X(8).
     E    PIC X(1).
     F    PIC X(3).
     G    PIC X(5).
     H    PIC X(1).
     I    PIC 9(2)V9(4).

Some sample data is:

     D1FAFP31N27W2839530000040665I200712061CAN02103 002900
     D1FAFP31N97W3086400000033695B200712061CAN02103 002900
     D1FAFP34NX7W2577880000022234H20071206JCAN02006 005900
     D1FAFP34NX7W3543130000031615B200712061CAN02103 004900
     D1FAFP34NX7W3594290000007423E200712061CAN02103 000000
     D1FAFP34N07W3593120000022926I200712061CAN02103 002900
     D1FAFP34N17W1200750000013854A200712061CAN02103 004900
     D1FAFP34N17W3294000000028910A200712061CAN02103 000000
     D1FAFP34N17W3294450000022790{200712061CAN02103 000000
     D1FAFP34N27W1762660000014481D20071206JCAN02006 005900
     D1FAFP34N27W2811460000025012G200712061CAN02103 004900
     D1FAFP34N37W2808940000023237C200712061CAN02103 002900
     D1FAFP34N37W3088720000029836D200712061CAN02103 002900

The table definition (in which I am loading the data is):

     CREATE TABLE XYZ
       (
         A    CHAR(1),
         B    CHAR(17),
         C    DECIMAL(11,2),
         D    CHAR(8), /* NOT A DATE FORAMT */
         E    CHAR(1),
         F    CHAR(3),
         G    CHAR(5),
         H    CHAR(1),
         I    DECIMAL(6,4)
       )
     PRIMARY INDEX NONUNIQUE_KEY ( CKSV02_VIN_ID_C );

The file is curretly being processed using cobol scripts. I need to convert all the cobol programs into Teradata scripts.



     
  <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