AE JIL to copy file from one server to another
search cancel

AE JIL to copy file from one server to another

book

Article ID: 106309

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction



Need to copy a file from one server to another. Can you provide an example of a JIL file to define a job to perform accomplish this task?

Environment

Release:
Component: ATSYS

Resolution

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: 
  1. Using the UNIX/Linux secure copy command to transfer the file.
  2. 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