Import and Export File Names

Previous Next

See Also

File names for import and export tasks are defined when the tasks are defined. However, it is possible to change these at run time, by using the filename parameter:

ActionStartJob(<job name>

[,[<task name>:]filename::<old file name>=<new file name>)

If no task name is specified, every occurrence of <old file name> in the job is replaced by <new file name>. When a task name is specified, the substitutions are restricted to that task.

For <new file name>, you can also refer to an environment variable that contains the physical file name. For example, if the new file name is defined within the USEFILE environment variable, then the syntax would be:

ActionStartJob(MYJOB,'mytask:filename::DefaultFile.txt=%USEFILE%')

The USoft Batch Runner processes the file names in import and export tasks as follows:

1. First it checks if the file name matches the name of an environment variable. If so, the file name is replaced by the value of the environment variable, otherwise the file name is left unchanged.
2. If a data directory is defined with the data_directory parameter, the directory and a separator are added to the beginning of the file name.
3. The resulting name is scanned for environment variables. All environment variables that are defined are substituted. The syntax of environment variables in this step is platform independent. You can use the same job definition on, for example, Microsoft Windows and UNIX.

The status files of an import task (SUC, ERR, MES) are created in the same directory as the file resulting from this step.

Related Topics:

Example: Using different file names