Previous Topic: Application ExploitationNext Topic: Monitor Examples


Sample Application

The application processes data on the mainframe and a Windows system and eventually generates a report to a web page for the latest status of the application. Jobs are in sequence but no longer execute only on the mainframe environment. This sample illustrates the use of seamless integration across operating environments.

JOBA: A file watcher job waits for the creation of a file on WINA by some unknown process. The file is expected at 18:00 daily. This job is a scheduled job to bring in through the Schedule Scan process and should be submitted at 17:45. The file is created daily as TEST_Dmmddyy in the TESTAPP directory on drive D. JOBA is defined as a FILE_TRIGGER job, going to WINA.

------------------------- CA-7 Agent Job Definition ----------------- Function: ADD (Add, DD, Delete, Format, List, Purge, Update) Job: JOBA System: TESTAPP JOBNET: Owner: UID: 0 Agent Job Type: FILE_TRIGGER Agent: WINA User: USERA Parmlib: &TESTJCL Member: JOBA Use-Ovrd-Lib: N EXEC: Y Hold: N Verify: N DRClass: ARFSET: Satisfaction Lead Time: 0 WLBClass: A WLBPRTY: 000 Clock Time: 0000 Don't Schedule Before: 00000 0000 After: 99999 0000 LTERM: MASTER Prompt: Y Rqmt List: Y Rqmts Not Used: Y

The FILE_TRIGGER parameter member follows. Note the use of the global variable to set the current date in MMDDYY format.

FILENAME ‘D:\TESTAPP\TEST_D&:7MM.&:7DD.&:7YY..txt’ CREATE 

When the job has been submitted, the job appears in the queues. When the job has gone to active status, the LQ,JOB=#,LIST=ALL shows the status field because the file monitor has been created. Also, note the AGJ value in the CPU SPEC/RUN value indicates that the job has reached the agent. This notification is useful if the job takes an error, and you want to know whether the error is on the CA WA CA 7 Edition side or on the agent side.

LQ,JOB=310,LIST=ALL LIST=ALL CA-7#=0310 DATE=yy.ddd PAGE 0001 JOB QUEUE CA-7 -DAY(DDD) AND TIME(HHMM)-- CPU SCH ENTRY MSTR JOB NAME NAME JOB# DEADLINE SUB/START DUE-OUT SPEC/RUN ID MODE REQ STATUS JOBA ACT 0310 ddd/hhmm ddd/hhmm ddd/hhmm FTRG-AGJ 001 DEMD 000 --------------------------- JOB INFORMATION --------------------------- . SYSTEM NAME = TESTAPP . DRCLASS = **NONE** . AGENT: AGENTA -------------------------- AGENT INFORMATION -------------------------- Job Type: FILE_TRIGGER JobNo: Agent: AGENTA Status: MONITOR Monitored for CREATE User: USERA --------------------------- PARM INFORMATION -------------------------- FILENAME ‘D:\TESTAPP\TEST_D&:7MM.&:7DD.&:7YY..txt’ CREATE

Although one can enter the AGFILE command at any time, when JOBA has completed, the AGFILE,JOB=JOBA,TYPE=INFO output appears as the following:

----------------- CA-7 Job INFO For Agent AGENTA --------- Jobname: JOBA CA7#: 0310 System: TESTAPP SchId: 0001 Q-DtTm: yyddd hhmm Job Type: FILE_TRIGGER Agent: AGENTA Host: HOST_AGENTA FILENAME: D:\TESTAPP\TEST_Dmmddyy.txt STATUS: File Created

No output (spool) is associated with FILE_TRIGGER job types.

JOBB: This job, through FTP, sends the file from the Windows system to the Mainframe system for processing. JOBB definition is FTP_JOB and also is sent to WINA for execution. WINA does have the FTP Client interface activated and thus can request the sending of the file. JOBB is triggered from JOBA.

