The sample report in this guide is created by the Reporting Facility accessing data in an imaginary CA Datacom/DB table, PERSONEL table (PMF). The printed report is illustrated next followed by an illustration of the input statements or coding required to produce that report.
The following report lists all employees who live in the state of Texas and includes each employee name, identification number, city, and zip code. This report is sorted according to the city in which the employee resides.
Printed Report
XYZ COMPANY, INC. 01 NOV 08 EMPLOYEE SUMMARY - TEXAS PAGE 1 ID ZIP EMPLOYEE NAME NUMBER CITY CODE LUTHER GARY 00009 DALLAS 75243 WALKER FRANK 00016 DALLAS 75243 PATTERSON AL 00018 DALLAS 75243 EVERS DANNY 00030 DALLAS 75243 . . . . . . . . . . . . CHURCH PHILLIP 00105 HOUSTON 77506 ABEL PHILIP 00115 HOUSTON 77506 NEELY ROY 00123 HOUSTON 77506 DIETER RODNEY 00130 HOUSTON 77506 END OF REPORT
Unless intentionally altered with the appropriate commands and parameters, all reports have the following characteristics:
Reporting Facility Input Statements
USER 'XYZ COMPANY, INC.' PERSONEL: INPUT DATACOM RECORD EQ 375 NAME EQ PMF DBID EQ 001 DEFINE PERSONEL-COMMAND 001-005 X DEFINE PERSONEL-KEY 006-010 X DEFINE PERSONEL-ELMLIST 191-201 X DEFINE PERSONEL-NUMBER 301-305 X ' ID ' 'NUMBER' DEFINE PERSONEL-NAME 306-329 X 'EMPLOYEE NAME' DEFINE PERSONEL-CITY 354-368 X 'CITY' DEFINE PERSONEL-STATE 369-370 X DEFINE PERSONEL-ZIP-CODE 371-375 X 'ZIP' 'CODE' MOVE 'GETIT' TO PERSONEL-COMMAND MOVE 'EMPNO' TO PERSONEL-KEY MOVE 'ADEMP' TO PERSONEL-ELMLIST GET PERSONEL GOTO EOJ WHEN PERSONEL EQ 'E' REPORT 'EMPLOYEE SUMMARY - TEXAS' SELECT PERSONEL-STATE EQ 'TX' CONTROL PERSONEL-CITY PRINT PERSONEL-NAME PERSONEL-NUMBER PERSONEL-CITY PERSONEL-ZIP-CODE END
This tutorial gives you the opportunity to practice writing Reporting Facility programs, and explains the input statements and the printed report generated by those statements.
The explanation of each statement includes the relevant general format of the command and the specific coding required to produce the printed report. For an explanation of the complete general format of the command and all of its parameters, see Reporting Facility Commands.
|
Copyright © 2014 CA.
All rights reserved.
|
|