Designing the payroll applications

Grouping of payroll applications shows how the payroll jobs can be grouped to run under HCL Workload Automation for Z. Here are other problems to solve:
How do you get PAYDAILY to run after the CICSA data set is closed?
Paymore runs CICS® 24 hours a day. It shuts down only for essential maintenance. So PAYDAILY cannot be made dependent on the CICSA started task. Instead, it must be triggered by the CICS® transaction that closes the payroll data set in CICSA. There are many ways to do this. Here are some examples:
  1. Give PAYDAILY exclusive access to a special resource representing the payroll data set. Include code supplied by HCL Workload Automation for Z in your IEFU83 SMF exit to generate a special resource event when the data set is closed, allowing PAYDAILY to start. Refer to Customization and Tuning for information on data set triggering.
  2. Give PAYDAILY exclusive access to a special resource as before. The CICS® transaction can call the EQQUSIN subroutine, which can generate a special resource event. Refer to Customization and Tuning for information on the EQQUSIN subroutine. This is the solution adopted in this example.
  3. Trigger the CICS® transaction with a WTO operation, but use an automatic reporting WTO general workstation (see Specifying workstation reporting attributes) so that the WTO does not complete automatically. The CICS® transaction sets the WTO operation to status C (Complete) with the EQQUSIN subroutine. This solution is not used, because the special resource is needed for other reasons.
How do you automate the running of the CICS® transaction?
Use HCL Workload Automation for Z to schedule PAYDAILY at a fixed time each day. The first operation in the PAYDAILY application is a write-to-operator (WTO) operation. NetView® can intercept the operation and issue the CICS® transaction that closes the data set.
How do you force the weekly and monthly jobs to run after the daily job?
Make PAYWEEK and PAYMONTH dependent on PAYDAILY.
How do you make the backup run after all the payroll jobs?
Make PAYBACKP dependent on all the payroll jobs. On days where no weekly or monthly job is scheduled, that dependency does not take effect, so PAYBACKP will run after PAYDAILY.
How do you automate the reopening of the CICSA data set?
Include a final WTO operation in PAYBACKP that triggers, via NetView®, a CICS® transaction that reopens the payroll data set in CICS®.
How do you handle job recovery?
Consider the different error conditions that must be handled, such as:
  • B37 abends arising from a lack of space.
  • Invalid data; for example, hours-worked data for an employee who has left the company. There can be no automatic recovery for this error, but Paymore avoids the most common errors by validating each transaction against the database when the payroll clerks enter them into the CICS® system.

You can include operator instructions for each operation in the HCL Workload Automation for Z OI database in the event that operators have to take manual action.

How do you stop PAYQUERY running alongside a scheduled job?
PAYQUERY is run on request. In HCL Workload Automation for Z terms, this means that an occurrence of the PAYQUERY application is added to the schedule, or current plan, by an operator using the MODIFY CURRENT PLAN panel. To stop PAYQUERY accidentally running beside a payroll job, create a resource that represents the payroll database. All payroll jobs that update the database are given exclusive control of the resource. If the resource is unavailable, HCL Workload Automation for Z waits until the allocating operation has freed it.
Table 1. Grouping of payroll applications
GroupsApplications Operation namesWorkstationsOperation numbersPrograms
CICSACICSASTC1 010
PAYDAILYPAYDAILY PAYDAILY PAYDAILYWTO1 SETP CPU1005 010 020    PAY04 PAY06
GPAYWPAYWPAYWEEK     PAYWSLIP   PAYWSLIP PAYWSLIPCPU1     CPU1   PRT1 PAY1020     030   090 095PAY07 PAY10 PAY16 PAY14 PAY15
GPAYM PAYM1           PAYM2PAYMONTH     PAYMSLIP   PAYMSLIP PAYTRANSCPU1     CPU1   PRT1 CPU1040     050   099 040PAYM07 PAYM10 PAYM16 PAYM14 PAYM15   PAYGIRO
PAYTAXYRPAYTAXYRCPU1 015PAYY10
PAYQUERYPAYQUERYCPU1 050PAYQ1
PAYBACKPPAYBACKP PAYBACKPCPU1 WTO1015 030IDCAMS
PAYRECOV PAYRECOVCPU1015 IDCAMS