The following examples represent types of jobs that you can code with the CA WA Agents. Unlimited options exist, and the people responsible for the application must determine how they can exploit the new functionality offered with the CA WA Agents. This process includes exploiting the basic System Agent and the agent plug-ins such as Data Base, Application Services, SAP, Oracle, PeopleSoft and more.
When a file is created, copy the file to another location. The copying involves two jobs: one to monitor for the file creation (FILE_TRIGGER) and then a job to execute a command to copy the newly created file to another location. In this case, the job type is NT_JOB.
Define JOBFT as a FILE_TRIGGER job type to the CA Workload Automation CA 7 Edition system:
------------------------- CA-7 Agent Job Definition ------------------------ Function: LIST (Add, DD, Delete, Format, List, Purge, Update) Job: JOBFT System: TESTAPP JOBNET: Owner: UID: 0 Agent Job Type: FILE_TRIGGER Agent: WINAGENT User: domain\usera Parmlib: &TESTJCL Member: JOBFT Use-Ovrd-Lib: N EXEC: Y Hold: N Verify: N DRClass: ARFSET: Satisfaction Lead Time: 0 WLBClass: A WLBPRTY: 000 Clock Time: 0001 Don't Schedule Before: 00000 0000 After: 99999 0000 LTERM: MASTER Prompt: Y Rqmt List: Y Rqmts Not Used: Y
Define the following PARMLIB member:
FILENAME C:\env.txt CREATE
Define the job JOBCOPY as an NT_JOB job type to the CA WA CA 7 Edition system:
------------------------- CA-7 Agent Job Definition ------------------------ Function: LIST (Add, DD, Delete, Format, List, Purge, Update) Job: JOBCOPY System: TESTAPP JOBNET: Owner: UID: 0 Agent Job Type: NT_JOB Agent: WINAGENT User: domain\usera Parmlib: &TESTJCL Member: JOBCOPY Use-Ovrd-Lib: N EXEC: Y Hold: N Verify: N DRClass: ARFSET: Satisfaction Lead Time: 0 WLBClass: A WLBPRTY: 000 Clock Time: 0001 Don't Schedule Before: 00000 0000 After: 99999 0000 LTERM: MASTER Prompt: Y Rqmt List: Y Rqmts Not Used: Y
Define the PARMLIB member to execute the Windows command (DOS prompt window) passing the argument (ARGS) to copy the file to a different location:
CMDNAME C:\Windows\system32\cmd.exe ARGS /C "copy C:\env C:\test\env"
Define the trigger relationship using job triggering another job (DB.2.4)
--------------------------- CA-7 JOB TRIGGERING ---------------------------- FUNCTION: UPD (FORMAT,LIST,UPD) PAGE 0001 JOB: JOBFT OPT SCHID TRGD-JOB TRGID DOTM QTM LDTM SBTM *---- EXCEPTIONS ----* A 000 JOBCOPY 0010 0010
When the file is created, CA WA CA 7 Edition completes the JOBFT file trigger job and releases the JOBCOPY job. The JOBCOPY job uses the Windows command interpreter cmd.exe to copy the file to another location. To pass an argument to cmd.exe, such as the copy command in this example, enclose the argument in double quotation marks.
Note: The path to the Windows command interpreter cmd.exe depends on your Windows operating system version. On Windows NT, the path would be C:\WINNT\system32\cmd.exe. For the path your Windows operating system uses, see your Windows administrator.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|