Справочник Пользователя для IBM AS/400

Скачать
Страница из 489
 
Search by Zip Code
 
 
 
********************************************************************
*
SUBROUTINE - SFLPRC
*
PURPOSE 
- PROCESS SUBFILE AND DISPLAY
*
 
********************************************************************
 
SFLPRC
BEGSR
 
NXTPAG
TAG
 
C
EXSR
SFLCLR
 
C
EXSR
SFLFIL
 
SAMPAG
TAG
 
C
WRITE 
FOOT2
 
C
WRITE 
HEAD
 
C
EXFMT 
SUBCTL
 
C
IF
*IN95
 
C
IF
NOT *IN71
 
C
GOTO
NXTPAG
 
C
ELSE
 
C
GOTO
SAMPAG
 
C
ENDIF
 
C
ENDIF
 
C
ENDSR
 
********************************************************************
*
SUBROUTINE - SFLFIL
*
PURPOSE 
- FILL SUBFILE
*
 
********************************************************************
 
SFLFIL
BEGSR
 
C
DOW
NOT *IN21
 
ZIP
READE 
CMLREC2
71
 
C
IF
*IN71
 
C
MOVE
*ON
*IN21
 
C
ELSE
 
C
ADD
1
RECNUM
 
C
WRITE 
SUBFILE
21
 
C
ENDIF
 
C
ENDDO
 
C
ENDSR
 
********************************************************************
*
SUBROUTINE - SFLCLR
*
PURPOSE 
- CLEAR SUBFILE RECORDS
*
 
********************************************************************
 
SFLCLR
BEGSR
 
C
MOVE
*ON
*IN55
 
C
WRITE 
SUBCTL
 
C
MOVE
*OFF
*IN55
 
C
MOVE
*OFF
*IN21
 
C
Z-ADD 
*ZERO
RECNUM
5 0
 
C
ENDSR
Figure  184  (Part  2  of  2).  Source for module SCHZIP
The file description specifications identify the disk file to be searched and the
display device file to be used (SZIPMENU). The SFILE keyword for the WORKSTN
file identifies the record format (SUBFILE) that is to be used as a subfile. The
relative-record-number field (RECNUM) specified controls which record within the
subfile is being accessed.
The program displays the PROMPT record format and waits for the workstation
user's response. F3 sets on indicator 03, which controls the end of the program.
362
ILE RPG for AS/400 Programmer's Guide