Dear All,
I need to create job that read file generated every 15 minutes. The file name was generated base on time file generated, e.g. rec20080701132610 and next 15 minutes file rec20080701133110 (recYYYYMMDDHHMISS) was generated.
All I know that we need to write filename explicitly in Sequential Stage. Is there anyway so I can throw kind of filename variable for Sequential File stage, so the stage read "current time" file only?
Thanks in advance,
Taufik
Sequential File Stage file name
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, but exactly how depends on your actual requirement. For example if you always want the latest file, capture its name with an operating system command like ls -lrt dirpath | head -1 or DIR /OD/4 dirpath | SORT /R in an Execute Command activity (in a job sequence), then capture that output to feed to the filename job parameter in a Job activity. You will probably need to strip field mark characters (@FM) from the command output.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In a job sequence.
Code: Select all
ExecuteCommand ---> Job activity
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: