Lab 5

advertisement
LAB 5: QUERY MANAGER/400 REPORT
Create a QM/400 query using source files containing an SQL statement defining
the data for your query and a separate source file member containing the
definition of the report layout.
The report should use the EMPPAYPF physical file in QGPL and print the report
layout shown. Write a CL program to select and print a particular store number.
The commission calculation is based on 15% of the sales made by each
employee. You must display the total commission for all employees at the
bottom. Handle all errors appropriately including the event that the physical file
does not exist. A list of CL commands that you might require, are attached.
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
99/99/99
PAYROLL REPORT
Page: 999
Store Number: XXXXXXXX
Employee #
Employee Name
999-99-9999 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9-9999-9999 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Total Store commissions:
*** End of Report ***
CL commands and Syntax:
Command
Parameter keyword(s)
CALL
PGM
CHGVAR
VAR VALUE
DCL
VAR TYPE LEN VALUE
DCLF
FILE
DO
DSPMSG
ELSE
CMD
ENDDO
ENDPGM
GOTO
CMDLBL
IF
COND THEN
MONMSG
MSGID CMPDTA EXEC
PGM
PARM
RCVF
RTVUSRPRF
RTNUSRPRF TEXT
SNDF
SNDMSG
MSG TOUSR
SNDPGMMSG
MSG
SNDRCVF
SNDUSRMSG
MSG
WRKOUTQ
OUTQ
WRKSPLF
Dept#
Commission
9999
9999
$$$$9.99
$$$$9.99
$,$$$,$$9.99
Download