How to read multiple files at different directories using a
single Sequential File stage in DS Enterprise Edition
Answer Posted / venkata ramana
To read given number of files, one can use follow below
In the sequential file stage, Use
Read Method =File Pattern
File Pattern=`ls /* | head -<Number of files to be read>`
For example, I had 5 files, with similar pattern (as
date*.txt), in working folder say "/data/working/". If we
want to read three files out of these five files, one can
use following command:
`ls /data/working/date*.txt | head -3`
Just modified Venkat's Answer based on tested job.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is "fatal error/rdbms code 3996" error?
How many types of sorting methods are available in datastage?
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
why do u need the IOS upgradation in a FC switch
What is ds designer?
How do y read Sequential file from job control?
how to add a new records into source?
What is ibm datastage?
Define Data Stage?
Where do you see different stages in the designer?
What are the different options associated with dsjob command?
How many types of views are there in a datastage director?
What is quality stage?
how to export or import the jobs in .ISX file
How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?