$EFD WHEN OTHER TABLENAME = TableName |
*(( EFD WHEN OTHER TABLENAME = TableName )) |
*>(( EFD WHEN OTHER TABLENAME = TableName )) |
$EFD FILE=INV FD INVOICE. $EFD WHEN INV-TYPE = "H" OR 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 OTHER 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 "H" 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 "D" 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 |