filepattern read, need to split on date , and process loop

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
smohd1338
Premium Member
Premium Member
Posts: 28
Joined: Fri Aug 03, 2012 1:09 pm

filepattern read, need to split on date , and process loop

Post by smohd1338 »

I have six files , i am reading in file pattern manner, files will ahve this names BLG_LB_010213.txt,BLG__SA_010213.txt,BLG__AD_010213.txt, but for some reason if my etl process doest run, there will be 6 files now , 3 with previous day, and 3 new from current date,BLG_LB_010313.txt,BLG__SA_010313.txt,BLG__AD_010313.txt , how do i split them based on date and seklect only the 3 files with same date and run and loop again?
sameer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How are you reading them now?

Assuming it's an ls command, just add to that - maybe sort in date/time order and pipe the result through tail -3 command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
smohd1338
Premium Member
Premium Member
Posts: 28
Joined: Fri Aug 03, 2012 1:09 pm

Post by smohd1338 »

I am reading thropugh LS command now,

tahnsk, they can be sorted on date, i missed taht :)
sameer
Post Reply