Script to call map reiteratively
Posted: Tue Dec 05, 2006 5:23 pm
I'm a newbie to DSTX...only a couple weeks' experience thus far with DSTX 8.0.1.
I have created type trees and a map, and run the map successfully by specifying input card Source = "File" and specifically naming my test input file in parameter FilePath.
But how to run this in production, where I must direct the map to an input folder where zero to several input files are waiting to be processed? Seems like I need to write a script to run the map reiteratively, once per file found in the input folder. Pseudo-code for such a script would look something like this:
Read input folder
Do until no more files in input folder
Copy input file to <FilePath specified in map's input card>
Run map
Delete <FilePath specified in map's input card>
Move input file to archive folder
Loop
Is this the best way to handle this task? If so, is there a preferred language for writing the script (VBscript or simple command file, whatever) to run in the DSTX Command Server environment? Can anyone provide me with sample code?
Or - am I missing the point of another function (like specifying input card Source = "Batch File" or "Shell Script") which I have been unable to figure out thus far?
Thanks.
- Dale
I have created type trees and a map, and run the map successfully by specifying input card Source = "File" and specifically naming my test input file in parameter FilePath.
But how to run this in production, where I must direct the map to an input folder where zero to several input files are waiting to be processed? Seems like I need to write a script to run the map reiteratively, once per file found in the input folder. Pseudo-code for such a script would look something like this:
Read input folder
Do until no more files in input folder
Copy input file to <FilePath specified in map's input card>
Run map
Delete <FilePath specified in map's input card>
Move input file to archive folder
Loop
Is this the best way to handle this task? If so, is there a preferred language for writing the script (VBscript or simple command file, whatever) to run in the DSTX Command Server environment? Can anyone provide me with sample code?
Or - am I missing the point of another function (like specifying input card Source = "Batch File" or "Shell Script") which I have been unable to figure out thus far?
Thanks.
- Dale