I would like to suggest not to use an external JAL file, but instead have a flat text file containing file names only, each name on a new line. Lets's call it a "list" Then you can build a regular script job, debug it, use user-defined functions for more convinience and efficiency, etc... and what's most important this way you can avoid making changes in the script whenever a new file is added to the processing. You simply add file name to the list. Additional parameters such as specific destination directories or extensions for every file can be also save outside of the job. The script can then read your "list" file(s) line by line and perform the same operations. Here is an idea how to accomplish that Dim file_number, number Dim file_name, string Dim end_of_file, boolean // Open file for reading line by line FileOpen( "C:\\jobs\\myfiles.txt", "LineMode", "Read", "", file_number ) // Read file line by line until the end of file. // Each file name must be on a separate line EOF( file_number, end_of_file ) LoopUntil( end_of_file, END_LOOP ) FileRead( file_number, file_name ) // call user-defined statement here that processes that file // ................ EOF( file_number, end_of_file ) END_LOOP: // Done FileClose( file_number ) : I've been doing some research related to the @SCRIPT : variable. What I am attempting to do is use : an offline file i.e. JAL with defining a job to : look to a remote ftp & monitor multiple files for modifications. : Once the job has notified a change in file status i.e. timedate : it downloads newer files to a temp directory, renames the old : files with a .bak extension. After renaming the file : the job puts the file in a backup folder and uploads the new : files to many different servers defined via ftp. : There has been a sigificant change with how many : and different extensions. : What I am attempting to accomplish here is one file : such a script.jal so that the job can look to this : file as the "library". As newer named files come in : I would like to just add this filename and type to the : list. These helps leviate time based on going into : the jobs script and adding more files to proccess. : Any ideas on how to build this type of job. : Also whenever I use the @SCRIPT statement I get an : error trying to validate. The error is on line 0, . : Need a solution for that as well. : Thanks, : Forest
|