IBM AS/400 Frozen Dessert Maker User Manual


 
Using SPECIAL Files
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... *
DName+++++++++++ETDsFrom+++To/L+++IDc.Functions++++++++++++++++++++++++++++
D ERROR S 5S 0
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... *
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq....
*----------------------------------------------------------------*
* The first 4 parameters are ILE RPG created parameter list. *
* The rest are defined by the programmer-defined PLIST. *
*----------------------------------------------------------------*
C *ENTRY PLIST
C PARM OPTION 1
C PARM STATUS 1
C PARM ERROR 5 0
C PARM AREA 20
C PARM FLD1 1
*----------------------------------------------------------------*
* The user written program will perform the file I/O according *
* to the option passed. *
*----------------------------------------------------------------*
C SELECT
C WHEN OPTION = 'O'
C* perform OPEN operation
C WHEN OPTION = 'W'
C* perform WRITE operation
C WHEN OPTION = 'C'
C* perform CLOSE operation
C ENDSL
C RETURN
Figure 164. User-written program USERIO
The I/O operations for the SPECIAL device are controlled by the user-written
program USERIO. The parameters specified for the programmer-defined
PLIST(SPCL) are added to the end of the RPG-created parameter list for the
SPECIAL device. The programmer-specified parameters can be accessed by the
user ILE RPG program and the user-written routine USERIO; whereas the
RPG-created parameter list can be accessed only by internal ILE RPG logic and
the user-written routine.
330 ILE RPG for AS/400 Programmer's Guide