INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

load a usage comp field from a COBOL/DB2 flat file into Teradata

load a usage comp field from a COBOL/DB2 flat file into Teradata

load a usage comp field from a COBOL/DB2 flat file into Teradata

(OP)
I have an input file that was created in a COBOL program that extracted the data from DB2.  The file layout is as follows:
01  DCLGFTRSTY.                                            
    10 GFTRSTY-RGS-ID       PIC S9(9) USAGE COMP.          
    10 GFTRSTY-LOC-NBR      PIC S9(9) USAGE COMP.          
    10 GFTRSTY-OCCN-ID      PIC X(1).                      
    10 GFTRSTY-APP-ID       PIC X(1).                      
    10 GFTRSTY-RFRL-ID      PIC X(1).                      
    10 GFTRSTY-MTHD-ID      PIC X(1).                      
    10 GFTRSTY-RGS-DTE      PIC X(10).                     
    10 GFTRSTY-PREFRNC-F    PIC X(1).                      
    10 GFTRSTY-PURCH-F      PIC X(1).                      
    10 GFTRSTY-COMNT-F      PIC X(1).                      
    10 GFTRSTY-SUPPR-ADDR-F  PIC X(1).                     
    10 GFTRSTY-RGS-OCCN-DTE  PIC X(10).                    
    10 GFTRSTY-RGS-OCCN-DTE-F  PIC X(1).                   
    10 GFTRSTY-RGS-STAT     PIC X(1).                      
    10 GFTRSTY-RGS-STAT-DTE  PIC X(10).                    
    10 GFTRSTY-RGS-STAT-COMNT  PIC X(80).                  
    10 GFTRSTY-NBR-OF-GUESTS  PIC S9(4) USAGE COMP.        
    10 GFTRSTY-RGS-INTERNET-F  PIC X(1).                   
    10 GFTRSTY-RGS-INTERNET-PWRD  PIC X(20).               
    10 GFTRSTY-RGS-VAL-ACTL  PIC S9(5)V9(2) USAGE COMP-3.  
    10 GFTRSTY-RGS-VAL-POT  PIC S9(5)V9(2) USAGE COMP-3.    
    10 GFTRSTY-RGS-VAL-TO-CMPLT  PIC S9(5)V9(2) USAGE COMP-3.
    10 GFTRSTY-UNMTCHD-PURCH-F  PIC X(1).                    
    10 GFTRSTY-LAST-UPD-TS  PIC X(26).                       
    10 GFTRSTY-LAST-UPD-USER-ID  PIC X(32).                  
    10 GFTRSTY-PROG-NAME    PIC X(10).                       
    10 GFTRSTY-BRLP-ENROL-STAT  PIC X(1).                    
    10 WS-DDW-DIV-NBR          PIC  9(04).
    10 WS-DDW-STORE-NBR        PIC  9(09).


I need help with setting up my .layout section for the load into Teradata for the comp fields.

Can someone help me?

RE: load a usage comp field from a COBOL/DB2 flat file into Teradata

Is this a "Signed Zoned Decimal"?

Then "PIC S9(9)" is probably FORMAT '9(9)S'

Check the manuals for details:
SQL Reference: Data Types and Literals
Chapter 9: Output Format Phrases
FORMAT Phrase and NUMERIC Formats

Dieter

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close