All Forums General
barani_sachin 141 posts Joined 01/12
05 Nov 2014
Converting Mainframe Copybook's to TD DDL

Is there tool/utilities to convert mainframe copybooks to Teradata DDL's? 
Even just getting the field names and their equivalent Java data typw will do. Thanks.

ulrich 816 posts Joined 09/09
05 Nov 2014

There shouldn't be a big deal to extract this and map this for simple copy books - where they can be also quite comprex (e.g. defining different record layouts in one copy book) and in this case it will be more of a challange.
is indicating that not all data types can be mapped to java data types...
can you share one example?
Are you expecting this for free?

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

barani_sachin 141 posts Joined 01/12
05 Nov 2014

Yes, the copybooks includes the layput of header, trailer & detail record.
Below is one sample copybook

 01 DUMMYPT-INPUT-AREA.                                                  
          05 DUMMYPT-RECORD-TYPE           PIC X(01).                          
             88 DUMMYPT-HEADER-RECORD      VALUE '1'.                          
             88 DUMMYPT-DETAIL-RECORD      VALUE '2'.                          
             88 DUMMYPT-TRAILER-RECORD     VALUE '9'.                          
          05 DUMMYPT-RECORD                PIC X(89).                          
          05 DUMMYPT-HEADER REDEFINES DUMMYPT-RECORD.                         
             10 DUMMYPT-FILENAME           PIC X(11).                          
                88 DUMMYPT-BALMERAL        VALUE 'ADJCODE    '.                
             10 DUMMYPT-SEQUENCE-NO        PIC X(09).                          
             10 DUMMYPT-PRTR-NAME          PIC X(03).                          
                88 DUMMYPT-BALMERAL        VALUE 'RIT'.                        
             10 DUMMYPT-GEN-DATE           PIC X(08).                          
             10 DUMMYPT-FILE-DATE          PIC X(08).                          
             10 FILLER                      PIC X(50).                          
          05 DUMMYPT-DETAIL REDEFINES DUMMYPT-RECORD.                         
             10 DUMMYPT-JUSTAD-CODE        PIC X(04).                          
             10 DUMMYPT-JUSTAD-TRAN-DESCR  PIC X(20).                          
             10 DUMMYPT-FEE-ID             PIC X(06).                          
             10 DUMMYPT-STMNT-LINE-CD      PIC X(01).                          
             10 DUMMYPT-JUSTAD-ACTIVE-IND  PIC X(01).                          
             10 DUMMYPT-DELTA-FLAG         PIC X(01).                          
             10 FILLER                      PIC X(56).                          
          05 DUMMYPT-TRAILER REDEFINES DUMMYPT-RECORD.                        
             10 DUMMYPT-RECORD-COUNT       PIC X(15).                          
             10 FILLER                      PIC X(74).  

Willing to write my own utility, before that want to just check is there any free tool available for this already. If its open source i can use that in my application will simplify my work.

You must sign in to leave a comment.