How to load data from a (15,2) table to (16,0) table

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
archup20
Member
Posts: 31
Joined: Thu Dec 09, 2010 9:53 am

How to load data from a (15,2) table to (16,0) table

Post by archup20 » Fri Dec 24, 2010 10:39 am

I have test table which has colums of size (15,2) and I have extract data from these Tables and load it into production table where the same colums are of size (16,0).How do I do this?.Thanks in advance.

do not use size in your posts - impolite
moved to db2 forum
dbz

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Dec 24, 2010 5:49 pm

one solution is .. unload data from source table..
convert the file using cobol program to 16,0 length.. based on business rules provided by the client.

load that file to target db2 table.
Natarajan
Chennai

archup20
Member
Posts: 31
Joined: Thu Dec 09, 2010 9:53 am

Post by archup20 » Wed Dec 29, 2010 4:30 pm

I used a JCL to convert 13,2 to 15,2 but from 15,2 I have to load to a 16,0 table.
I am not able to write a code for that. Can u please give an idea how to write that code

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Dec 29, 2010 5:18 pm

well you are going to truncate data if you go from 13,2 (or 15,2) to 16,0.
why do you want to do that?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others