DB2 For I Parallel Data Load
DB2 For I Parallel Data Load
We would like to load many tables as fast as possible without locking our GUI for
an extended timeframe.
Page 1 of 10
1/3/2011 4:49:44 PM
Page 2 of 10
1/3/2011 4:49:44 PM
Page 3 of 10
1/3/2011 4:49:44 PM
*
*
*
*
*
*
*
*
*
Page 4 of 10
1/3/2011 4:49:44 PM
Page 6 of 10
1/3/2011 4:49:44 PM
==================================================================
Program name...: ACS_i5LOAD
Purpose........: Load database tables from delimited files
Programmer.....: Thomas and Victoria Wolfe
Create Date....: December 7, 2010
*
*
*
*
*
*
Maintenance Log:
*
*
PGMR
SEARCH
DATE
DESC. OF CHANGE
*
*
================================================================== *
/COPY qCPYSRC,ACS_H_PGM
/COPY QPRTSRC,ACSGENESIS
d
d
d
d
d
d
i5_LoadType
i5_NullInd1
sqlStateCode
functionName
specificName
errorMessage
s
s
s
s
s
s
10
5i 0
5
517
128
70
d i5_ProdLoad
10
d message
d command
s
s
80
2048
inz(' ')
inz(*Blank)
inz(' ')
* ================================================================== *
* Common program status information data structure (SDS)
*
* ================================================================== *
/COPY QCPYSRC,ACS_SQLOPT
* ================================================================== *
* i5 DB2 Parallel Data Loader: Submit CpyFrmImpF command to batch
*
* ================================================================== *
c
*entry
plist
c
parm
i5_LoadType
c
parm
i5_NullInd1
c
parm
sqlStateCode
c
parm
functionName
c
parm
specificName
c
parm
errorMessage
/Free
Monitor;
// Global error handler
sqlStateCode = '00000';
If i5_NullInd1 = 0;
i5_ProdLoad = i5_LoadType;
Select;
When %xlate(upper: lower: %trim(i5_ProdLoad)) = '*sybase';
If syb_i5_LoadFromDelimitedFile(%trim(syB_Context):
Page 7 of 10
1/3/2011 4:49:44 PM
Page 8 of 10
1/3/2011 4:49:44 PM
Page 9 of 10
1/3/2011 4:49:44 PM
References
Writing Stored Procedures in RPG MC Press Online 15 January 2008, Susan Gantner
http://www.mcpressonline.com/programming/rpg/writing-stored-procedures-in-rpg.html
Stored Procedures, Triggers, and User-Defined Functions on DB2 UDB for iSeries
http://www.redbooks.ibm.com/abstracts/sg246503.html
DB2 UDB for AS/400 Object Relational Support
http://www.redbooks.ibm.com/abstracts/sg245409.html
Cross-Platform DB2 Stored Procedures: Building and Debugging
http://www.redbooks.ibm.com/redbooks/pdfs/sg245485.pdf
DB2 9 for z/OS Stored Procedures: Through the Call and Beyond
http://www.redbooks.ibm.com/abstracts/sg247604.html
DB2 Java Stored Procedures: Learning by Example
http://www.redbooks.ibm.com/redbooks/pdfs/sg245945.pdf
Modernizing IBM eServer iSeries Application Data Access A Roadmap Cornerstone
http://www.redbooks.ibm.com/abstracts/sg246393.html
Improving Stored Procedure Performance 18 December 2009, Kent Milligan, Jarek
Miszczyk, and Gene Cobb http://tinyurl.com/2ayskqo
The API Corner MC Press online: Automating Recovery (or Keeping the Help Desk Out
of the Loop) 21 July 2010 October 2010, Bruce Vining http://tinyurl.com/32gkc9h
Page 10 of 10
1/3/2011 4:49:44 PM