Page 1 of 2

DB2 Load uitlity JCL

PostPosted: Sat Aug 22, 2015 1:04 pm
by gauravfrankly
Hi All,
I need a sample JCL to LOAD Db2 table from a flat file, by defining the positions into LOAD control statement,
IKJEFT01 or any other utility we can use.

Re: DB2 Load uitlity JCL

PostPosted: Sat Aug 22, 2015 5:15 pm
by Akatsukami
What products are available in your shop?

Re: DB2 Load uitlity JCL

PostPosted: Sat Aug 22, 2015 8:25 pm
by gauravfrankly
what you want to know Akatsukani??

Re: DB2 Load uitlity JCL

PostPosted: Sat Aug 22, 2015 11:23 pm
by Robert Sample
gauravfrankly, your site may be using a product to do the load. If so, you should be using that product, for which the instructions vary by product.

In any case, you are asking about something AT YOUR SITE -- so why are you not contacting your site support group for assistance? They know the data bases and environment (we on this forum do not) and can provide you much better assistance than any forum response could.

Re: DB2 Load uitlity JCL

PostPosted: Sun Aug 23, 2015 8:07 am
by gauravfrankly
HI Robert, we are not using any specific product. Its first time going to do LOAD, so we are doing it by JCL

Re: DB2 Load uitlity JCL

PostPosted: Sun Aug 23, 2015 8:20 am
by Akatsukami
Well, you can't do it by JCL; JCL only establishes an environment and executes programs. You need some program -- DSNUTILB, BMC LOAD+, or some home-brewed solution -- to actually load tables. As you apparently have none of those, you will fail miserably.

Re: DB2 Load uitlity JCL

PostPosted: Sun Aug 23, 2015 1:59 pm
by NicC
Its first time going to do LOAD

The first time that you, yourself, are doing a load or the first time anyone in the organisation is doing a load? If someone else has done a load then there is an established way of doing it within your organisation so find out what it is. Ask around - colleagues, team members, friends, DBAs.

Re: DB2 Load uitlity JCL

PostPosted: Mon Aug 24, 2015 11:07 am
by gauravfrankly
Hi Akatsukami,
Yes I am using DSNUTILB PGM.
Hi Nicc ,
We have few new tables and going to do load on this. Yes, it is first time in organization.

Re: DB2 Load uitlity JCL

PostPosted: Mon Aug 24, 2015 11:58 am
by enrico-sorichetti
Yes, it is first time in organization.

And why in &heaven your organization did not provide You all with some basic training ??? :evil:
anyway the XXXX.SDSNSAMP ( where XXXX is the installation prefix of Your DB2 ) contains quite a few examples.

Re: DB2 Load uitlity JCL

PostPosted: Tue Sep 01, 2015 11:16 am
by gauravfrankly
getting ABENDED S806 U0000 CN on executi8ng following job card
//STEP010 EXEC PGM=DSNUTILB
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//ABP710DD DD SYSOUT=*
//SYSREC DD DSN=INPUT DATA FILE,DISP=SHR
//SYSIN DD *
LOAD DATA
REPLACE
RESUME NO
INTO TABLE XXXX.TABLE1
( INDV_ID POSITION(1:10) INTEGER,
SURNAME POSITION(11:74) VARCHAR(64) STRIP BOTH,
FORENAME POSITION(79:138) VARCHAR(60) STRIP BOTH,
FORENAME_LEN POSITION(75:77) SMALLINT,
FORENAME_FCHAR POSITION(78:78) VARCHAR(1) STRIP BOTH,
MIDDLENAME POSITION(143:202) VARCHAR(60) STRIP BOTH,
MIDDLENAME_LEN POSITION(139:141) SMALLINT,
MIDDLENAME_FCHAR POSITION(142:142) VARCHAR(1) STRIP BOTH,
INDV_DOB POSITION(284:293) EXTERNAL(10) STRIP BOTH,
GENDER POSITION(203:203) VARCHAR(1) STRIP BOTH,
KEY_INFO POSITION(204:263) VARCHAR(60) STRIP BOTH,
CASE_REF POSITION(264:283) VARCHAR(20) STRIP BOTH,
LAST_UPDATE_DTTM CURRENT_TIMESTAMP TIMESTAMP EXTERNAL(26),
)