How could I process all files from a directory?
Moderators: chulett, rschirm, roy
How could I process all files from a directory?
Hi there!
I am newbie in DataStage and in this forum as well.
My doubt is how can I get all files from a directory with a determinate standard.
For example, I want to process all files from a directory that starts with "PCBR*".
This directory comes from a parameter.
The way I found to do that, is using the job sequence.
I execute a find(unix command) , and I call the job once for file.
Anyone has a better way to do that?
thanks a bunch!
(sorry my English mistakes)
I am newbie in DataStage and in this forum as well.
My doubt is how can I get all files from a directory with a determinate standard.
For example, I want to process all files from a directory that starts with "PCBR*".
This directory comes from a parameter.
The way I found to do that, is using the job sequence.
I execute a find(unix command) , and I call the job once for file.
Anyone has a better way to do that?
thanks a bunch!
(sorry my English mistakes)
Tiago
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
A job sequence is the best way. A StartLoop activity can set up a "list of things" loop based on a regular expression.
A job sequence is the best way. A StartLoop activity can set up a "list of things" loop based on a regular expression.
Code: Select all
Pre-loop activity ----> StartLoop ----> Within-loop activities ----> EndLoop ----> Post-loop 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:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For a not too large number of not-too-large files, the Folder stage does support wildcards.
The restriction on not-too-large files is that the Folder stage reads each entire file contents into a single field - it's intended to be used with XML documents rather than data files.
The restriction on not-too-large files is that the Folder stage reads each entire file contents into a single field - it's intended to be used with XML documents rather than data files.
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.