You can reference https://docops.ca.com/ca-workload-automation-ae/11-4-2/en/reference/ae-job-information-language/jil-job-definitions for details on the various requirements and additional options to use in when defining jobs in JIL format.
Assumption:
- Using the UNIX/Linux secure copy command to transfer the file.
- All required configuration is in place to allow the specified user to transfer the files without prompt for password.
You can copy the file from one server to another through various ways. Below are two examples of job definitions in JIL format:
Example 1: JIL to issue Secure Copy command from one server to another insert_job: copy_file_job job_type: CMD
command: scp /home/autosys/data.csv
[email protected]_HOSTNAME:/home/autosys/
machine: <HOSTNAME of the source server>
owner: autosys
permission:
date_conditions: 0
alarm_if_fail: 1
Example 2: JIL calling a script to secure copy file from one server to another insert_job: copy_file_job job_type: CMD
command: /home/autosys/scripts/copyfile.sh
machine: <HOSTNAME where script resides>
owner: autosys
permission:
date_conditions: 0
alarm_if_fail: 1