IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Inserting Curent Date in Input FIle


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Tue Apr 01, 2008 12:16 pm
Reply with quote

Hi All,

We have an input file with record length 100 and it's having data upto 73 colomns. We want to LOAD this file into DB2 table with CURRENT DATE from 73 to 82 clomns.

Can we use CURRENT DATE function in LOAD CARD. I am asking this b'cz I can't test this from my side. This would be done from our support people. We want to make sure before sending request to support people.

If CURRENT DATE won't work, please let me know if ther is any system defined function to extarct CURRENT DATE.

KSk
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Apr 01, 2008 4:51 pm
Reply with quote

What load utility you are using?

I am not sure, but try with this...
...Locate SYSIN of load
...Try like this
Code:
date_field POSITION(73:82) DATE CURRENT_DATE

Please refer how to give default values or new values while loading into table on your LOAD utility manual.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Thu Apr 03, 2008 11:33 am
Reply with quote

Hi Gnanas,

Thanks for the solution. I did it using DFSORT's DATE(-1) function in JCL rather doing it in LOADCARD and worked fine.

Regards,
KSK
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top