DB2 Load uitlity JCL



IBM's flagship relational database management system

DB2 Load uitlity JCL

Postby gauravfrankly » Sat Aug 22, 2015 1:04 pm

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.
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Load uitlity JCL

 

Re: DB2 Load uitlity JCL

Postby Akatsukami » Sat Aug 22, 2015 5:15 pm

What products are available in your shop?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: DB2 Load uitlity JCL

Postby gauravfrankly » Sat Aug 22, 2015 8:25 pm

what you want to know Akatsukani??
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Load uitlity JCL

Postby Robert Sample » Sat Aug 22, 2015 11:23 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: DB2 Load uitlity JCL

Postby gauravfrankly » Sun Aug 23, 2015 8:07 am

HI Robert, we are not using any specific product. Its first time going to do LOAD, so we are doing it by JCL
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Load uitlity JCL

Postby Akatsukami » Sun Aug 23, 2015 8:20 am

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: DB2 Load uitlity JCL

Postby NicC » Sun Aug 23, 2015 1:59 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: DB2 Load uitlity JCL

Postby gauravfrankly » Mon Aug 24, 2015 11:07 am

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.
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Load uitlity JCL

Postby enrico-sorichetti » Mon Aug 24, 2015 11:58 am

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.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: DB2 Load uitlity JCL

Postby gauravfrankly » Tue Sep 01, 2015 11:16 am

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),
)
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post