This program reads the DEPARTMENT, EMPLOYEE, and OFFICE database records. For each department that contains employees, the output lists the ID and name of each employee, the employee's office location, and the status of the employee in terms of disability, leave of absence, or termination.
The program performs the following functions:
The first figure shows the CA Culprit code that created the report shown in the second figure.
Parameters for Employee Location and Status by Department:
DATABASE DICTNAME=DOCANWK IN DB SS=EMPSS01,EMPSCHM,100 PATHAA DEPARTMENT EMPLOYEE(BB) OFFICE(CC) 010 MESSAGE ' ' 010 TERM-DATE ' ' 010 EMP-ID 0000 01OUT D 01SORT DEPT-NAME-0410,1 OFFICE-CODE-0450 EMP-LAST-NAME-0415 013EMPLOYEE LOCATION AND STATUS BY DEPARTMENT 0141*010 DEPT-NAME-0410 0151*010 EMP-ID SZ=4 FN HH 'EMPLOYEE ID' 0151*020 EMP-NAME-0415 HH 'EMPLOYEE NAME' 0151*030 OFFICE-CITY-0450 HH 'LOCATION' 0151*040 MESSAGE HH 'STATUS' 0151*050 TERM-DATE 0152*010 EMP-ID SZ=4 FN 0152*020 EMP-NAME-0415 0152*040 MESSAGE 0153*010 MESSAGE 017 PATH-ID NE 'BB' 050 017 MOVE 'NO EMPLOYEES' TO MESSAGE 017 TAKE 3 017050 EMP-ID-0415 NE EMP-ID 100 017 DROP 017100 MOVE EMP-ID-0415 TO EMP-ID 017 PATH-ID NE 'CC' 200 017 MOVE 'NO OFFICE' TO MESSAGE 017 TAKE 2 017200 IF STATUS-0415 NE '05' 300 017 MOVE 'TERMINATED' TO MESSAGE 017 MOVE TERMINATION-DATE-0415 TO TERM-DATE 017 B 700 017300 IF STATUS-0415 NE '04' 400 017 MOVE 'LEAVE-OF-ABSENCE' TO MESSAGE 017 B 625 017400 IF STATUS-0415 NE '03' 500 017 MOVE 'LONG-TERM-DISABILITY' TO MESSAGE 017 B 625 017500 IF STATUS-0415 NE '02' 600 017 MOVE 'SHORT-TERM-DISABILITY' TO MESSAGE 017 B 625 017600 MOVE ' ' TO MESSAGE 017625 MOVE ' ' TO TERM-DATE 017700 TAKE 1
Report for Employee Location and Status by Department:
REPORT NO. 01 EMPLOYEE LOCATION AND STATUS BY DEPARTMENT mm/dd/yy PAGE 1 ACCOUNTING AND PAYROLL EMPLOYEE ID EMPLOYEE NAME LOCATION STATUS 2002 ROCCO COLOMBO SPRINGFIELD 0069 JUNE BLOOMER BOSTON 0100 EDWARD HUTTON BOSTON 0011 RUPERT JENSON BOSTON 0067 MARIANNE KIMBALL BOSTON REPORT NO. 01 EMPLOYEE LOCATION AND STATUS BY DEPARTMENT mm/dd/yy PAGE 1 BRAINSTORMING EMPLOYEE ID EMPLOYEE NAME LOCATION STATUS 0334 CAROLYN CROW GLASSTER 0301 BURT LANCHESTER GLASSTER 0015 RENE MAKER GLASSTER 0466 BAY ANDOVER WESTON LONG-TERM-DISABILITY 0467 S.E.A. BREEZE WESTON 0457 HARRY HARM WESTON TERMINATED 091883 0341 RICHARD MUNYON WESTON 0458 RICHARD WAGNER WESTON REPORT NO. 01 EMPLOYEE LOCATION AND STATUS BY DEPARTMENT mm/dd/yy PAGE 6 CLIMBING EMPLOYEE ID EMPLOYEE NAME LOCATION STATUS NO EMPLOYEES REPORT NO. 01 EMPLOYEE LOCATION AND STATUS BY DEPARTMENT mm/dd/yy PAGE 19 PUBLIC RELATIONS EMPLOYEE ID EMPLOYEE NAME LOCATION STATUS 0476 BETSY ZEDI SPRINGFIELD TERMINATED 072284 0120 MICHAEL ANGELO BOSTON 0007 DONTE BANK BOSTON 0158 JOCK JACKSON BOSTON 0127 CAROL MCDOUGALL BOSTON 0149 LAURA PENMAN BOSTON
Note: Information for each department prints on a separate page.
Parameters coded for this report are described below:
DATABASE and INPUT Parameters
The DATABASE and INPUT parameters define the input for a database access run. The INPUT parameter specifies DB, which indicates an IDMS/R database by default. The SS= keyword expression identifies the subschema, or view, of the database to be accessed. The dictionary named on the DATABASE parameter, DOCANWK, contains the schema and subschema definition. In a CV environment, DOCANWK must also contain the EMPSS01 load module.
PATH Parameter
The PATH parameter specifies three records:
Work Field Parameters
Report 01 specifies two alphanumeric work fields and one numeric work field:
Output Definition Parameters
The OUTPUT parameter for Report 01 defines a printed report that contains details-only information and 132 characters per line. The SORT parameter indicates that the information for the report is sorted by department name. The sort break associated with the department name instructs CA Culprit to begin printing a new page each time the name changes. Within each department, the information is sorted by the last name of each employee within the same office.
Since DEPT-NAME-0410 appears on the SORT parameter, it can be specified on a type 4 edit parameter. CA Culprit prints the department name below the report title at the top of each page. CA Culprit then prints the automatic headers defined on the type 5 edit parameters for the report.
The type 5 edit parameters define three detail lines:
Process Parameters
The procedure logic for Report 01 contains a number of comparisons to determine the actual contents of the input buffer:
STRINGS RETURNED FOR PATH AA- 81 STRINGS RETURNED FOR PATH BB- 11 STRINGS RETURNED FOR PATH CC- 0
|
Copyright © 2014 CA.
All rights reserved.
|
|