how can i get the received file timestamp in datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hemanthakumar
Participant
Posts: 34
Joined: Mon May 05, 2008 1:31 am

how can i get the received file timestamp in datastage

Post by hemanthakumar »

  • 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
LS
Participant
Posts: 5
Joined: Tue Mar 15, 2011 3:48 pm
Location: Europe
Contact:

Re: how can i get the received file timestamp in datastage

Post by LS »

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.
I'm just a Player, with no Section Leader.
ray.wurlod
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

Post by ray.wurlod »

hemanthakumar wrote:Currently we are handling the basic- routine but going forward we wont use server jobs and basic routines.
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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply