$EFD WHEN Conditions [ TABLENAME = TableName ] |
*(( EFD WHEN Conditions [ TABLENAME = TableName ] )) |
*>(( EFD WHEN Conditions [ TABLENAME = TableName ] )) |
Condition [ {AND} Condition [...[ {AND} Condition ] ] ] {OR } {OR } |
{ Field { = } Value } { <= } { < } { >= } { > } { != } { Field = OTHER } |
$EFD FILE=INV FD INVOICE. $EFD WHEN INV-TYPE = "A" TABLENAME = INV-HEADER 01 INV-RECORD-HEADER. 03 INV-KEY. 05 INV-TYPE PIC X. 05 INV-NUMBER PIC 9(5). 05 INV-ID PIC 999. 03 INV-CUSTOMER PIC X(30). $EFD WHEN INV-TYPE = "B" TABLENAME = INV-DETAILS 01 INV-RECORD-DETAILS. 03 INV-KEY-D. 05 INV-TYPE-D PIC X. 05 INV-NUMBER-D PIC 9(5). 05 INV-ID-D PIC 999. 03 INV-ARTICLES PIC X(30). 03 INV-QTA PIC 9(5). 03 INV-PRICE PIC 9(17). |
*>WRITE HEADER ROW MOVE "A" TO INV-TYPE MOVE 1 TO INV-NUMBER MOVE 0 TO INV-ID MOVE "acme company" TO INV-CUSTOMER WRITE INV-RECORD-HEADER *>WRITE DETAIL ROWS MOVE "B" TO INV-TYPE MOVE 1 TO INV-NUMBER MOVE 0 TO INV-ID MOVE "floppy disk" TO INV-ARTICLES MOVE 10 TO INV-QTA MOVE 123 TO INV-PRICE WRITE INV-RECORD-DETAILS |
$EFD FILE=INV FD INVOICE. 01 REC-INVOICE. 03 INV-KEY. 05 INV-TYPE PIC X. 05 INV-NUMBER PIC 9(5). 05 INV-ID PIC 999. $EFD WHEN INV-TYPE = "A" TABLENAME = INV-HEADER 03 INV-RECORD-HEADER. 05 INV-CUSTOMER PIC X(30). $EFD WHEN INV-TYPE = "B" TABLENAME = INV-DETAILS 03 INV-RECORD-DETAILS REDEFINES INV-RECORD-HEADER. 05 INV-ARTICLES PIC X(30). 05 INV-QTA PIC 9(5). 05 INV-PRICE PIC 9(17). |
$EFD FILE=CUST FD CUST. 01 CUST-RECORD. 03 CUST-COD PIC X(5). 03 CUST-NAME1 PIC X(35). 03 CUST-NAME2 PIC X(35). 03 CUST-CONTACT PIC 9. |1 for e-mail, 2 for cell phone 03 CUST-CELL PIC X(32). $EFD WHEN CUST-CONTACT = "1" 03 CUST-EMAIL PIC X(32) REDEFINES CUST-CELL. |