Page 1 of 1

Folder Stage

Posted: Tue Feb 10, 2004 3:18 pm
by astar
Hi, i need obtain a list of folders contained into a specific path.
I have a job, floder Stage --> T --> Sequential File.
The specific path has 35 sub folders, I run the job and the log shows 35 reads and 35 writes, but the target sequential file with the resulting list is empty.
How can i obtain the list of subfloders with this metodology?
Thaks,

Ariel

Re: Folder Stage

Posted: Tue Feb 10, 2004 4:02 pm
by raju_chvr
I don't know whether you can get the subfolder list from Folder stage or not. but you can get it from other ways.

if you are on windows machine you can redirect Dir to a text file and parse that file to get the list which is a hard way though ... but it works

Posted: Wed Feb 11, 2004 5:48 am
by anupam
Hi Ariel,

I have a solution for ur problem. U do not need to use Folder stage at all.
U will be creating a file with the names of the folders u want and then reading that file.

the Implementation should be as follow

1. In before Job subroutine execute DOS. The command is

dir /b #PathName# > #PathName#\#FileName#

Where PathName is the path from which u want the names of the folder
FileName is the name of the file where these names will be directed.

2. The constraint should be added in the Transformer stage other wise the #FileName# will also come in the Final File

Job will be like this

sfilestage (name of folders = #FileName# ) --> txfm(Constraint to remove #FileName#) --> sfile (Final File of folder names)


i hope this will solve ur problem

Posted: Wed Feb 11, 2004 6:06 am
by astar
Tanks so much Anupam, i will try a solution like yuo decribe.
Best Regards
Ariel

Posted: Thu Feb 12, 2004 2:50 am
by roy
Hi,
If my memory serves me it is explicitly said not to use folder stage where subfolders exists, check the docs.
so you need some OS solution, be it as said here or any other variation.

Good Luck,