We are trying to set up an AFT job to transfer available files in a windows directory to pre-allocated MVS data sets. There can be up to 12 source files that may or may not exist. The MVS file names will be the same as the source files from windows.
Can anyone think of a way that we can use a single AFT file transfer to accomplish this. We've tried using:
filename.* ===> $$aftfile$$
to capture multiple source files to multiple targets. Can anyone think of a way that this could be accomplished.
Thanks in advance for any ideas.
AFT Job - Windows to Mainframe with Variables
Maybe not relevant anymore but I'll explain what we do
Hi,
I just joined the forum and I'll explain what we do
Actually its 2 jobs who run cyclic with interval 0 and a filewatch trigger
You make a trigger that puts a startcondition for the first job.
The first job you run a command line to set 2 variables, one for the windows file name and 1 for the MVS name as it should become.
This can be done by launching a cmd/bat/vbs file to do the necessary naming.
Then you put a condition to the second job when this ends succesfully and when not succesfully you define DO STOP CYCLIC. The start condition should be erased so the jobs shuts down
The second job (AFT) starts from the in condition of the first job and there you define the variables in the source (folder\%%variable1) and destination (%%variable2) you created earlier.
Make the file transfer and put the start condition to the first job again and remove the in condition from the first job.
Then you put a condition to the first job when this ends succesfully and when not succesfully you define DO STOP CYCLIC.
Like this you have the 2 jobs looping cyclic untill the last file is processed and then job 1 has to shut down based on no input anymore. This is accomplished by the cmd/bat/vbs file exiting whit another code then when successfully and giving a DO OK ont that as well.
Make sure the 2 jobs have the same exclusive resource so they don't run together.
Schematic :
Filewatch trigger puts in condition -> in condition job 1 activated -> job 1 variables filled trough cmd/bat/vbs file handling (exit code 0, in condition job 2 activated), error (exit code 1 DO STOP CYCLIC job 1), no input files anymore (exit code x remove start condition job 1) -> start condition job 2 activated -> File Transfer based on variable names provided like %%variablex -> transfer complete (exit code 0), error (exit code x DO STOP CYCLIC job 2) -> in condition job 1 activated, in condition job 2 removed and the loop is complete
Exclusive resource in both jobs
Cyclic interval 0 in both jobs
Filewatch trigger to start job 1
I just joined the forum and I'll explain what we do
Actually its 2 jobs who run cyclic with interval 0 and a filewatch trigger
You make a trigger that puts a startcondition for the first job.
The first job you run a command line to set 2 variables, one for the windows file name and 1 for the MVS name as it should become.
This can be done by launching a cmd/bat/vbs file to do the necessary naming.
Then you put a condition to the second job when this ends succesfully and when not succesfully you define DO STOP CYCLIC. The start condition should be erased so the jobs shuts down
The second job (AFT) starts from the in condition of the first job and there you define the variables in the source (folder\%%variable1) and destination (%%variable2) you created earlier.
Make the file transfer and put the start condition to the first job again and remove the in condition from the first job.
Then you put a condition to the first job when this ends succesfully and when not succesfully you define DO STOP CYCLIC.
Like this you have the 2 jobs looping cyclic untill the last file is processed and then job 1 has to shut down based on no input anymore. This is accomplished by the cmd/bat/vbs file exiting whit another code then when successfully and giving a DO OK ont that as well.
Make sure the 2 jobs have the same exclusive resource so they don't run together.
Schematic :
Filewatch trigger puts in condition -> in condition job 1 activated -> job 1 variables filled trough cmd/bat/vbs file handling (exit code 0, in condition job 2 activated), error (exit code 1 DO STOP CYCLIC job 1), no input files anymore (exit code x remove start condition job 1) -> start condition job 2 activated -> File Transfer based on variable names provided like %%variablex -> transfer complete (exit code 0), error (exit code x DO STOP CYCLIC job 2) -> in condition job 1 activated, in condition job 2 removed and the loop is complete
Exclusive resource in both jobs
Cyclic interval 0 in both jobs
Filewatch trigger to start job 1