EXFMT (WRITE THEN READ WORKSTATION DEVICE)


The EXFMT operation performs the functional equivalent of a WRITE operation followed immediately by a READ operation. This operation can be used with a device (i.e., nondatabase) file only. Example 11.3 illustrates the use of the EXFMT operation.

Example 11.3: Retrieve and display a database record.

start example
 .....FFileName++IFEASFRlen+LKeylnKFDevice+.Functions++++++++++++++++++++++++++++ 0001 FCUSTINQ   CF   E             WORKSTN 0002 FCUSTMAST  IF   E           K DISK .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq.... 0003 C     INDEX         CHAIN     CustRec                            71 0004 C                   EVAL      NotFound = *IN71 0005 C                   IF        NotFound = *OFF 0006 C                   EXFMT     DSPCUST                              73 0007 C                   ENDIF 
end example

In Example 11.3, a record from the CUSTMAST database file (line 2) is retrieved (line 3). The workstation file CUSTINQ (line 1) is written to and read from with the EXFMT (line 6). The DSPCUST workstation file format is used in factor 2 of the EXFMT operation.

When several workstation file formats are needed on the display, the additional formats must be written with the WRITE operation. The final format (the one after which an input operation is required) can be written to the workstation file with the EXFMT operation. This effectively performs a WRITE followed by a READ.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net