Reading file names
Posted: Tue Jun 21, 2011 5:26 am
Hi All,
I have a list of files in unix. All the file names are in the format "somedate+abc.txt". eg 12062011abc.txt, 13062011abc.txt, 14062011abc.txt and so on.
I want to design a datastage job which will read these file NAMES and put the names (NOT CONTENTS) in a oracle table OR a comma seprated file.
One logic comes to my mind is, using ls command of unix and writing the output in a text file, then reading that file using sequence file stage. But i doubt how to delimit the file name properly so that I can read it later on.
Any Help or other logic
Thanks in advance.
I have a list of files in unix. All the file names are in the format "somedate+abc.txt". eg 12062011abc.txt, 13062011abc.txt, 14062011abc.txt and so on.
I want to design a datastage job which will read these file NAMES and put the names (NOT CONTENTS) in a oracle table OR a comma seprated file.
One logic comes to my mind is, using ls command of unix and writing the output in a text file, then reading that file using sequence file stage. But i doubt how to delimit the file name properly so that I can read it later on.
Any Help or other logic
Thanks in advance.