IBM AS/400 Manual de usuario Pagina 321

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 489
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 320
Methods for Processing Disk Files
OPRINT H 1P 2 6
O 40 'EMPLOYEE WEEKLY WORKING '
O 52 'HOURS REPORT'
O H01 1
O 12 'EMPLOYEE: '
O ENAME 32
O H01 1
O 12 'SERIAL #: '
O ENUM 17
O 27 'DEPT: '
O EDEPT 30
O 40 'TYPE: '
O ETYPE 41
O H01 1
O 20 'WEEK #'
O 50 'HOURS WORKED'
O D12 1
O WEEKNO 18
O EHWRK 3 45
Figure 148 (Part 2 of 2). Sequential-by-Key Processing, Example 2
EXAMPLE PROGRAM 3 (Matching-Record Technique):
In this example, the
TRWEEK file is defined as a secondary input file. The EMPREC and RCWEEK
records are processed as matching records, with the ENUM field in both records
assigned the match level value of M1. Record-identifying indicators 01 and 02 are
assigned to the records to control the processing for the different record types.
*****************************************************************
* PROGRAM NAME: YTDRPT5 *
* RELATED FILES: EMPMST (Physical File) *
* TRWEEK (Physical File) *
* PRINT (Printer File) *
* DESCRIPTION: This program shows an example of processing *
* records using the matching record method. *
* This program prints out each employee's *
* information, weekly worked hours and amount *
* of overtime. *
*****************************************************************
FPRINT O F 80 PRINTER
FEMPMST IP E K DISK
FTRWEEK IS E K DISK
IEMPREC 01
I ENUM M1
IRCWEEK 02
I ENUM M1
Figure 149 (Part 1 of 2). Sequential-by-Key Processing, Example 3
Chapter 16. Accessing Database Files 297
Vista de pagina 320
1 2 ... 316 317 318 319 320 321 322 323 324 325 326 ... 488 489

Comentarios a estos manuales

Sin comentarios