- Hi,
Iam getting daily many files in unix (source directory).
My requirement is to get the file received timestamp from unix and need to load in one of the db2 (target) table at column RCVD_TS.
Currently we are handling the basic- routine but going forward we wont use server jobs and basic routines.
I have cross checked in the forums, tried with many options but did not get the time stamp.
Any help greatly appreciated
Thanks
how can i get the received file timestamp in datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 34
- Joined: Mon May 05, 2008 1:31 am
how can i get the received file timestamp in datastage
Re: how can i get the received file timestamp in datastage
Hi hemanthakumar.
If I understand you want the OS file timestamp of the files.
You can use the External Source stage and issue the command:
ls -lisa your_directory
Configure this stage with one column like varchar(200) and then pick up the portion where you have the date and time to build the timestamp in your format.
You can use less options for the ls command but I don't have access now to linux to see the one that gives you the date/time.
A fish is happy because it has nothing.
Have fun,
me.
If I understand you want the OS file timestamp of the files.
You can use the External Source stage and issue the command:
ls -lisa your_directory
Configure this stage with one column like varchar(200) and then pick up the portion where you have the date and time to build the timestamp in your format.
You can use less options for the ls command but I don't have access now to linux to see the one that gives you the date/time.
A fish is happy because it has nothing.
Have fun,
me.
I'm just a Player, with no Section Leader.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: how can i get the received file timestamp in datastage
Why ever not? BASIC routines are going to be around for sequences (the routine called from a Routine activity is a BASIC routine). And that makes it really easy to obtain the file timestamps (created, modified and accessed).hemanthakumar wrote:Currently we are handling the basic- routine but going forward we wont use server jobs and basic routines.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.