IBM AS/400 Frozen Dessert Maker User Manual


 
Using SEU
*===============================================================*
* MODULE NAME: EMPRPT
* RELATED FILES: EMPMST (PHYSICAL FILE)
* QSYSPRT (PRINTER FILE)
* DESCRIPTION: This program prints employee information
* from the file EMPMST.
*===============================================================*
FQSYSPRT O F 80 PRINTER
FEMPMST IP E K DISK
D TYPE S 8A
D EMPTYPE PR 8A
D CODE 1A
IEMPREC 01
C EVAL TYPE = EMPTYPE(ETYPE)
OPRINT H 1P 2 6
O 50 'EMPLOYEE INFORMATION'
O H1P
O 12 'NAME'
O 34 'SERIAL #'
O 45 'DEPT'
O 56 'TYPE'
O D01
O ENAME 20
O ENUM 32
O EDEPT 45
O TYPE 60
* Procedure EMPTYPE returns a string representing the employee
* type indicated by the parameter CODE.
P EMPTYPE B
D EMPTYPE PI 8A
D CODE 1A
C SELECT
C WHEN CODE = 'M'
C RETURN 'Manager'
C WHEN CODE = 'R'
C RETURN 'Regular'
C OTHER
C RETURN 'Unknown'
C ENDSL
P EMPTYPE E
Figure 28. Source for EMPRPT member
5. Press F3 (Exit) to go to the Exit display. Type Y (Yes) to save EMPRPT.
The member EMPRPT is saved.
Figure 29 on page 55 shows the DDS which is referenced by the EMPRPT source.
54 ILE RPG for AS/400 Programmer's Guide