------------------------- CA-7 Agent Job Definition ----------------- Function: ADD (Add, DD, Delete, Format, List, Purge, Update) Job: JOBB System: TESTAPP JOBNET: Owner: UID: 0 Agent Job Type: FTP_JOB Agent: WINA User: USERA Parmlib: &TESTJCL Member: JOBB Use-Ovrd-Lib: N EXEC: Y Hold: N Verify: N DRClass: ARFSET: Satisfaction Lead Time: 0 WLBClass: A WLBPRTY: 000 Clock Time: 0000 Don't Schedule Before: 00000 0000 After: 99999 0000 LTERM: MASTER Prompt: Y Rqmt List: Y Rqmts Not Used: Y

The parameter member for JOBB appears with the following statements:

LOCALFILENAME 'D:\TESTAPP\TEST_D&:7MM.&:7DD.&:7YY..txt’ 
REMOTEFILENAME “'TEST.DATA'”                                  
SERVERADDR USCOMP99.CO.COM                                    
/* TRANSFERCODETYPE U */                                      
FTPFORMAT U                                                   
/* TRANSFERDIRECTION UPLOAD */                                
DIRECTION UPLOAD                                              

After the job executes, a spool file is on the agent indicating the FTP was executed. Only part of the spool file is echoed here.

The following command is entered:

AGFILE,JOB=JOBB,TYPE=SPOOL

Entering the GS (Get Spool) line command from the command output of AGFILE,JOB=JOBB,LIST=ALL obtains the same data.

----------------- CA-7 Job SPOOL For Agent WINA --------- Jobname: JOBB CA7#: 0392 System: TESTSYS SchId: 0001 Q-DtTm: yyddd hhmm Job Type: FTP_JOB Spool Offset: 0 Next Offset: EOF ---------------------------------------------------------------- Output of messages for workload object JOBB.N00392/QATSTSYS.S00001D102511112/MAIN Start date Wed mmm dd hh:mm:ss CDT yyyy ---------------------------------------------------------------- Attempting to connect to USCOMP99.CO.COM:21 Connection established to USCOMP99.CO.COM:21 USER usera 331 Send password please. PASS (hidden) 230 USERA is logged on. Working directory is "USERA.". Autodetecting... The transfer type is ASCII Uploading ASCII D:\TESTAPP\TEST_Dmmddyy.txt --> ARFSET.DATA PROGRAM: QM82 MSG-INDX: 00 -- QM.8.2 -- yy.ddd / hh:mm:ss MESSAGE: Enter Spool Offset or a command on the top line (Use 'PF7/PF8 to scroll thru data' )

JOBC, D, E and F process the data in that file to update master files, produce print files, and more. One of the outputs of these jobs is a report file. Because these jobs are “normal” CPU jobs already scheduled through CA WA CA 7 Edition, no data is shown here.

JOBG updates a form on a web page. The form indicates when the cycle completes. This job type requires the Application Services plug in to the CA WA System Agent, which permits the execution of an HTTP_JOB. (Other job types are supported such as JMS Publish, JMS Subscribe, Entity Beans and more).

------------------------- CA-7 Agent Job Definition ------------------------ Function: LIST (Add, DD, Delete, Format, List, Purge, Update) Job: JOBG System: TESTAPP JOBNET: Owner: UID: 0 Agent Job Type: HTTP_JOB Agent: APPSRVC_AGENT User: USERA Parmlib: &TESTJCL Member: JOBG 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

The parameters for this job indicate the data is updated (POST) in the form. The parameters use CA WA CA 7 Edition global variables that are resolved at submission time.

INVOCATIONTYPE POST 
SERVLET_URL http://application:8080 
ACTION /publish/servlets/ComplServlet 
PARAMETER KEYWORD(date) VALUE(&:7MM.&:7DD.&:7YY.) 
PARAMETER KEYWORD(time) VALUE(&:7CTIME)
PARAMETER KEYWORD(application) VALUE(&:7SYSTEM)

More information:

FTP Client