Hi there,
Onde again i need the help of somebody. I need to transfer a file with AFT and use the name of that file to set as a Parameter when executing a batch file. Can i do that?
Ex: Transfer file xpto.txt
Job file = import_file.bat xpto.txt
Regards,
Osafr71
Using name of transfered file to set as parameter on a Batch
you can pass a varaible from one job to other:
- define a global variable in set panel of the first job:
%%\GLobalVarName=Value
When this jobs run sets the value to the GobalVarName, and all the following jobs can use it sibmply writing:
%%GobalVarName.
In your case the second job has in the general tab the path and the file name of the script you may lauch.
In this second job set pnale write:
PARM1=%%GlobalVarName
And you pass the "Value" as the first parameter of the script.
In the script you has the "Value" in the %1 parameter (in batch).
So for example in the script you can have:
set FileName=%1
- define a global variable in set panel of the first job:
%%\GLobalVarName=Value
When this jobs run sets the value to the GobalVarName, and all the following jobs can use it sibmply writing:
%%GobalVarName.
In your case the second job has in the general tab the path and the file name of the script you may lauch.
In this second job set pnale write:
PARM1=%%GlobalVarName
And you pass the "Value" as the first parameter of the script.
In the script you has the "Value" in the %1 parameter (in batch).
So for example in the script you can have:
set FileName=%1