Current Timestamp in LOAD JCL



IBM's flagship relational database management system

Current Timestamp in LOAD JCL

Postby DANIPSX » Tue Sep 04, 2012 3:59 pm

Hi,

I'm using this JCL to load a table using a file, but I need to set one of the table fields to CURRENT_TIMESTAMP.

How can I do it?. Thanks.


//MGJ16417 JOB BD,'MINIBK',MSGCLASS=X,CLASS=D,
// REGION=0M,NOTIFY=TSDEGMD,
// RESTART=*
/*JOBPARM S=SYSB
//*********************************************
//**LOAD DE LA TABLA D1BPEPA.T6001AE **
//*********************************************
//T6001AE EXEC DSNUPROC,SYSTEM=DBD1,UID='T2131FL',UTPROC='',TIME=500
//STEPLIB DD DISP=SHR,DSN=DB2910.DESA.SDSNLOAD
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(450,45),RLSE)
//SORTOUT DD UNIT=SYSDA,SPACE=(CYL,(450,45),RLSE)
//SYSERR DD UNIT=SYSDA,SPACE=(CYL,(450,45),,,ROUND)
//SYSMAP DD UNIT=SYSDA,SPACE=(CYL,(450,45),,,ROUND)
//SYSREC DD DISP=SHR,DSN=TSDX.OF1641.MGJ16416.MGP16415.SALIDA
//SORTWK01 DD SPACE=(CYL,(500,50),RLSE)
//SORTWK02 DD SPACE=(CYL,(500,50),RLSE)
//SORTWK03 DD SPACE=(CYL,(500,50),RLSE)
//SORTWK04 DD SPACE=(CYL,(500,50),RLSE)
//SORTWK05 DD SPACE=(CYL,(500,50),RLSE)
//SORTWK06 DD SPACE=(CYL,(500,50),RLSE)
//UTPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LOAD DATA INDDN SYSREC REPLACE LOG NO NOCOPYPEND
INTO TABLE D1BPEPA.T6001AE
DANIPSX
 
Posts: 1
Joined: Tue Sep 04, 2012 3:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Current Timestamp in LOAD JCL

Postby NicC » Tue Sep 04, 2012 4:27 pm

Nothing to do with JCL - all to do with DB2 - moved.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Current Timestamp in LOAD JCL

Postby dick scherrer » Tue Sep 04, 2012 8:43 pm

Hello and welcome to the forum,

You might consider running a (probably SORT) process to insert the date into the data to be loaded. As you are specifying a file as input to the load, that would not require re-writing your load naming all of the columns.

How much data is to be loaded? If the answer is 100million rows, changing the LOAD might be better . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Current Timestamp in LOAD JCL

Postby GuyC » Thu Sep 06, 2012 6:03 pm

I think the only way is to have the default for that column as current timestamp and not to include the column in the load.
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post