get file date as column value

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
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

get file date as column value

Post by deesh »

Hi,

I have a scenario like source file include date like ABCD10112016.dat . I need to derive that file date value '10112016' for one of the target field.

Could you help how to reach, Moreover will get multiple files same day with different dates.

1job source files:

ABCD09112016.dat
ABCD10112016.dat
ABCD11112016.dat
ABCD12112016.dat
ABCD13112016.dat

2job source files:
EFGH09112016.dat
EFGH10112016.dat
EFGH11112016.dat
EFGH12112016.dat
EFGH13112016.dat
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming that the file name is a job parameter, you can manipulate that.

For example

Code: Select all

Convert(Convert("0123456789", "", jpFileName), "", jpFileName)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Post by deesh »

Achieved by the file name column property in sequential file stage
Post Reply