--------------------------------------------------------------------------------

IFOP data files

--------------------------------------------------------------------------------

Data files (listed alphabetically)
(*) means that the file is not included in the field descriptions section


ACKLIN - same as SALIN, for order acknowledgements (*)
ACKORD - same as SAORD, for order acknowledgements (*)
ALTERNATES - index for alternate product numbers
APCHQ - A/P cheques
APTR - A/P transactions
ARCTOOLS - archived tool lists
AUDIT - audit details from data entry operations
BILLTO - addresses for freight billing
BIN - warehouse storage bins
BINALLOC - daily bin allocation for shipping
BNCHQ - data sent to the bank (*)
BNCLR - data received from the bank (*)
BUCKET - buckets for production processes
CFLIN - daily order lines for customs and EDI
CFORD - daily orders for customs and EDI
COSTHIST - history of costing calculation summary
CUSCONT - customer contact details
CUSTOMER - customers
DAYREL - customer EDI daily material releases
DELJITEX - EDI shipping details
DRAWINGS - product and tool drawings for display
EDINFO - EDI ISA counters (*)
EMPL - employees (*)
GLAP - G/L export data (*)
GLDIST - G/L chart of accounts
GLTOOLCOST - G/L tool cost
GLTR - G/L transactions
HEAT - steel heat details
HTRANS - details for metallurgical test report
IFGFL - A/R export data (*)
IFPART - same as PART, for special uses (*)
IFPURLIN - same as PURLIN, for special uses (*)
IFPURORD - same as PURORD, for special uses (*)
IFTOOLPROD - same as TOOLPROD, for special uses (*)
IFTOOLS - same as TOOLS, for special uses (*)
INAPTR - same as APTR, for special uses (*)
INFOFL - system variables and parameters
INTMPORD - same as TMPORD, for special uses (*)
ITMACHINE - same as MACHINE, for special uses (*)
ITOPERATIONS - same as OPERATIONS, for special uses (*)
ITPRODUCT - same as PRODUCT, for special uses (*)
LABELS - product packing labels
LDTBL - payroll G/L codes and accounts (*)
LDTR - payroll G/L transactions (*)
LOT - product lot details
LOTHIST - product lot history
MACHINE - machines and other production processes
MACSCHED - production short schedule
MACTYPE - costing details for machine types
MATREL - customer EDI long term material releases
MILL - rolling mill cycle details
MNTLIN - machine maintenance order lines
MNTMAC - non-production machines
MNTMAST - machine maintenance master orders
MNTORD - machine maintenance orders
NUTBOLT - index for nuts shipped with bolts
OPERATIONS - lists of production operations
PACKING - product packing types
PART - purchased parts
PARTRANS - purchased parts stock transactions
PCLIN - input PCL data for PDRAWINGS (*)
PDRAWINGS - product and tool drawings for printing
PHYSINV - physical inventory items
PLANT - destination plants
PRICE - product prices
PRICEHIST - product price history
PRODORD - production orders
PRODTRANS - product stock transactions
PRODUCT - manufactured products
PURBIN - purchased parts storage bins
PURHIST - purchase history
PURLIN - purchase order lines
PURORD - purchase orders
QBIN - warehouse quarantined bins
QUOTLIN - quotation order lines
QUOTORD - quotation orders
SALESMAN - salesmen
SALHIST - sales history
SALIN - sales order lines
SALSUM - sales history yearly summary
SALTOT - sales history analysis totals
SAORD - sales orders
SHIPLIN - daily shipped order lines
SHIPORD - daily shipped orders
SHIPTO - various ship-to locations
SHIPVIA - shipping carriers
SIXIN - input sixel data for DRAWINGS (*)
SOLDTO - addresses that override regular address
STATEMENT - archived customer statements
SUBCON - subcontractor transactions
SUBINV - subcontractor invoicing details
TABLES - various system tables
TMPLIN - same as SALIN, for reports (*)
TMPORD - same as SAORD, for reports (*)
TMPURLIN - same as PURLIN, for A/P invoices (*)
TMPURORD - same as PURORD, for A/P invoices (*)
TOOLPROD - index for tool operations
TOOLS - tool lists
TRANS - sales transactions
TRAUDIT - audit details from A/R transactions
USERS - user variables
VENDOR - vendors
WORKSHEET - worksheets for production processes

--------------------------------------------------------------------------------

Field descriptions (files listed alphabetically)


FD  ALTERNATES.  index for alternate product numbers
01  AL-RECORD PIC X(50).
01  AL-REC.
    02 AL-KEY.
      03 AL-PROD PIC X(12).  product no.
      03 AL-ALT PIC X(12).   alternate product no. (blank for the generic product no.)

FD  APCHQ.  A/P cheques
01  AH-RECORD PIC X(50).
01  AH-REC.
    02 AH-KEY.
      03 AH-DIV PIC 99.  A/P division
      03 AH-US PIC 9.    indicator: 0/1 = Can$/US$
      03 AH-NO PIC 9(6). cheque no.
    02 AH-VEN PIC 9(4) COMP-3.  vendor no.
    02 AH-CHQDATE PIC X(10).    cheque date as alpha field
    02 AH-NET PIC S9(7)V99 COMP-3.    net amount
    02 AH-GROSS PIC S9(7)V99 COMP-3.  gross amount
    02 AH-MDATE PIC 9(6) COMP-3.    date cheque mailed
    02 AH-CHNDATE PIC 9(6) COMP-3.  cheque date

FD  APTR BLOCK 2048.  A/P transactions
01  AT-RECORD PIC X(650).
01  AT-REC.
    02 AT-KEY.
      03 AT-DIV PIC 99.    A/P division
      03 AT-VEN PIC 9(4).  vendor no.
      03 AT-TYPE PIC 9.    invoice type: 0/1 = regular/direct pay
      03 AT-INV PIC X(15). invoice no.
    02 AT-KD.
      03 AT-KDIV PIC 99.    A/P division
      03 AT-KVEN PIC 9(4).  vendor no.
      03 AT-ZDATE PIC 9(6). date, descending key
      03 AT-KTYPE PIC 9.    invoice type: 0/1 = regular/direct pay
      03 AT-KINV PIC X(15). invoice no.
    02 AT-IND PIC 9 COMP-3.    indicator: 0/1 = no/yes invoice paid
    02 AT-MANUAL PIC 9 COMP-3. indicator: 0/1 = no/yes created manually
    02 OCCURS 10.  table of up to 10 G/L distribution accounts
      03 AT-GL PIC 9(18).             G/L account
      03 AT-AMT PIC S9(7)V99 COMP-3.  amount
      03 AT-QTY PIC S9(9) COMP-3.     quantity
    02 AT-EXCH PIC 99V9(4) COMP-3.  currency exchange rate (0.00 = Can$)
    02 AT-MEMO PIC X(18).  notes line
    02 AT-PROJECT PIC 9(6) COMP-3.  project no.
    02 AT-DATE PIC 9(6) COMP-3.     entry date
    02 AT-INV-DATE PIC 9(6) COMP-3. invoice date
    02 AT-EFF-DATE PIC 9(6) COMP-3. effective date
    02 AT-DUE-DATE PIC 9(6) COMP-3. due date
    02 AT-GROSS PIC S9(7)V99 COMP-3.  gross amount
    02 AT-NET PIC S9(7)V99 COMP-3.    net amount
    02 AT-DISC PIC S9(7)V99 COMP-3.   discount
    02 AT-TOTAL PIC S9(7)V99 COMP-3.  total amount
    02 AT-PST PIC S9(7)V99 COMP-3.    PST amount
    02 AT-GST PIC S9(7)V99 COMP-3.    GST amount
    02 AT-FREIGHT PIC S9(7)V99 COMP-3.  freight amount
    02 AT-FRPAY PIC 9 COMP-3.  indicator: 0/1 = no/yes freight paid to vendor
    02 AT-FGL PIC 9(18).  freight G/L account
    02 AT-ORD PIC X(8).   purchase order no.
    02 AT-CHQNO PIC 9(6) COMP-3.  cheque no.
    02 AT-CHQDATE PIC X(10).  cheque date
    02 AT-WIND PIC 9 COMP-3.  [system work field]
    02 AT-NAME PIC X(30).  name (name & address fields for special vendor)
    02 AT-ADD1 PIC X(30).  address line 1
    02 AT-ADD2 PIC X(24).  address line 2
    02 AT-POST PIC X(7).   postal code
    02 AT-EXP-DATE PIC 9(6) COMP-3.  date invoice included in export file

FD  ARCTOOLS.  archived tool lists
01  TY-RECORD PIC X(3400).
01  TY-REC.
    02 TY-KEY.
      03 TY-PROD PIC X(12).  product no.
      03 TY-MAC PIC 99.      machine
      03 TY-ID PIC X.        archive level identifier
    02 TY-TSREC PIC X(3300).  copy of original tool list record
    02 TY-DATE PIC 9(6) COMP-3.  date archived
    02 TY-NOTE PIC X(50).        notes line

FD  AUDIT BLOCK 2048.  audit details from data entry operations
01  AU-RECORD PIC X(650).
01  AU-REC.
    02 AU-KEY.
      03 AU-K PIC 99.  data entry function code
      03 AU-L PIC 99.  data entry detail code
      03 AU-DATE PIC 9(6).  date
      03 AU-TIME PIC 9(8).  time
    02 AU-IND PIC 9 COMP-3. indicator: 0/1 = no/yes record printed
    02 AU-DATA PIC X(631).  data entered

FD  BILLTO.  addresses for freight billing
01  BT-RECORD PIC X(240).
01  BT-REC.
    02 BT-KEY.
      03 BT-CUS PIC X(6).  customer no.
      03 BT-TO PIC 99.     bill-to code
    02 BT-LINE PIC X(50) OCCURS 4.  4 name & address lines

FD  BIN BLOCK 2048.  warehouse storage bins
01  B-RECORD PIC X(60).
01  B-REC.
    02 B-KEY.
      03 B-NO PIC X(5).   bin no.
    02 B-KP.
      03 B-PROD PIC X(12).  product no.
      03 B-LYEAR PIC 9(4).  lot year
      03 B-LOT PIC 9(7).    lot no.
      03 B-DATE PIC 9(6).   date product stored in bin
    02 B-QTY PIC S9(9) COMP-3.    quantity
    02 B-QTY-AL PIC S9(9) COMP-3. quantity allocated
    02 B-CONT PIC X.              container code
    02 B-QTY-PACK PIC 9(5) COMP-3.  carton quantity
    02 B-IND PIC 9 COMP-3.  [system work field]
    02 B-QREASON PIC XX.  quarantine reason code

FD  BINALLOC.  daily bin allocation for shipping
01  BA-RECORD PIC X(50).
01  BA-REC.
    02 BA-KEY.
      03 BA-NO PIC 9(10).  order, extension, line
      03 REDEFINES BA-NO.
        04 BA-ORDSEQ PIC 9(8).  order no. and order extension
        04 REDEFINES BA-ORDSEQ.
          05 BA-ORD PIC 9(6).   order no.
          05 BA-SEQ PIC 99.     order extension
        04 BA-LINE PIC 99.  order line
      03 BA-BIN PIC X(5).   bin no.
    02 BA-PROD PIC X(12).   product no.
    02 BA-LOT PIC 9(7) COMP-3.  lot no.
    02 BA-QTY PIC S9(7) COMP-3. quantity
    02 BA-QTY-PACK PIC 9(5) COMP-3.  carton quantity
    02 BA-CARTONS PIC 999 COMP-3.    number of cartons
    02 BA-PARTIAL PIC 9 COMP-3.  indicator: 0/1 = no/yes partial carton was allocated
    02 BA-IND PIC 9 COMP-3. [system work field]
    02 BA-BN PIC 9 COMP-3.  indicator: 0/1/2 = bolt / bolt in bolt+nut / nut
    02 BA-LABELS PIC 999 COMP-3.  [system work field]

FD  BUCKET.  buckets for production processes
01  BU-RECORD PIC X(50).
01  BU-REC.
    02 BU-KEY.
      03 BU-JKEY.
        04 BU-NO PIC 9(6).   M.O. no. (manufacturing order)
        04 BU-MAC PIC 9(4).  machine/process no.
        04 BU-DATE PIC 9(6). date
        04 BU-SHIFT PIC 9.   operator shift code
        04 BU-EMP PIC 9(4).  operator employee no.
      03 BU-NUM PIC 9(4).    bucket no.
    02 BU-KN.
      03 BU-KNUM PIC 9(4).   bucket no.
      03 BU-ZDATE PIC 9(6).  date, descending key
    02 BU-WEIGHT PIC 9(4) COMP-3.  weight
    02 BU-SEQ PIC 99 COMP-3. bucket sequence no.

FD  CFLIN.  daily order lines for customs and EDI
01  FL-RECORD PIC X(115).
01  FL-REC.
    02 FL-KEY.
      03 FL-BL PIC 9(7).  bill of lading no.
      03 FL-SEQ PIC 9(4). line no. on bill of lading
    02 FL-PROD PIC X(12).  product no.
    02 FL-QTY PIC S9(9) COMP-3.  quantity
    02 FL-PRICE PIC 9(4)V999 COMP-3. price
    02 FL-MODE PIC X.                price mode
    02 FL-EXT PIC S9(7)V99 COMP-3.   line extension amount
    02 FL-DXNO PIC 9(4) COMP-3.  [system work field]
    02 FL-QTY-CUM PIC S9(9) COMP-3.  quantity already shipped for this order
    02 FL-CUSORD PIC X(9).   customer order no.
    02 FL-RC PIC X(12).      returnable containers id
    02 FL-PKSLIP PIC 9(7) COMP-3.  packing slip no.
    02 FL-MODYR PIC 99 COMP-3.     model year
    02 FL-CARTONS PIC 9(5) COMP-3. number of cartons
    02 OCCURS 2. 03 OCCURS 3.      table of up to 3 countries
      04 FL-COUNTRY PIC 99 COMP-3.   code of country of origin
      04 FL-CQTY PIC S9(9) COMP-3.   quantity

FD  CFORD BLOCK 1024.  daily orders for customs and EDI
01  FO-RECORD PIC X(320).
01  FO-REC.
    02 FO-KEY.
      03 FO-BL PIC 9(7).  bill of lading no.
    02 FO-SID PIC 9(7) COMP-3.  shipment id
    02 FO-VIA PIC 99 COMP-3.    ship via code
    02 FO-IND PIC 9 COMP-3.  indicator: 0/1 = no/yes marked to be shipped
    02 FO-PIND PIC 9 COMP-3 OCCURS 8.  indicators: 0/1 = no/yes various functions were performed
    02 FO-CUS PIC X(6).  customer no.
    02 FO-SHIPTO PIC 99 COMP-3. ship-to code
    02 FO-NAME PIC X(32).  ship-to name
    02 FO-ADD1 PIC X(24).  ship-to address line 1
    02 FO-ADD2 PIC X(24).  ship-to address line 2
    02 FO-POST PIC X(10).  ship-to postal code
    02 FO-DATE PIC 9(6) COMP-3.  order date
    02 FO-INV-DATE PIC 9(6) COMP-3.  invoice date
    02 FO-LINES PIC 9(4) COMP-3.  number of lines
    02 FO-STATE PIC XX.   U.S. destination state
    02 FO-PAYER PIC X.    code for payer of freight charges
    02 FO-FOB PIC X(15).    FOB
    02 FO-ENTRY PIC X(8).   port of entry
    02 FO-BORDER PIC X(8).  border point
    02 FO-FILL1 PIC X(10).  [dummy field]
    02 FO-GROSS PIC 9(8) COMP-3.  gross weight
    02 FO-NET PIC 9(8) COMP-3.    net weight
    02 FO-PALLETS PIC 999 COMP-3. number of pallets
    02 FO-FILL2 PIC X(7).   [dummy field]
    02 FO-FRATE PIC 9(4)V99 COMP-3.  freight rate/100 kg
    02 FO-TOTAL PIC S9(7)V99 COMP-3. total shipment amount
    02 FO-EQCODE PIC XX.   carrier equipment code
    02 FO-EQINIT PIC X(4). carrier trailer prefix
    02 FO-EQNUM PIC X(10). carrier trailer no.
    02 FO-ETRESP PIC X.    excess transportation charges responsibility code
    02 FO-ETNUM PIC X(8).  excess transportation charges AETC no.
    02 FO-ORD PIC 9(6) COMP-3.  order no.
    02 FO-CARRID PIC X(11).     GM SLI carrier no.
    02 FO-TQTY PIC S9(9) COMP-3.  total quantity shipped
    02 FO-DOCK PIC X(8).  destination dock id
    02 FO-FILL3 PIC X(8). [dummy field]
    02 FO-DXNO PIC 9(4) COMP-3.  [system work field]
    02 FO-INVNO PIC 9(6) COMP-3. invoice no.
    02 FO-PACKS PIC 9(4) COMP-3 OCCURS 12.  number of containers (up to 12 types)

FD  COSTHIST.  history of costing calculation summary
01  CU-RECORD PIC X(390).
01  CU-REC.
    02 CU-KEY.
      03 CU-PROD PIC X(12).  product no.
    02 CU-HIST OCCURS 8.  table of last 8 costing periods (1 = most recent)
      03 CU-NUM PIC 99 COMP-3.   period no.
      03 CU-MAC PIC 99 COMP-3.   machine
      03 CU-TOT PIC S9(5)V999 COMP-3 OCCURS 4.  costs with mode 1 (material, third party, conversion, tools)
      03 CU-NTOT PIC S9(5)V999 COMP-3 OCCURS 4. costs with mode 3 (material, third party, conversion, tools)

FD  CUSCONT.  customer contact details
01  CY-RECORD PIC X(1500).
01  CY-REC.
    02 CY-KEY.
      03 CY-NO PIC X(6).  customer no.
    02 OCCURS 10.   table of up to 10 contacts
      03 CY-FIRST PIC X(10).    first name
      03 CY-LAST PIC X(10).     last name
      03 CY-POSITION PIC X(10). position
      03 CY-PHONE PIC X(13).    telephone no.
      03 CY-EXT PIC X(4).       extension
      03 CY-FAX PIC X(13).      fax no.
      03 CY-EMAIL PIC X(30).    email
      03 CY-CITY PIC X(15).     city
      03 CY-STATE PIC XXX.      state
      03 CY-COUNTRY PIC X(5).   country
      03 CY-FILL1 PIC X(17).    [dummy field]

FD  CUSTOMER BLOCK 2048.  customers
01  C-RECORD PIC X(390).
01  C-REC.
    02 C-KEY.
      03 C-NO PIC X(6).  customer no.
    02 C-TER PIC 99 COMP-3.  territory
    02 C-PROV PIC 99 COMP-3. province
    02 C-SAL PIC 99 COMP-3.  salesman
    02 C-KN.
      03 C-NAME PIC X(32).  name
    02 C-ADD1 PIC X(24).    address line 1
    02 C-ADD2 PIC X(24).    address line 2
    02 C-EDICF PIC 9 COMP-3.  indicator: 0/1 = no/yes use EDI customs form
    02 C-US PIC 9 COMP-3.     currency indicator: 0/1 = Can$/US$
    02 C-MTEST PIC 9 COMP-3.  indicator: 0/1 = yes/no print MTR
    02 C-SURLN PIC 9 COMP-3.  indicator: 0/1 = yes/no print "includes surcharge" on invoice
    02 C-HOLD PIC 9 COMP-3.   indicator: 0/1 = no/yes credit hold
    02 C-VIA PIC 99 COMP-3.   ship via code
    02 C-STAT PIC 9 COMP-3.   indicator: 0/1 = yes/no print statements
    02 C-BACK PIC 9 COMP-3.   indicator: 0/1 = yes/no accepts back orders
    02 C-INS PIC 9(7) COMP-3.     insurance
    02 C-CREDIT PIC 9(8) COMP-3.  credit limit
    02 C-DB PIC XXX.              D&B credit code
    02 C-GST PIC X(8).            GST licence
    02 C-PST PIC X(8).            PST licence
    02 C-TOT PIC S9(7)V99 COMP-3.   total balance
    02 C-CUR PIC S9(7)V99 COMP-3.   current balance
    02 C-30 PIC S9(7)V99 COMP-3.    30-day balance
    02 C-60 PIC S9(7)V99 COMP-3.    60-day balance
    02 C-90 PIC S9(7)V99 COMP-3.    90-day balance
    02 C-120 PIC S9(7)V99 COMP-3.   120-day+ balance
    02 C-MTD PIC S9(9) COMP-3.      sales month-to-date
    02 C-YTD PIC S9(9) COMP-3.      sales year-to-date
    02 C-ORD PIC S9(7)V99 COMP-3.   value on order
    02 C-TYPE PIC X.   customer type: blank/U/X/Y = Can / US / automotive Can / automotive US
    02 C-POST PIC X(10).  postal/zip code
    02 C-SUPPLIER PIC X(15).  supplier no. to this customer
    02 C-INFO PIC X(30) OCCURS 3.  3 contact information lines
    02 C-LAST PIC S9(9) COMP-3.    total sales last year
    02 C-BLAST PIC S9(9) COMP-3.   total sales year before last
    02 C-CONTRA PIC 9(7) COMP-3.   G/L contra
    02 C-CRDATE PIC 9(6) COMP-3.   date record created
    02 C-INACTIVE PIC 9 COMP-3.    indicator: 0/1 = no/yes inactive customer
    02 C-PAY-NUM PIC S9(5) COMP-3 OCCURS 3.   number of payments (this year, last, before last)
    02 C-PAY-DAYS PIC S9(7) COMP-3 OCCURS 3.  total days to pay (this year, last, before last)
    02 C-CLASS PIC X.  customer class: W/T/O/D/A = automotive / tier 1 / oem / distributor / affiliate
    02 C-TOT-TMP PIC S9(9) COMP-3 OCCURS 3.  [system work fields]
    02 C-FILL1 PIC X.  [dummy field]
    02 C-AUTO PIC 99 COMP-3.    EDI processing code
    02 C-BROKER PIC 99 COMP-3.  customs broker code
    02 C-LABEL PIC 99 COMP-3.   shipping label code
    02 C-TERMS PIC 99 COMP-3.   pay terms code
    02 C-MCUS PIC X(6).  mother company customer no.
    02 C-IRS PIC X(15).  IRS no. (US tax)
    02 C-FILL2 PIC X(4). [dummy field]
    02 C-SUR PIC 9 COMP-3.  surcharge code
    02 C-DATE-PAY PIC 9(6) COMP-3.  last pay date

FD  DAYREL.  customer EDI daily material releases
01  DY-RECORD PIC X(1500).
01  DY-REC.
    02 DY-KEY.
      03 DY-PLANT PIC X(10).  destination plant id
      03 DY-PROD PIC X(12).   product no.
      03 DY-SEQ PIC 99.       record count
    02 DY-KP.
      03 DY-KPROD PIC X(12).  product no.
      03 DY-KPLANT PIC X(10). destination plant id
    02 DY-TYPE PIC 99 COMP-3. customer EDI code
    02 DY-SEP PIC X.  EDI field separator character
    02 DY-DATE PIC 9(6) COMP-3.  release date
    02 DY-ISA-KEY PIC X(19).  [system work field]
    02 DY-IXL PIC 99 COMP-3.  number of entries in LIN table
    02 DY-IXI PIC 99 COMP-3.  number of entries in INFO table
    02 DY-IXF PIC 99 COMP-3.  number of entries in FST table
    02 DY-LIN. 03 OCCURS 5. 04 DY-LCODE PIC XX. 04 DY-LVAL PIC X(10). table of up to 5 LIN codes/values
    02 DY-INFO. 03 DY-IFLINE PIC X(40) OCCURS 16.  table of up to 16 information lines
    02 DY-FST. 03 OCCURS 30. 04 DY-FQTY PIC S9(7) COMP-3. 04 DY-FDATE PIC 9(6) COMP-3.  table of up to 30 releases:
      04 DY-FQUAL PIC XXX. 04 DY-FTIME PIC 9(4) COMP-3. 04 DY-FRD PIC 9 COMP-3.  qty, date, qualifier, time, use indicator
    02 DY-BSS PIC X(60).  BSS data
    02 DY-ORD PIC 9(6) COMP-3.  order no.
    02 DY-SCHEDULE PIC XX.  schedule code
    02 DY-LF PIC X(10).  receiving line feed id
    02 DY-DXNO PIC 9(4) COMP-3.  [system work field]
    02 DY-FILL1 PIC X(9).  [dummy field]
    02 DY-LABINF PIC X(115). shipping label data
    02 DY-CUSORD PIC X(9).   customer order no.
    02 DY-DOCK PIC X(8).  receiving dock id

FD  DELJITEX.  EDI shipping details
01  DX-RECORD PIC X(2000).
01  DX-REC.
    02 DX-KEY.
      03 DX-NO PIC 9(4).  record no.
    02 DX-DATE PIC 9(6) COMP-3.  date record created
    02 DX-DATA PIC X(1800).    customer-dependent shipping details
    02 DX-TYPE PIC 99 COMP-3.  customer EDI code

FD  DRAWINGS BLOCK 4096.  product and tool drawings for display
01  DR-RECORD PIC X(900).   variable length (13 - 900)
01  DR-REC.
    02 DR-KEY.
      03 DR-DRAW PIC X(8).  drawing no.
      03 DR-PAGE PIC 9.     drawing page no. (1/2)
      03 DR-LINE PIC 9(4).  drawing line no.
    02 DR-DATA PIC X(887).    line data (sixel line, variable length)
    02 REDEFINES DR-DATA.   page header (record with line=0)
      03 DR-NLINES PIC 9(4).  number of lines
      03 DR-DATE PIC 9(6).    date created
      03 DR-TIME PIC 9(8).    time created

FD  GLDIST.  G/L chart of accounts
01  G-RECORD PIC X(115).
01  G-REC.
    02 G-KEY.
      03 G-DIV PIC 99.   A/P division
      03 G-GL PIC 9(18). G/L account
    02 G-DESC PIC X(25). description
    02 G-NGL PIC 9(18).  new G/L account

FD  GLTOOLCOST.  G/L tool cost
01  GTC-RECORD PIC X(30).
01  GTC-REC.
    02 GTC-KEY.
      03 GTC-GL PIC 9(18).  G/L account
    02 GTC-AMT PIC S9(7)V99 COMP-3.  amount

FD  GLTR.  G/L transactions
01  GT-RECORD PIC X(75).
01  GT-REC.
    02 GT-KEY.
      03 GT-DIV PIC 99.    A/P division
      03 GT-VEN PIC 9(4).  vendor no.
      03 GT-INV PIC X(15). invoice no.
      03 GT-TYPE PIC 9. transaction type
      03 GT-SYS PIC 9.  indicator: 0/1 = no/yes record created by the system
      03 GT-GL PIC 9(18).  G/L account
    02 GT-AMT PIC S9(9)V99 COMP-3.  transaction amount
    02 GT-FILL1 PIC X.  [dummy field]
    02 GT-YY PIC 99 COMP-3.  transaction year
    02 GT-MM PIC 99 COMP-3.  transaction month
    02 GT-QTY PIC S9(9) COMP-3.  transaction quantity (if applicable)
    02 GT-INV-DATE PIC 9(6) COMP-3.  invoice date

FD  HEAT.  steel heat details
01  HE-RECORD PIC X(75).
01  HE-REC.
    02 HE-KEY.
      03 HE-NO PIC X(10).   heat no.
    02 HE-DATE PIC 9(6) COMP-3.  date record created
    02 HE-GRADE PIC X(8).      steel grade
    02 HE-C PIC 9V99 COMP-3.   carbon
    02 HE-MN PIC 9V99 COMP-3.  manganese
    02 HE-P PIC V999 COMP-3.   phosphorus
    02 HE-S PIC V999 COMP-3.   sulphur
    02 HE-SI PIC 9V99 COMP-3.  silicon
    02 HE-CU PIC 9V99 COMP-3.  copper
    02 HE-NI PIC 9V99 COMP-3.  nickel
    02 HE-CR PIC 9V99 COMP-3.  chromium
    02 HE-MO PIC V999 COMP-3.  molybdenum
    02 HE-SN PIC V999 COMP-3.  tin
    02 HE-AL PIC V999 COMP-3.  aluminum
    02 HE-B PIC V9999 COMP-3.  boron
    02 HE-V PIC V999 COMP-3.   vanadium
    02 HE-CO PIC V999 COMP-3.  cobalt
    02 HE-N PIC V9999 COMP-3.  nitrogen
    02 HE-DIVAL PIC 9V99 COMP-3.  DI value

FD  HTRANS.  details for metallurgical test report
01  HT-RECORD PIC X(240).
01  HT-REC.
    02 HT-KEY.
      03 HT-INVLN.
        04 HT-INV PIC 9(6).  invoice no.
        04 HT-LN PIC 99.     invoice line no.
      03 HT-LYEAR PIC 9(4).  lot year
      03 HT-LOT PIC 9(7).    lot no.
    02 HT-IND PIC 9 COMP-3.  indicator: 0/1 = no/yes record was printed
    02 HT-CUSORD PIC X(9).   customer order no.
    02 HT-BL PIC 9(7) COMP-3.  bill of lading no.
    02 HT-CUS PIC X(6).        customer no.
    02 HT-SHIPTO PIC 99 COMP-3.  ship-to code
    02 HT-NAME PIC X(32).  ship-to name
    02 HT-ADD1 PIC X(24).  ship-to address line 1
    02 HT-ADD2 PIC X(24).  ship-to address line 2
    02 HT-POST PIC X(10).  ship-to postal code
    02 HT-PROD PIC X(12).  product no.
    02 HT-QTY PIC S9(9) COMP-3.  quantity
    02 HT-CUSPART PIC X(12).  customer part no.

FD  INFOFL.   system variables and parameters
01  IF-RECORD PIC X(1800).
01  IF-REC.
    02 IF-ORDNO PIC 9(6).  last order no.
    02 IF-INVNO PIC 9(6).  last invoice no.
    02 IF-PST PIC 99.  PST rate
    02 IF-BLNO PIC 9(7).   last bill of lading no.
    02 IF-SPINVNO PIC 9(6).  last special invoice no.
    02 IF-GST PIC 99.  GST rate
    02 IF-RNO PIC 9(6) OCCURS 10.  M.O. (manufacturing order) automatic sequence numbers
    02 IF-PRINTER PIC 9.  indicator: 0/1 = main/Epson printer used by certain functions
    02 IF-GMR-DATE PIC 9(6).  last GM EDI remittance advice date
    02 IF-FILL1 PIC X(18).  [dummy field]
    02 OCCURS 15. 03 IF-OFF-DATE1 PIC 9(6). 03 IF-OFF-DATE2 PIC 9(6).  15 ranges of production off dates
    02 IF-RMSUR PIC 9(4)V999.  surcharge amt/ton
    02 IF-SURCH PIC V999 OCCURS 9.  steel surcharge values
    02 IF-FILL2 PIC X(5).  [dummy field]
    02 IF-SHP-SAVNO PIC 9(6).  saved IF-SPINVNO for S-20 restore
    02 IF-DXNO PIC 9(4).  last DX-NO no.
    02 IF-HST PIC 99.    HST rate
    02 IF-QST PIC 99V9.  QST rate
    02 IF-SALMTD-IG PIC S9(6)V99.  sales MTD total for special use
    02 IF-SAV-SAL-IG PIC S9(6)V99.  saved IF-SALMTD-IG
    02 IF-QUOTNO PIC 9(6).  last quotation no.
    02 IF-LABNO PIC 9(8).   last labels serial no.
    02 OCCURS 5. 03 IF-EXCHX. 04 IF-EXCH PIC 9V9(4) OCCURS 12.  US$ exchange rates (5 years x 12 months)
    02 IF-EXCH-AP PIC 9V9(4).  US$ exchange rate for A/P
    02 IF-SHP-IND PIC 9.      indicator: 0/1 = yes/no S-20 completed OK
    02 IF-SHP-DATE PIC 9(6).  S-20 verification date
    02 IF-SAV-SAL PIC S9(6)V99 OCCURS 5.  saved IF-SALMTD
    02 IF-FILL3 PIC X(9).  [dummy field]
    02 IF-CST-NUM PIC 99 OCCURS 8.  last 8 costing period nos.
    02 IF-CST-PERIOD PIC X(10) OCCURS 8.  last 8 costing period descriptions
    02 IF-ITORDNO PIC 9(5).  last P.O. no. for Irvine Tools
    02 IF-EXCH-YY PIC 99.  oldest year for US$ exchange rates table IF-EXCHX
    02 IF-DEM-DATE PIC 9(6).  limit date for current demand
    02 IF-CST-FREIGHT PIC 99V999.  freight rate/ton
    02 IF-MAINTNO PIC 9(6).  last maintenance order no.
    02 IF-PRNSEQ PIC 99.  last no. for system-generated print file names
    02 IF-RMPROC PIC 999V99 OCCURS 8.    raw material process values
    02 IF-RMPROC-A PIC 999V99 OCCURS 2.  raw material category 130 process values
    02 IF-RMCLEAN PIC 999V99 OCCURS 8.   raw material cleaning values
    02 IF-SALMTD PIC S9(7)V99 OCCURS 8.  sales MTD totals
    02 OCCURS 2. 03 IF-SALVAL PIC S9(8)V99 OCCURS 27.  G/L MTD totals for the G/L export file
    02 IF-USALMTD PIC S9(6)V99 OCCURS 5.  US$ sales MTD totals
    02 IF-SAV-USAL PIC S9(6)V99 OCCURS 5.  saved IF-USALMTD

FD  LABELS.  product packing labels
01  LA-RECORD PIC X(240).
01  LA-REC.
    02 LA-KEY.
      03 LA-NO PIC 9(8).  serial no. of first label in series
    02 LA-KL.
      03 LA-ZLYEAR PIC 9(4).  lot year, descending key
      03 LA-ZLOT PIC 9(7).    lot no., descending key
      03 LA-ZDATE PIC 9(6).   date, descending key
      03 LA-ZTIME PIC 9(8).   time, descending key
    02 LA-PR PIC 9 COMP-3.  indicator: 0/1/2 = label not yet printed / printed / canceled
    02 LA-USER PIC X(12).   VMS user id of person who created the label
    02 LA-SRC PIC 9 COMP-3.  label source code
    02 LA-TYPE PIC 99 COMP-3.  label type
    02 LA-LOT PIC 9(7) COMP-3. product lot no.
    02 LA-PROD PIC X(12).      product no.
    02 LA-DATE PIC 9(6) COMP-3.  date label created
    02 LA-CUS PIC X(6).    customer no.
    02 LA-CUSORD PIC X(9). customer order no.
    02 LA-FILL1 PIC XX.    [dummy field]
    02 LA-QPACK PIC 9(5) COMP-3. container quantity
    02 LA-QTY PIC 9(5) COMP-3.  number of labels in series
    02 LA-ORD PIC 9(6) COMP-3.  order no.
    02 LA-KANBAN PIC X(10).  automotive kanban code
    02 LA-LABINF PIC X(115). automotive label data

FD  LOT BLOCK 2048.  product lot details
01  LT-RECORD PIC X(500).
01  LT-REC.
    02 LT-KEY.
      03 LT-NO PIC 9(7).  lot no.
    02 LT-KP.
      03 LT-PROD PIC X(12).  product no.
      03 LT-LYEAR PIC 9(4).  lot year
      03 LT-LOT PIC 9(7).    lot no.
    02 LT-EMP PIC 9(4) COMP-3.    employee no. of person who created the lot
    02 LT-BMLOT PIC 9(7) COMP-3.  lot no. of original, bare metal lot
    02 LT-ALOT PIC X(10).  external lot no.
    02 LT-QUAR PIC 9 COMP-3.  indicator: 0/1 = no/yes lot quarantined
    02 LT-LAB PIC 9 COMP-3.   indicator: 0/1 = no/yes OK to print labels
    02 LT-HEAT PIC X(10).  heat no.
    02 LT-GRADE PIC X(8).  steel grade
    02 LT-GRADE-OVR PIC 9(4) COMP-3.  grade override authorization code
    02 LT-SPEC PIC X(20).    specification
    02 LT-FINISH PIC X(15).  finish
    02 LT-MO PIC 9(6) COMP-3.  M.O. no. (manufacturing order)
    02 LT-SUFFIX PIC X.        M.O. suffix
    02 LT-BUCKETS PIC S999 COMP-3.  number of buckets
    02 LT-QTY PIC S9(9) COMP-3.     total quantity
    02 LT-WEIGHT PIC S9(9) COMP-3.  total weight
    02 LT-COUNTRY PIC 99 COMP-3.  code of country of origin
    02 LT-NOTE PIC X(50).  notes line
    02 OCCURS 15.  table of 15 mechanical specs
      03 LT-MECH PIC X(10).  value
      03 LT-UNIT PIC X(5).   unit of measure
    02 LT-MECH-1 PIC X(20).  data for table entry 1
    02 LT-MECH-5 PIC X(20).  data for table entry 5
    02 LT-MECH-6 PIC X(35).  data for table entry 6

FD  LOTHIST.  product lot history
01  LN-RECORD PIC X(90).
01  LN-REC.
    02 LN-KEY.
      03 LN-CUS PIC X(6).  customer no.
      03 LN-DATE PIC 9(6). date lot created
      03 LN-TIME PIC 9(8). time lot created
    02 LN-KL.
      03 LN-LOT PIC 9(7).  lot number
    02 LN-KI.
      03 LN-INV PIC 9(6).  invoice no.
    02 LN-PROD PIC X(12).  product no.
    02 LN-QTY PIC S9(7) COMP-3.      lot quantity
    02 LN-QTY-PACK PIC 9(5) COMP-3.  carton quantity
    02 LN-CARTONS PIC 999 COMP-3.    number of cartons
    02 LN-PARTIAL PIC 9 COMP-3.  indicator: 0/1 = no/yes includes partial carton
    02 LN-ORD PIC 9(6) COMP-3.   order no.
    02 LN-BL PIC 9(7) COMP-3.    bill of lading no.
    02 LN-CUSORD PIC X(9).       customer order no.
    02 LN-SHIPTO PIC 99 COMP-3.  ship-to code

FD  MACHINE.  machines and other production processes
01  M-RECORD PIC X(150).
01  M-REC.
    02 M-KEY.
      03 M-NO PIC 9(4).  machine/process no.
    02 M-GROUP PIC 99.   G/L group
    02 M-TYPE PIC 99.    machine type
    02 M-TQTY PIC 9(9) COMP-3. target production quantity/8 hours
    02 M-RNO PIC 9(6) COMP-3.  current running M.O. (manufacturing order)
    02 M-HOURS PIC 99 COMP-3.  hours of operation/day
    02 M-DESC1 PIC X(30).  description line 1
    02 M-DESC2 PIC X(30).  description line 2
    02 M-OPDESC PIC X(10). operation description
    02 M-COST PIC 9(4)V999 COMP-3. machine/process cost based on cost mode
    02 M-CMODE PIC X.   cost mode: M/G/N/H = per 1000 pieces / per ton gross / per ton net / per hour
    02 M-TWEIGHT PIC 9(4)V99 COMP-3.  target production weight/1000 pieces
    02 M-SECT PIC 99 COMP-3.   G/L sector
    02 M-LDAYS PIC 999 COMP-3. subcontractor lead days
    02 M-PLT-IND PIC 9 COMP-3. indicator: 0/1 = no/yes plating process
    02 M-LOT-CHARGE PIC 999V99 COMP-3.   subcontractor lot charge
    02 M-BATCH-CHARGE PIC 999V99 COMP-3. subcontractor batch charge
    02 M-SURCHARGE PIC 99V99 COMP-3.     subcontractor surcharge
    02 M-VENDOR PIC 9(4) COMP-3.    vendor no. for this process
    02 M-TCOST PIC 9(4)V999 COMP-3. process target cost
    02 M-SPEED PIC 999 COMP-3.  machine speed pieces/minute
    02 M-EFF PIC 99 COMP-3.     efficiency percentage
    02 M-FREIGHT PIC 99V999 COMP-3.  freight rate/ton
    02 M-HCOST PIC 9(4)V999 COMP-3.  alternate cost (cost mode always per hour)
    02 M-INACTIVE PIC 9 COMP-3.  indicator: 0/1 = no/yes inactive machine/process
    02 M-CLFREQ PIC 9(5) COMP-3. cleanout frequency
    02 M-CLDATE PIC 9(6) COMP-3. cleanout last date

FD  MACSCHED BLOCK 2048.  production short schedule
01  MQ-RECORD PIC X(650).
01  MQ-REC.
    02 MQ-KEY.
      03 MQ-MAC PIC 99.  machine no.
    02 OCCURS 15.  table of up to 15 M.O.s (manufacturing orders)
      03 MQ-MO PIC 9(6) COMP-3.  M.O. no.
      03 MQ-COM PIC X(30).  notes line
    02 MQ-REV PIC 99 COMP-3.  schedule revision no.
    02 MQ-PDT PIC X(15).  previous schedule date and time

FD  MACTYPE.  costing details for machine types
01  ME-RECORD PIC X(50).
01  ME-REC.
    02 ME-KEY.
      03 ME-NO PIC 99.    type no.
    02 ME-DESC PIC X(36). type description
    02 ME-CONTRIB PIC 9(4) COMP-3.  basic contribution for machines of this type
    02 ME-COST PIC 9(4)V999 COMP-3. machine type cost based on cost mode
    02 ME-CMODE PIC X.   cost mode: M/G/N/H = per 1000 pieces / per ton gross / per ton net / per hour
    02 ME-TOOLCOST PIC 9(4)V999 COMP-3.  estimated tools cost

FD  MATREL.  customer EDI long term material releases
01  MT-RECORD PIC X(980).
01  MT-REC.
    02 MT-KEY.
      03 MT-PLANT PIC X(10).  destination plant id
      03 MT-PROD PIC X(12).   product no.
      03 MT-SEQ PIC 99.       record count
    02 MT-KP.
      03 MT-KPROD PIC X(12).  product no.
      03 MT-KPLANT PIC X(10). destination plant id
    02 MT-TYPE PIC 99 COMP-3. customer EDI code
    02 MT-SEP PIC X.   EDI field separator character
    02 MT-DATE PIC 9(6) COMP-3.  release date
    02 MT-ISA-KEY PIC X(19).  [system work field]
    02 MT-QTY-SHIP PIC S9(9) COMP-3.  quantity previously shipped
    02 MT-IXF PIC 99 COMP-3.  number of entries in FST table
    02 MT-IXL PIC 99 COMP-3.  number of entries in LIN table
    02 MT-IXI PIC 99 COMP-3.  number of entries in INFO table
    02 MT-LIN. 03 OCCURS 5. 04 MT-LCODE PIC XX. 04 MT-LVAL PIC X(10). table of up to 5 LIN codes/values
    02 MT-INFO. 03 MT-IFLINE PIC X(40) OCCURS 6. table of up to 6 information lines
    02 MT-FST. 03 OCCURS 30. 04 MT-FQTY PIC S9(7) COMP-3. 04 MT-FPERIOD PIC X.  table of up to 30 releases:
      04 MT-FDATE PIC 9(6) COMP-3. 04 MT-FRD PIC 9 COMP-3.                    qty, code, date, use indicator
    02 MT-SOURCE PIC X(10).  release source
    02 MT-BFR-TYPE PIC XX.   release type
    02 MT-BFR-NUM PIC X(10). release no.
    02 MT-BFR-SCHED PIC XX.  release schedule
    02 MT-BFR-FDATE PIC 9(6) COMP-3. release from date
    02 MT-BFR-TDATE PIC 9(6) COMP-3. release to date
    02 MT-BFR-DATE PIC 9(6) COMP-3.  release date
    02 MT-REP PIC XX.  sales rep initials
    02 MT-FILL1 PIC X. [dummy field]
    02 MT-STATUS PIC XX.  status
    02 MT-LF PIC X(6).    receiving line feed id
    02 MT-DOCK PIC X(8).  receiving dock id
    02 MT-RUN-KEY PIC X(14). [system work field]

FD  MILL.  rolling mill cycle details
01  ML-RECORD PIC X(240).
01  ML-REC.
    02 ML-KEY.
      03 ML-CYCLE PIC X(4).  mill cycle
      03 ML-DIAM PIC X(6).   diameter
    02 ML-KD.
      03 ML-KDIAM PIC X(6).        diameter
      03 ML-ZDATE PIC 9(6) COMP-3. cycle date, descending key
    02 ML-DATE PIC 9(6) COMP-3.    date
    02 ML-WEI-MAX PIC 9(7) COMP-3. weight available
    02 ML-WEI-REQ PIC 9(7) COMP-3. weight required
    02 ML-STATUS PIC 9 COMP-3.  status
    02 ML-GNUM PIC 99 COMP-3.   number of grades in table
    02 ML-GRADE PIC X(5) OCCURS 10.  table of up to 10 grades
    02 ML-WEI PIC 9(7) COMP-3 OCCURS 10.  weights for the 10 grades

FD  MNTLIN.  machine maintenance order lines
01  VL-RECORD PIC X(60).
01  VL-REC.
    02 VL-KEY.
      03 VL-NO PIC 9(6).  order no.
      03 VL-TYPE PIC 9.   type code: 0/1 = process/part
      03 VL-ID PIC X(12). line id (process no. or part no.)
      03 VL-PROC REDEFINES VL-ID PIC 999.   process no. (if type 0)
      03 VL-PART REDEFINES VL-ID PIC X(12). part no. (if type 1)
      03 VL-DATE PIC 9(6).  date
      03 VL-SHIFT PIC 9.    employee shift code
      03 VL-EMP PIC 9(4).   employee no.
    02 VL-HOURS PIC 999V9 COMP-3.  hours
    02 VL-QTY PIC S999 COMP-3.     quantity
    02 VL-VEN PIC 9 COMP-3.  indicator: 0/1 = no/yes employee no. is a vendor no.
    02 VL-AMT PIC S9(7)V99 COMP-3. amount

FD  MNTMAC.  non-production machines
01  MK-RECORD PIC X(115).
01  MK-REC.
    02 MK-KEY.
      03 MK-NO PIC 999.  machine no.
    02 MK-DESC1 PIC X(30).  description line 1
    02 MK-DESC2 PIC X(30).  description line 2
    02 MK-DEPT PIC 99 COMP-3.  G/L department
    02 MK-SECT PIC 99 COMP-3.  G/L sector

FD  MNTMAST.  machine maintenance master orders
01  MF-RECORD PIC X(980).
01  MF-REC.
    02 MF-KEY.
      03 MF-MAC PIC 999.  machine no.
      03 MF-SEC PIC 99.   section
      03 MF-LEVEL PIC 99. level
    02 MF-FILL1 PIC XXX.  [dummy field]
    02 MF-EST-HOURS PIC 999 COMP-3.  estimated downtime hours
    02 MF-NOTE PIC X(70) OCCURS 3.   3 note lines
    02 OCCURS 20.  table of up to 20 processes
      03 MF-PROC PIC 999 COMP-3.    process no.
      03 MF-HOURS PIC 999V9 COMP-3. hours
    02 OCCURS 40.  table of up to 40 parts
      03 MF-PART PIC X(12).      part no.
      03 MF-QTY PIC S999 COMP-3. quantity

FD  MNTORD BLOCK 2048.  machine maintenance orders
01  VO-RECORD PIC X(650).
01  VO-REC.
    02 VO-KEY.
      03 VO-NO PIC 9(6).  order no.
    02 VO-KN.
      03 VO-ZNO PIC 9(6). order no., descending key
    02 VO-MAC PIC 999 COMP-3.  machine no.
    02 VO-SEC PIC 99 COMP-3.   machine section
    02 VO-LEVEL PIC 99 COMP-3. machine level
    02 VO-TYPE PIC 9 COMP-3.  order type: 0/1 = preventive/emergency
    02 VO-PRIOR PIC 9 COMP-3. priority code
    02 VO-DATE PIC 9(6) COMP-3.  date
    02 VO-TIME PIC 9(4) COMP-3.  time
    02 VO-USER PIC X(12).    VMS user id
    02 VO-MDESC1 PIC X(30).  description line 1
    02 VO-MDESC2 PIC X(30).  description line 2
    02 VO-DEPT PIC 99 COMP-3.  G/L department
    02 VO-SECT PIC 99 COMP-3.  G/L sector
    02 VO-NOTE PIC X(70) OCCURS 3.  3 note lines
    02 VO-STATUS PIC 9 COMP-3.  order status: 0/1/2 = open / work in process / closed
    02 VO-DN-DATE PIC 9(6) COMP-3.  downtime date
    02 VO-DN-TIME PIC 9(4) COMP-3.  downtime time
    02 VO-COMMENT PIC X(70) OCCURS 4. 4 comment lines
    02 VO-MAC-IND PIC 9 COMP-3.  indicator: 0/1 = production/non-production machine

FD  NUTBOLT.  index for nuts shipped with bolts
01  NU-RECORD PIC X(50).
01  NU-REC.
    02 NU-KEY.
      03 NU-NUT PIC X(12).    product no.
      03 NU-BOLT PIC X(12).   product no. of the bolt
    02 NU-CAT PIC 99 COMP-3.  product category of the bolt
    02 NU-NUM PIC 99 COMP-3.  number of nuts per bolt

FD  OPERATIONS.  lists of production operations
01  OP-RECORD PIC X(115).
01  OP-REC.
    02 OP-KEY.
      03 OP-PROD PIC X(12).   product no.
      03 OP-MAC PIC 99.       machine
    02 OP-OP OCCURS 12.   table of up to 12 operations
      03 OP-OPER PIC 999 COMP-3.  machine or process no.
      03 OP-COST PIC 9(4)V999 COMP-3.  operation cost based on cost mode
      03 OP-CMODE PIC X.   cost mode: M/G/N = per 1000 pieces / per ton gross / per ton net
    02 OP-SPEED PIC 999 COMP-3.  machine speed pieces/minute
    02 OP-EFF PIC 99 COMP-3.     efficiency percentage

FD  PACKING.  product packing types
01  PK-RECORD PIC X(115).
01  PK-REC.
    02 PK-KEY.
      03 PK-NO PIC 999.    container type
    02 PK-PART PIC X(12).  purchased part no. for this container
    02 PK-DESC PIC X(40).    container description
    02 PK-MAX PIC 99 COMP-3. number of containers per pallet
    02 PK-PALLET PIC 999 COMP-3.  container type of the matching pallet

FD  PART BLOCK 4096.  purchased parts
01  PH-RECORD PIC X(570).
01  PH-REC.
    02 PH-KEY.
      03 PH-NO PIC X(12).   part no.
    02 PH-KD.
      03 PH-DRAW PIC X(12). drawing no.
    02 PH-KA.
      03 PH-ALT PIC 9(12).  alternate part no. (for tools only)
      03 PH-KANO PIC X(12). part no.
    02 PH-KV.
      03 PH-VNUM PIC X(24). vendor part no.
      03 PH-KVNO PIC X(12). part no.
    02 PH-CAT PIC 999 COMP-3.  part category
    02 PH-REV PIC X.           drawing revision
    02 PH-ASM PIC 9 COMP-3.    indicator: 0/1 = no/yes part is assembly (for tools only)
    02 PH-MTYPE PIC 99 COMP-3. machine type
    02 PH-CRDATE PIC 9(6) COMP-3.  date record created
    02 PH-BLINES PIC 999 COMP-3.   number of blanket order lines
    02 PH-DESC1 PIC X(32).  part description line 1
    02 PH-DESC2 PIC X(32).  part description line 2
    02 PH-MATERIAL PIC X(20).  raw material description
    02 PH-TAX PIC 99 COMP-3.   tax code
    02 PH-HCODE PIC 99 COMP-3. harmony code (for customs)
    02 PH-UNIT PIC X(4).  unit of measure
    02 PH-MODE PIC X(4).  price mode
    02 PH-LIFE PIC 9(6) COMP-3.  expected life in 1000's of parts made (for tools only)
    02 PH-VENDOR PIC 9(4) COMP-3 OCCURS 3.    table of 3 vendor nos.
    02 PH-PRICE PIC 9(6)V999 COMP-3 OCCURS 3. prices for the 3 vendor nos.
    02 PH-LDCOST PIC 9(6)V999 COMP-3. laid-down cost
    02 PH-TCOST PIC 9(6)V999 COMP-3.  target cost
    02 PH-HAND PIC S9(7) COMP-3.   quantity on hand
    02 PH-ORDER PIC S9(7) COMP-3.  quantity on order
    02 PH-DEMAND PIC S9(7) COMP-3. quantity on demand
    02 PH-LEVEL PIC 9 COMP-3.  indicator: 0/3 = no/yes ROP updated manually
    02 PH-EOQ PIC 9(5) COMP-3. economic order quantity
    02 PH-ROP PIC S9(7) COMP-3.  ROP quantity (reorder point)
    02 PH-MTD PIC S9(7) COMP-3.  quantity purchased month-to-date
    02 PH-YTD PIC S9(7) COMP-3.  quantity purchased year-to-date
    02 PH-LAST PIC S9(7) COMP-3. quantity purchased last year
    02 PH-AMTD PIC S9(7)V99 COMP-3.  value purchased month-to-date
    02 PH-AYTD PIC S9(7)V99 COMP-3.  value purchased year-to-date
    02 PH-ALAST PIC S9(7)V99 COMP-3. value purchased last year
    02 PH-DATE PIC 9(6) COMP-3.  last date when fields updated by the system
    02 PH-PROC-HAND PIC S9(7) COMP-3 OCCURS 9.   quantity on hand for processes 1 - 9 (for raw materials only)
    02 PH-PROC-DEMAND PIC S9(7) COMP-3 OCCURS 9. quantity on demand for processes 1 - 9 (for raw materials only)
    02 PH-DATE-REQ PIC 9(6) COMP-3 OCCURS 2.  current and previous date required
    02 PH-QTY-REQ PIC 9(6) COMP-3.  calculated quantity required
    02 PH-ASM-MAC PIC 99 COMP-3.    [system work field]
    02 PH-ASM-HAND PIC S9(7) COMP-3.   quantity on hand in assemblies (for tools only)
    02 PH-ASM-DEMAND PIC S9(7) COMP-3. quantity on demand for assemblies (for tools only)
    02 PH-BEG-HAND PIC S9(7) COMP-3 OCCURS 3.  quantity on hand at beginning of current and previous 2 years
    02 PH-NOTE PIC X(70) OCCURS 2.   2 note lines
    02 PH-QTY-TMP PIC S9(9) COMP-3.  [system work field]
    02 PH-QTYA-TMP PIC S9(9) COMP-3. [system work field]
    02 PH-QTYB-TMP PIC S9(9) COMP-3. [system work field]
    02 PH-ALIFE PIC 9(6) COMP-3.  actual life in 1000's of parts made (for tools only)

FD  PARTRANS.  purchased parts stock transactions
01  PT-RECORD PIC X(115).
01  PT-REC.
    02 PT-KEY.
      03 PT-PART PIC X(12).  part no.
      03 PT-DATE PIC 9(6).   transaction date
      03 PT-TIME PIC 9(8).   transaction time
    02 PT-TRANS PIC XXX.     transaction code
    02 PT-FILL1 PIC X(12).   [dummy field]
    02 PT-QTY PIC S9(9) COMP-3.  quantity
    02 PT-MO PIC 9(6) COMP-3.    M.O. no. (manufacturing order)
    02 PT-FILL2 PIC XX.  [dummy field]
    02 PT-PO PIC X(10).  P.O. no.
    02 PT-PCODE PIC 9 COMP-3.  process code (for raw materials only)
    02 PT-COILS PIC S999 COMP-3.    number of coils (for raw materials only)
    02 PT-CWEIGHT PIC 9(5) COMP-3.  average coil weight (for raw materials only)
    02 PT-HEAT PIC X(10).  heat no. (for raw materials only)
    02 PT-USER PIC X(12).  VMS id of transaction's author
    02 PT-FBIN PIC X(8).   from bin no.
    02 PT-TBIN PIC X(8).   to bin no.

FD  PDRAWINGS BLOCK 4096.   product and tool drawings for printing
01  DG-RECORD PIC X(525).
01  DG-REC.
    02 DG-KEY.
      03 DG-DRAW PIC X(8).  drawing no.
      03 DG-PAGE PIC 9.     drawing page no. (1/2)
      03 DG-LINE PIC 9(4).  drawing line no.
    02 DG-DATA PIC X(512).    line data (block of PCL binary data)
    02 REDEFINES DG-DATA.   page header (record with line=0)
      03 DG-NLINES PIC 9(4).  number of lines
      03 DG-DATE PIC 9(6).    date created
      03 DG-TIME PIC 9(8).    time created

FD  PHYSINV.  physical inventory items
01  PI-RECORD PIC X(50).
01  PI-REC.
    02 PI-KEY.
      03 PI-NO PIC 9(6).  ticket no.
    02 PI-KM.
      03 PI-MO PIC 9(6).  M.O. no. (manufacturing order)
    02 PI-DATE PIC 9(6) COMP-3.  date
    02 PI-QTY PIC S9(9) COMP-3.  quantity
    02 PI-WEIGHT PIC S9(9) COMP-3.  weight
    02 PI-CODE PIC 99 COMP-3.  completion code
    02 PI-LOCATION PIC 99 COMP-3.  location code

FD  PLANT.  destination plants
01  PL-RECORD PIC X(115).
01  PL-REC.
    02 PL-KEY.
      03 PL-PLANT PIC X(10).  destination plant id
      03 PL-PROD PIC X(12).   product no.
    02 PL-KO.
      03 PL-ORD PIC 9(6).     order no.
    02 PL-KR.
      03 PL-RECEIVER PIC XXX. EDI receiver id
    02 PL-ISSUER PIC X(9).    EDI issuer id
    02 PL-NAME PIC X(30).  plant name
    02 PL-DOCK PIC XXX.    receiving dock id
    02 PL-EDIFACT PIC 9 COMP-3.  indicator: 0/1 = X12/EDIFACT EDI format
    02 PL-REP PIC XX.  sales rep initials

FD  PRICE.  product prices
01  IO-RECORD PIC X(115).
01  IO-REC.
    02 IO-KEY.
      03 IO-CUS PIC X(6).   customer no.
      03 IO-PROD PIC X(12). product no.
    02 IO-KP.
      03 IO-KPROD PIC X(12). product no.
      03 IO-KCUS PIC X(6).   customer no.
    02 IO-PRICE PIC 9(4)V999 COMP-3.  price
    02 IO-NOTE PIC X(50).  notes
    02 IO-AUTH PIC XXX.    authorization code
    02 IO-DATE PIC 9(6) COMP-3. effective date
    02 IO-SUR PIC 9 COMP-3.  surcharge code override
    02 IO-SURCH PIC 99V999 COMP-3.  surcharge per 1000 pieces override

FD  PRICEHIST.  product price history
01  NJ-RECORD PIC X(115).
01  NJ-REC.
    02 NJ-KEY.
      03 NJ-CUS PIC X(6).   customer no.
      03 NJ-PROD PIC X(12). product no.
      03 NJ-CDATE PIC 9(6). archive date
    02 NJ-PRICE PIC 9(4)V999 COMP-3.  price
    02 NJ-NOTE PIC X(50). notes
    02 NJ-AUTH PIC XXX.   authorization code
    02 NJ-DATE PIC 9(6) COMP-3. effective date
    02 NJ-SUR PIC 9 COMP-3.  surcharge code override
    02 NJ-SURCH PIC 99V999 COMP-3.  surcharge per 1000 pieces override

FD  PRODORD BLOCK 2048.  production orders
01  R-RECORD PIC X(115).
01  R-REC.
    02 R-KEY.
      03 R-NO PIC 9(6).  M.O. no. (manufacturing order)
    02 R-KP.
      03 R-PROD PIC X(12).  product no.
      03 R-DATE PIC 9(6).   M.O. required start date
    02 R-QTY-ORD PIC S9(9) COMP-3.  quantity ordered
    02 R-QTY-LEFT PIC S9(9) COMP-3. quantity left to be made
    02 R-QTY-PROD PIC S9(9) COMP-3. quantity produced
    02 R-LDATE PIC 9(6) COMP-3 OCCURS 3.  late start dates (machine,material,tools)
    02 R-SPORD PIC 9(6) COMP-3.  order no. if special order
    02 R-SPLINE PIC 99 COMP-3.   order line if special order
    02 R-FIN PIC 9 COMP-3.  indicator: 0/1 = no/yes primary machine operations finished
    02 R-LAST-DATE PIC 9(6) COMP-3.  date of last change
    02 R-FILL1 PIC X.  [dummy field]
    02 R-PUR PIC 9 COMP-3.  indicator: 0/1 = no/yes purchased part
    02 R-TICKET PIC 9 COMP-3.  indicator: 0/1/2 = production ticket created / printed / revised
    02 R-SPMOD PIC 9 COMP-3.  indicator: 0/1 = no/yes special order closed
    02 R-ALLOC PIC 9 COMP-3.  indicator: 0/1/2 = no/yes/final material allocation
    02 R-SUR PIC 9 COMP-3.  [field not used]
    02 R-IND PIC 9 COMP-3.  [system work field]
    02 R-QTY-REC PIC S9(9) COMP-3.  quantity received into stock
    02 R-OLD-LEFT PIC S9(9) COMP-3. quantity left to be made, saved for physical inventory
    02 R-OLD-PROD PIC S9(9) COMP-3. quantity produced, saved for physical inventory
    02 R-COILS PIC 999V9 COMP-3.    coils needed
    02 R-LMAT PIC 9 COMP-3.    [system work field]
    02 R-LPROC PIC 9 COMP-3.   [system work field]
    02 R-LTOOLS PIC 9 COMP-3.  [system work field]
    02 R-TMP PIC S999V99 COMP-3 OCCURS 4. [system work fields]
    02 R-ORIG-ORD PIC S9(9) COMP-3.  quantity originally ordered

FD  PRODTRANS.  product stock transactions
01  PE-RECORD PIC X(115).
01  PE-REC.
    02 PE-KEY.
      03 PE-PROD PIC X(12).  product no.
      03 PE-DATE PIC 9(6).   transaction date
      03 PE-TIME PIC 9(8).   transaction time
    02 PE-TRANS PIC XXX.  transaction code
    02 PE-FBIN PIC X(5).  from bin. no.
    02 PE-TBIN PIC X(5).  to bin no.
    02 PE-LOT PIC 9(7) COMP-3.  lot no.
    02 PE-NO PIC 9(6) COMP-3.   M.O. no. (manufacturing order)
    02 PE-QTY PIC S9(9) COMP-3. quantity
    02 PE-QTY-PACK PIC 9(5) COMP-3.  packing quantity
    02 PE-CARTONS PIC S9(5) COMP-3.  number of cartons
    02 PE-CONT PIC X.  container code

FD  PRODUCT BLOCK 3584.  manufactured products
01  P-RECORD PIC X(1150).
01  P-REC.
    02 P-KEY.
      03 P-NO PIC X(12).   product no.
    02 P-GEN PIC X(12).    the generic product no. (blank if P-NO is the generic)
    02 P-PUR-PART PIC X(12).    part no. in PART file if purchased part
    02 P-CAT PIC 99 COMP-3.     product category
    02 P-FAMILY PIC 99 COMP-3.  product family
    02 P-INACTIVE PIC 9 COMP-3. indicator: 0/1 = no/yes inactive product
    02 P-DESC PIC X(32).     product description
    02 P-FINDESC PIC X(32).  finish description
    02 P-PRDESC PIC X(18).   print description
    02 P-EDESC1 PIC X(32).   extended description line 1
    02 P-EDESC2 PIC X(32).   extended description line 2
    02 P-PRINT PIC 9(6) COMP-3.  drawing print no.
    02 P-PRINT-REV PIC XX.       print revision
    02 P-DIAM PIC X(6).          material diameter
    02 P-GRADE PIC X(8).         material grade
    02 P-WIRE PIC 9V9(4) COMP-3. material size
    02 P-ORD PIC 9(6) COMP-3.    blanket order no. (for shipping labels)
    02 P-PID PIC X(7).  identification (physical spec)
    02 P-CHGPR PIC 9 COMP-3.  indicator: 0/1 = no/yes allow price change in order entry
    02 P-DATE PIC 9(6) COMP-3.   date last received into stock
    02 P-CRDATE PIC 9(6) COMP-3. date record created
    02 P-CUSPART PIC X(16).   customer part no.
    02 P-FILL1 PIC X(8).  [dummy field]
    02 P-VENDOR PIC 9(6) COMP-3. vendor no.
    02 P-ALT-V PIC 9(6) COMP-3.  alternate vendor no.
    02 P-CUS PIC X(6).   customer no. (if special product)
    02 P-NUT PIC X(12).  product no. of nut shipped with this bolt
    02 P-WEIGHT-NUT PIC 9(4)V99 COMP-3.  weight/100 pieces of nut shipped with this bolt
    02 P-WEIGHT PIC 9(4)V99 COMP-3.  net weight/100 pieces
    02 P-GROSS PIC 9(4)V99 COMP-3.   gross weight/100 pieces
    02 P-HAND PIC S9(9) COMP-3.    quantity on hand
    02 P-ORDER PIC S9(9) COMP-3.   quantity on order
    02 P-DEMAND PIC S9(9) COMP-3.  quantity on demand
    02 P-FDEMAND PIC S9(9) COMP-3. quantity on future demand
    02 P-PROCESS PIC S9(9) COMP-3. quantity in process
    02 P-BANK PIC S9(9) COMP-3.    bank quantity
    02 P-TORDER PIC S9(9) COMP-3.  quantity in temporary orders
    02 P-ROP PIC S9(9) COMP-3.     ROP quantity (reorder point)
    02 P-MTD PIC S9(9) COMP-3.     quantity sold month-to-date
    02 P-YTD PIC S9(9) COMP-3.     quantity sold year-to-date
    02 P-LAST PIC S9(9) COMP-3.    quantity sold last year
    02 P-PREV PIC S9(9) COMP-3.    quantity sold year before last
    02 P-W-MTD PIC S9(9) COMP-3.   weight sold month-to-date
    02 P-W-YTD PIC S9(9) COMP-3.   weight sold year-to-date
    02 P-A-MTD PIC S9(7)V99 COMP-3.  value sold month-to-date
    02 P-A-YTD PIC S9(7)V99 COMP-3.  value sold year-to-date
    02 P-MODE PIC XX.                 price mode: M/C/EA/FT = per 1000 pieces / per 100 pieces / each / per foot
    02 P-PRICE1 PIC 9(4)V999 COMP-3.  price 1 (Can$)
    02 P-PRICE2 PIC 9(4)V999 COMP-3.  price 2 (US$)
    02 P-MARKET PIC 99 COMP-3.     market code
    02 P-ALERT PIC 999 COMP-3.     quality alert no.
    02 P-MAC PIC 99 COMP-3.        primary machine no.
    02 P-ALT-MAC PIC 99 COMP-3.    alternate machine no.
    02 P-RATE PIC 9(6) COMP-3.     production rate/hour
    02 P-COST PIC 9(4)V999 COMP-3. manufacturing cost
    02 P-LEAD PIC 99 COMP-3.       manufacturing lead days
    02 P-EST PIC S9(9) COMP-3.     estimated annual quantity for new product
    02 P-LEVEL PIC 9 COMP-3.       new product age: 2/1/0 = first/second/third+ year
    02 P-PACKING PIC 99 COMP-3.     packing code
    02 P-QTY-PACK PIC 9(5) COMP-3.  packing quantity
    02 P-CONT PIC X.                container code
    02 P-TCOLOR PIC 99 COMP-3.      production tickets colour code
    02 P-CLEAN PIC 9 COMP-3.     material cleaning code
    02 P-PROC PIC 9 COMP-3.      material process code
    02 P-PLSPEC PIC 999 COMP-3.  plating spec code
    02 P-UPC PIC 9(5) COMP-3.  UPC code (for packing label)
    02 P-HCODE PIC 99 COMP-3.  harmony code (for customs)
    02 P-TAX PIC 99 COMP-3.    tax code
    02 P-PVAL OCCURS 28.   physical specs table (up to 28 entries)
      03 P-PCHAR PIC 999 COMP-3.     characteristic code
      03 P-PMIN PIC 99V9(4) COMP-3.  minimum value
      03 P-PMAX PIC 99V9(4) COMP-3.  maximum value
    02 OCCURS 15.  mechanical specs table (15 entries)
      03 P-SMIN PIC 9(5)V9(4) COMP-3.  minimum value
      03 P-SMAX PIC 9(5)V9(4) COMP-3.  maximum value
      03 P-SUNIT PIC X(5).             unit of measurement
    02 P-SDECARB PIC X(6).  decarb. class
    02 OCCURS 18.  heat treatment specs table (18 entries)
      03 P-HMIN PIC 9(6) COMP-3.  minimum value
      03 P-HMAX PIC 9(6) COMP-3.  maximum value
    02 P-LABELS PIC 9 COMP-3.  indicator: 0/1 = yes/no requires packing labels
    02 P-TCOST PIC S9(4)V999 COMP-3.  estimated tools cost (for Irvine Nuts costing only)
    02 P-INC-NUT PIC 9 COMP-3.  indicator: 0/1 = no/yes include weight of attached nut in weight calculations
    02 P-PPAP PIC 9 COMP-3.  indicator: 0/1 = no/yes PPAP required
    02 P-QUOTNO PIC 9(10) COMP-3.  quotation reference no.
    02 P-SPEC PIC X(20).   material spec
    02 P-PWEIGHT PIC 9(4)V99 COMP-3.  primary process weight/100 pieces (if greater than net)
    02 P-LPRICE PIC 9(4)V999 COMP-3.  last sale price
    02 P-LUS PIC 9 COMP-3.  last sale currency indicator: 0/1 = Can$/US$
    02 P-LDATE PIC 9(6) COMP-3.  last sale date
    02 P-BEG-HAND PIC S9(9) COMP-3 OCCURS 3.  quantity on hand at beginning of current and previous 2 years
    02 P-GDATE PIC 9(6) COMP-3.  date gross weight last updated
    02 P-NDATE PIC 9(6) COMP-3.  date net weight last updated

FD  PURBIN BLOCK 2048.  purchased parts storage bins
01  BH-RECORD PIC X(115).
01  BH-REC.
    02 BH-KEY.
      03 BH-NO PIC X(8).  bin no.
    02 BH-KP.
      03 BH-PART PIC X(12).  part no.
      03 BH-DATE PIC 9(6).   date part stored in bin
      03 BH-KNO PIC X(8).    bin no.
    02 BH-QTY PIC S9(9) COMP-3.  quantity
    02 BH-QTY-AL PIC S9(9) COMP-3.  [field not used]
    02 BH-HEAT PIC X(10).  heat no. (for raw materials only)
    02 BH-PO PIC X(10).  purchase order no.
    02 BH-PCODE PIC 9 COMP-3.  process code (for raw materials only)
    02 BH-COILS PIC S999 COMP-3.  number of coils (for raw materials only)
    02 BH-TMP-PART PIC X(12).        [system work field]
    02 BH-TMP-QTY PIC S9(9) COMP-3.  [system work field]
    02 BH-TMP-HEAT PIC X(10).        [system work field]
    02 BH-TMP-PCODE PIC 9 COMP-3.    [system work field]
    02 BH-TMP-COILS PIC S999 COMP-3. [system work field]

FD  PURHIST BLOCK 2048.  purchase history
01  PU-RECORD PIC X(130).
01  PU-REC.
    02 PU-KEY.
      03 PU-DIV PIC 99.      A/P division
      03 PU-PART PIC X(12).  part no.
      03 PU-ZDATE PIC 9(6).  date, descending key
      03 PU-ZTIME PIC 9(8).  time, descending key
    02 PU-KV.
      03 PU-VDIV PIC 99.      A/P division
      03 PU-VENDOR PIC 9(4).  vendor no.
      03 PU-ZVDATE PIC 9(6).  date, descending key
      03 PU-ZVTIME PIC 9(8).  time, descending key
    02 PU-INV PIC X(15).  invoice no.
    02 PU-ORD PIC X(8).   purchase order no.
    02 PU-CAT PIC 999 COMP-3.  part category
    02 PU-QTY PIC S9(7) COMP-3.  quantity
    02 PU-AMT PIC S9(7)V99 COMP-3.  amount
    02 PU-GL PIC 9(18).  G/L account
    02 PU-LDCOST PIC 9(6)V999 COMP-3.  laid-down cost
    02 PU-MODE PIC X(4).   price mode
    02 PU-DATE-REQ PIC 9(6) COMP-3.  date required
    02 PU-INV-DATE PIC 9(6) COMP-3.  invoice date
    02 PU-ALDCOST PIC 9(6)V999 COMP-3. average laid-down cost

FD  PURLIN.  purchase order lines
01  LK-RECORD PIC X(980).
01  LK-REC.
    02 LK-KEY.
      03 LK-ORD PIC X(8).  order no.
      03 LK-LINE PIC 99.   order line no.
    02 LK-NO REDEFINES LK-KEY PIC X(10).
    02 LK-KP.
      03 LK-PART PIC X(12).     part no.
      03 LK-DATE-REQ PIC 9(6).  date required
    02 LK-BLANKET PIC 9 COMP-3. indicator: 0/1 = no/yes blanket order
    02 LK-QTY PIC S9(9) COMP-3.      quantity ordered
    02 LK-QTY-REC PIC S9(9) COMP-3.  quantity received to date
    02 LK-PRICE PIC 9(6)V999 COMP-3. unit price
    02 LK-TOTAL PIC S9(7)V99 COMP-3. line total value
    02 LK-DESC.
      03 LK-DESC1 PIC X(32). 03 LK-DESC2 PIC X(32). description line 1, line 2
    02 LK-DRAW PIC X(12).  part drawing no.
    02 LK-REV PIC X.       drawing revision no.
    02 LK-NOTES. 03 LK-NOTE PIC X(45) OCCURS 15.  15 note lines
    02 LK-MTYPE PIC 99 COMP-3.  part machine type
    02 LK-CAT PIC 999 COMP-3.   part category
    02 LK-GL PIC 9(18).         G/L account no.
    02 LK-UNIT PIC X(4).  unit of measure
    02 LK-MODE PIC X(4).  price mode
    02 LK-TOTAL-REC PIC S9(7)V99 COMP-3.  total value received to date
    02 LK-QTY-LAST PIC S9(7)V999 COMP-3.  quantity in last shipment
    02 LK-TOTAL-LAST PIC S9(7)V99 COMP-3. value in last shipment
    02 LK-DISC PIC 99 COMP-3.  discount code
    02 LK-DATE-LAST PIC 9(6) COMP-3.  date of last shipment
    02 LK-DISC-DESC PIC X(9).  [field not used]
    02 LK-DATE-TMP PIC 9(6) COMP-3.  [system work field]
    02 LK-FILL1 PIC X(19).  [dummy field]
    02 LK-SUB.  subcontractor worksheet key fields
      03 LK-SUB-MAC PIC 9(4) COMP-3.  subcon machine/process no.
      03 LK-SUB-MO PIC 9(6) COMP-3.   subcon M.O. no. (manufacturing order)
      03 LK-SUB-SUFFIX PIC X.         subcon M.O. suffix
      03 LK-SUB-LOT PIC 9(7) COMP-3.  subcon lot no.
      03 LK-SUB-PROD PIC X(12).       subcon product no.
    02 LK-CHARGE-LAST PIC X(8).  list of up to 8 freight special charge codes

FD  PURORD BLOCK 1024.  purchase orders
01  OK-RECORD PIC X(190).
01  OK-REC.
    02 OK-KEY.
      03 OK-NO PIC X(8).  order no.
    02 OK-KV.
      03 OK-VENDOR PIC 9(4).  vendor no.
      03 OK-ZNO PIC X(8).     order no., descending key
    02 OK-STATUS PIC 9 COMP-3.  status indicator: 0/1/2 = new/printed/modified
    02 OK-HOLD PIC 9 COMP-3.  indicator: 0/1 = no/yes hold order
    02 OK-ITORD PIC 9 COMP-3. indicator: 0/1 = no/yes Irvine Tools order to Irvine Fasteners
    02 OK-BLANKET PIC 9 COMP-3.  indicator: 0/1 = no/yes blanket order
    02 OK-DATE PIC 9(6) COMP-3.  order date
    02 OK-DATE-REQ PIC 9(6) COMP-3.  date required
    02 OK-FOB PIC X(15).    FOB
    02 OK-TERMS PIC X(12).  terms
    02 OK-SHIPTO PIC X(20). ship-to description
    02 OK-CARRIER PIC X(15).  carrier
    02 OK-US PIC 9 COMP-3.  indicator: 0/1 = Can$/US$
    02 OK-PSTPAY PIC 9 COMP-3. indicator: 0/1 = no/yes PST applies
    02 OK-FILL1 PIC X(4).  [dummy field]
    02 OK-DISC PIC S9(7)V99 COMP-3.  discount amount
    02 OK-FREIGHT PIC S9(7)V99 COMP-3. freight amount
    02 OK-FRPAY PIC 9 COMP-3.  indicator: 0/1 = no/yes freight paid to vendor
    02 OK-GST PIC S9(7)V99 COMP-3.  GST amount
    02 OK-PST PIC S9(7)V99 COMP-3.  PST amount
    02 OK-INV-DATE-LAST PIC 9(6) COMP-3.  last invoice date
    02 OK-BLANKET-ORD PIC X(8).  original blanket order no.
    02 OK-DUE-DATE-LAST PIC 9(6) COMP-3.  last due date
    02 OK-TEXT PIC 99 COMP-3 OCCURS 5.  codes for up to 5 standard text lines
    02 OK-INV PIC X(15).  invoice no.
    02 OK-EFF-DATE-LAST PIC 9(6) COMP-3.  last effective A/P date
    02 OK-USER PIC X(12).  VMS user id
    02 OK-SUBCON PIC 9 COMP-3.  indicator: 0/1 = no/yes system-generated subcontractor order

FD  QBIN.  warehouse quarantined bins
01  QB-RECORD PIC X(115).
01  QB-REC.
    02 QB-KEY.
      03 QB-NO PIC X(5).  bin no.
    02 QB-KP.
      03 QB-PROD PIC X(12).  product no.
      03 QB-LYEAR PIC 9(4).  lot year
      03 QB-LOT PIC 9(7).    lot no.
      03 QB-DATE PIC 9(6).   date product stored in bin
    02 QB-DM PIC 9(6) COMP-3.    defective material id
    02 QB-QTY PIC S9(9) COMP-3.  quantity
    02 QB-NOTE PIC X(50).        notes line

FD  QUOTLIN.  quotation order lines
01  QL-RECORD PIC X(480).
01  QL-REC.
    02 QL-KEY.
      03 QL-NO PIC 9(6).  order no.
      03 QL-LINE PIC 99.  order line
    02 OCCURS 12.   table of up to 12 operations
      03 QL-OPER PIC 999 COMP-3.  machine or process no.
      03 QL-OPCOST PIC 9(4)V999 COMP-3.  operation cost based on cost mode
      03 QL-CMODE PIC X.  cost mode: M/G/N = per 1000 pieces / per ton gross / per ton net
    02 QL-STATUS PIC 9 COMP-3.  [field not used]
    02 QL-DEL PIC 9 COMP-3.  indicator: 0/1 = no/yes line canceled
    02 QL-PROD PIC X(12).   product no.
    02 QL-DESC PIC X(32).   product description
    02 QL-EDESC1 PIC X(32). extended description line 1
    02 QL-EDESC2 PIC X(32). extended description line 2
    02 QL-FINDESC PIC X(32).  finish description
    02 QL-PRDESC PIC X(18).   print description
    02 QL-CAT PIC 99 COMP-3.  product category
    02 QL-FAMILY PIC 99 COMP-3.  product family
    02 QL-MODE PIC XX.   price mode: M/C/EA/FT = per 1000 pieces / per 100 pieces / each / per foot
    02 QL-MAC PIC 99 COMP-3.  primary machine no.
    02 QL-RATE PIC 9(6) COMP-3. production rate/hour
    02 QL-WEIGHT PIC 9(4)V99 COMP-3.  net weight/100 pieces
    02 QL-GROSS PIC 9(4)V99 COMP-3.   gross weight/100 pieces
    02 QL-DIAM PIC X(6).   material diameter
    02 QL-GRADE PIC X(8).  material grade
    02 QL-PROC PIC 9 COMP-3.  material process code
    02 QL-CLEAN PIC 9 COMP-3. material cleaning code
    02 QL-PRICE1 PIC 9(4)V999 COMP-3.  price 1 (Can$)
    02 QL-PRICE2 PIC 9(4)V999 COMP-3.  price 2 (US$)
    02 QL-COST PIC 9(4)V999 COMP-3. manufacturing cost
    02 QL-PACKING PIC 99 COMP-3.    packing code
    02 QL-QTY-PACK PIC 9(5) COMP-3. packing quantity
    02 QL-EST PIC S9(9) COMP-3.     estimated annual quantity
    02 QL-DELIVERY PIC 99 COMP-3.   estimated delivery (weeks)

FD  QUOTORD.  quotation orders
01  QO-RECORD PIC X(1500).
01  QO-REC.
    02 QO-KEY.
      03 QO-NO PIC 9(6).  order no.
    02 QO-DATE PIC 9(6) COMP-3.  date
    02 QO-CUS PIC X(6).    customer no.
    02 QO-NAME PIC X(32).  name
    02 QO-ADD1 PIC X(32).  address line 1
    02 QO-ADD2 PIC X(32).  address line 2
    02 QO-POST PIC X(10).  postal code
    02 QO-US PIC 9 COMP-3. currency indicator: 0/1 = Can$/US$
    02 QO-EXCH PIC 9V9(4) COMP-3. currency exchange rate
    02 QO-FILL1 PIC X(47).  [dummy field]
    02 QO-NOTE PIC X(75) OCCURS 10.  10 note lines
    02 QO-LINES PIC 99 COMP-3.  number of order lines
    02 QO-INFO PIC X(30) OCCURS 3.  3 contact information lines

FD  SALESMAN.  salesmen
01  SN-RECORD PIC X(115).
01  SN-REC.
    02 SN-KEY.
      03 SN-NO PIC 99.  salesman no.
    02 SN-SALCOM PIC 99V99 COMP-3.  commission percentage
    02 SN-NAME PIC X(30).  name

FD  SALHIST BLOCK 2048.  sales history
01  SH-RECORD PIC X(135).
01  SH-REC.
    02 SH-KEY.
      03 SH-CUS PIC X(6).    customer no.
      03 SH-PROD PIC X(12).  product no.
      03 SH-CDATE PIC 9(6).  invoice date
      03 SH-CTIME PIC 9(8).  invoice time
    02 SH-KP.
      03 SH-KPROD PIC X(12). product no.
      03 SH-KCUS PIC X(6).   customer no.
      03 SH-KDATE PIC 9(6).  invoice date
      03 SH-KTIME PIC 9(8).  invoice time
    02 SH-ORD PIC 9(6) COMP-3.    order no.
    02 SH-INVNO PIC 9(6) COMP-3.  invoice no.
    02 SH-CUSORD PIC X(9).        customer order no.
    02 SH-DATE PIC 9(6) COMP-3.   invoice date
    02 SH-QTY PIC S9(9) COMP-3.     quantity
    02 SH-AMT PIC S9(7)V99 COMP-3.  amount
    02 SH-WEIGHT PIC S9(7) COMP-3.  weight
    02 SH-CAT PIC 99 COMP-3.   product category
    02 SH-BL PIC 9(7) COMP-3.  bill of lading no.
    02 SH-US PIC 9 COMP-3.     currency indicator: 0/1 = Can$/US$
    02 SH-DATE-REQ PIC 9(6) COMP-3.  date required
    02 SH-SHIPTO PIC 99 COMP-3.      ship-to code
    02 SH-SAL PIC 99 COMP-3.         salesman no.
    02 SH-SALCOM PIC 99V99 COMP-3.   salesman commission percentage
    02 SH-FILL1 PIC X.  [dummy field]
    02 SH-SUR PIC 9 COMP-3.  surcharge code
    02 SH-SURCHARGE PIC S9(5)V99 COMP-3.  surcharge amount

FD  SALIN.  sales order lines
01  L-RECORD PIC X(150).
01  L-REC.
    02 L-KEY.
      03 L-ORD PIC 9(6).   order no.
      03 L-LINE PIC 99.    order line no.
    02 L-NO REDEFINES L-KEY PIC 9(8).
    02 L-TER PIC 99 COMP-3.  territory
    02 L-CUS PIC X(6).       customer no.
    02 L-KP.
      03 L-PROD PIC X(12).     product no.
      03 L-DATE-REQ PIC 9(6).  date required
    02 L-PRICE PIC 9(4)V999 COMP-3.  sale price
    02 L-DISC PIC 99 COMP-3.         discount code
    02 L-QTY PIC S9(9) COMP-3.       quantity ordered (999999999 if blanket order)
    02 L-QTY-LEFT PIC S9(9) COMP-3.  quantity left to be shipped
    02 L-QTY-THIS PIC S9(9) COMP-3.  quantity shipped last time
    02 L-PLATING PIC 99 COMP-3.   plating code
    02 L-ADJ PIC 9 COMP-3.      indicator: 0/1 = no/yes adjustment line
    02 L-REORDER PIC 9 COMP-3.  indicator: 0/1 = no/yes back order line
    02 L-MODE PIC XX.         price mode: M/C/EA/FT = per 1000 pieces / per 100 pieces / each / per foot
    02 L-CAT PIC 99 COMP-3.   product category
    02 L-EXTA PIC S9(7)V99 COMP-3.  line extension amount
    02 L-WEIGHT PIC S9(5) COMP-3.   total net weight
    02 L-MODYR PIC 99 COMP-3.   automotive model year
    02 L-CONT PIC X.    container code
    02 L-RC PIC X(12).  returnable container id
    02 L-NUT PIC X(12).  product no. of nut shipped with the bolt
    02 L-WEIGHT-NUT PIC S9(5) COMP-3.  weight of nut shipped with the bolt
    02 L-CUSPART PIC X(25).  customer part no.
    02 L-SPECIAL PIC 9 COMP-3.  indicator: 0/1 = no/yes special order
    02 L-SUR PIC 9 COMP-3.  surcharge code

FD  SALSUM.  sales history yearly summary
01  SM-RECORD PIC X(115).
01  SM-REC.
    02 SM-KEY.
      03 SM-CUS PIC X(6).    customer no.
      03 SM-PROD PIC X(12).  product no.
    02 SM-KP.
      03 SM-KPROD PIC X(12). product no.
      03 SM-KCUS PIC X(6).   customer no.
    02 OCCURS 5.   5-year table: 1 = current, 2 = last year, etc.
      03 SM-QTY PIC S9(9) COMP-3.  quantity
      03 SM-AMT PIC S9(9) COMP-3.  amount

FD  SALTOT.  sales history analysis totals
01  ST-RECORD PIC X(60).
01  ST-REC.
    02 ST-KEY.
      03 ST-TER PIC 99.  territory
      03 ST-CAT PIC 99.  product category
      03 ST-YY PIC 99.   year
      03 ST-MM PIC 99.   month
      03 ST-DD PIC 99.   day
      03 ST-US PIC 9.    currency indicator: 0/1 = Can$/US$
    02 ST-AMT PIC S9(7)V99 COMP-3.  amount
    02 ST-WEIGHT PIC S9(7) COMP-3.  weight
    02 ST-QTY PIC S9(7) COMP-3.     quantity
    02 ST-SURCHARGE PIC S9(7)V99 COMP-3.  surcharge amount

FD  SAORD.  sales orders
01  O-RECORD PIC X(480).
01  O-REC.
    02 O-KEY.
      03 O-NO PIC 9(6).  order no.
    02 O-KC.
      03 O-CUS PIC X(6).   customer no.
      03 O-DATE PIC 9(6).  order date
    02 O-NAME PIC X(32).   ship-to name
    02 O-ADD1 PIC X(24).   ship-to address line 1
    02 O-ADD2 PIC X(24).   ship-to address line 2
    02 O-POST PIC X(10).   ship-to postal/zip code
    02 O-SHIPTO PIC 99 COMP-3.   ship-to code
    02 O-LINES PIC 99 COMP-3.    number of order lines
    02 O-BLANKET PIC 9 COMP-3.   indicator: 0/1 = no/yes blanket order
    02 O-SPECIAL PIC 9 COMP-3.   indicator: 0/1 = no/yes special order
    02 O-ACK PIC 9 COMP-3.   order acknowledgement message code
    02 O-TER PIC 99 COMP-3.  territory
    02 O-SAL PIC 99 COMP-3.  salesman
    02 O-SALCOM PIC 99V99 COMP-3.  salesman commission percentage
    02 O-SALCONT PIC X(15).  customer sales contact
    02 O-TERMS PIC X(6).     sale terms description
    02 O-VIA PIC 99 COMP-3.  ship-via code
    02 O-FOB PIC X(15).   FOB description
    02 O-PPD PIC X.       prepay code: 'P' or '*' / 'C' or blank = prepaid/collect
    02 O-TEXT PIC 99 COMP-3 OCCURS 4.  codes for up to 4 special text lines
    02 O-PLINE PIC X(45) OCCURS 2.   up to 2 picking ticket text lines
    02 O-FRATE PIC S999V99 COMP-3.   freight rate/100 lbs
    02 O-FLOT PIC S9(5)V99 COMP-3.   freight lot charge
    02 O-FREIGHT PIC S9(5)V99 COMP-3.  freight amount
    02 O-FREIGHT-OVS PIC S9(5)V99 COMP-3.  freight deducted from overseas sales
    02 O-CUSORD PIC X(9).   customer order
    02 O-INVNO PIC 9(6) COMP-3.  invoice no.
    02 O-SID PIC 9(6) COMP-3.  shipment id no.
    02 O-BL PIC 9(7) COMP-3.   bill of lading no.
    02 O-INV-DATE PIC 9(6) COMP-3.  invoice date
    02 O-DATE-REQ PIC 9(6) COMP-3.  date required
    02 O-PALLETS PIC 999 COMP-3.    number of pallets
    02 O-PACKS PIC 9(4) COMP-3 OCCURS 12.  number of containers (up to 12 types)
    02 O-TOTAL PIC S9(7)V99 COMP-3.    total sale amount
    02 O-NON-SAL PIC S9(5)V99 COMP-3.  non-sale amount
    02 O-NET PIC S9(7) COMP-3.   net weight
    02 O-GROSS PIC 9(8) COMP-3.  gross weight
    02 O-SURTOT PIC S9(7)V99 COMP-3.  surcharge total
    02 O-GST PIC S9(5)V99 COMP-3.  GST amount
    02 O-PST PIC S9(5)V99 COMP-3.  PST amount
    02 O-HST PIC S9(5)V99 COMP-3.  HST amount
    02 O-QST PIC S9(5)V99 COMP-3.  QST amount
    02 O-PAYER PIC X.  duty code: 'E'/'B' = exporter/buyer pays duty & brokerage
    02 O-US PIC 9 COMP-3.   currency indicator: 0/1 = Can$/US$

FD  SHIPLIN.  daily shipped order lines
01  HL-RECORD PIC X(240).
01  HL-REC.
    02 HL-KEY.
      03 HL-ORDSEQ PIC 9(8).  order no. and order extension
      03 REDEFINES HL-ORDSEQ.
        04 HL-ORD PIC 9(6).   order no.
        04 HL-SEQ PIC 99.     order extension
      03 HL-LINE PIC 99.      order line
    02 HL-NO REDEFINES HL-KEY PIC 9(10).  order, extension, line
    02 HL-KP.
      03 HL-PROD PIC X(12).    product no.
      03 HL-DATE-REQ PIC 9(6). date required
    02 HL-CUSORD PIC X(9).     customer no.
    02 HL-LABINF PIC X(115).   various EDI fields
    02 HL-CONT PIC X.          container code
    02 HL-QTY PIC S9(7) COMP-3.       quantity
    02 HL-QTY-LEFT PIC S9(9) COMP-3.  quantity left to be shipped
    02 HL-QTY-THIS PIC S9(9) COMP-3.  quantity in this shipment
    02 HL-BDATA.   bolt data
      03 HL-QTY-AL PIC S9(7) COMP-3.      quantity allocated
      03 HL-WEIGHT-AL PIC S9(7) COMP-3.   weight allocated
      03 HL-QTY-ALPREV PIC S9(7) COMP-3.    quantity allocated earlier
      03 HL-WEIGHT-ALPREV PIC S9(7) COMP-3. weight allocated earlier
      03 HL-FILL1 PIC XX.   [dummy field]
      03 HL-OLD PIC 9 COMP-3.  indicator: 0/1 = no/yes print product condition message on picking tickets
      03 HL-ERR PIC 9 COMP-3.  indicator: 0/1 = no/yes print product allocation message on picking tickets
    02 HL-NDATA.   nut data
      03 HL-QTY-NAL PIC S9(7) COMP-3.      quantity allocated
      03 HL-WEIGHT-NAL PIC S9(7) COMP-3.   weight allocated
      03 HL-QTY-NALPREV PIC S9(7) COMP-3.    quantity allocated earlier
      03 HL-WEIGHT-NALPREV PIC S9(7) COMP-3. weight allocated earlier
      03 HL-FILL2 PIC XX.   [dummy field]
      03 HL-NOLD PIC 9 COMP-3.  indicator: 0/1 = no/yes print product condition message on picking tickets
      03 HL-NERR PIC 9 COMP-3.  indicator: 0/1 = no/yes print product allocation message on picking tickets
    02 HL-PAGE PIC 9 COMP-3.  [system work field]
    02 HL-USE PIC 9 COMP-3.   [system work field]
    02 HL-QTY-DIFF PIC S9(7) COMP-3. [system work field]
    02 HL-QTY-NEW PIC S9(7) COMP-3.  [system work field]
    02 HL-ACARTONS PIC 999 COMP-3. [system work field]
    02 HL-ALABELS PIC 999 COMP-3.  [system work field]

FD  SHIPORD.  daily shipped orders
01  HO-RECORD PIC X(240).
01  HO-REC.
    02 HO-KEY.
      03 HO-ORD PIC 9(6).  order no.
      03 HO-SEQ PIC 99.    order extension
    02 HO-NO REDEFINES HO-KEY PIC 9(8).
    02 HO-ORDSEQ REDEFINES HO-KEY PIC 9(8).
    02 HO-KB.
      03 HO-BL PIC 9(7).  bill of lading no.
    02 HO-KV.
      03 HO-VIA PIC 99.   ship via code
      03 HO-CUS PIC X(6). customer no.
      03 HO-DATE-REQ PIC 9(6).  date required
    02 HO-IND PIC 9 COMP-3.  status code: 0-7 = stage in order processing
    02 HO-BIND PIC 9 COMP-3. indicator: 0/1 = yes/no allow bin allocation
    02 HO-INVNO PIC 9(6) COMP-3.  invoice no.
    02 HO-NOALLOC PIC 9 COMP-3.  indicator: 0/1 = no/yes must ship even if not allocated
    02 HO-SID PIC 9(6) COMP-3.   shipment id
    02 HO-NET PIC S9(7) COMP-3.   net weight
    02 HO-GROSS PIC 9(8) COMP-3.  gross weight
    02 HO-PALLETS PIC 999 COMP-3. number of pallets
    02 HO-FILL1 PIC X(24).  [dummy field]
    02 HO-CUSORD PIC X(9).  customer order no.
    02 HO-TOTAL PIC S9(7)V99 COMP-3.   total amount
    02 HO-FREIGHT PIC S9(5)V99 COMP-3. freight amount
    02 HO-GST PIC S9(5)V99 COMP-3.  GST amount
    02 HO-PST PIC S9(5)V99 COMP-3.  PST amount
    02 HO-HST PIC S9(5)V99 COMP-3.  HST amount
    02 HO-QST PIC S9(5)V99 COMP-3.  QST amount
    02 HO-SHQUAL PIC XXX.  shipping type qualifier
    02 HO-SHTIME PIC 9(4) COMP-3.  shipping time
    02 HO-TPLANT PIC X(10).  destination plant id
    02 HO-DOCK PIC X(8).     destination dock id
    02 HO-CUSID PIC X(12).   customer shipment id
    02 HO-DXNO PIC 9(4) COMP-3. [system work field]
    02 HO-PACKS PIC 9(4) COMP-3 OCCURS 12.  number of containers (up to 12 types)

FD  SHIPTO.  various ship-to locations
01  SA-RECORD PIC X(150).
01  SA-REC.
    02 SA-KEY.
      03 SA-CUS PIC X(6).   customer no.
      03 SA-TO PIC 99.      ship-to code
    02 SA-NO REDEFINES SA-KEY PIC X(8).
    02 SA-NAME PIC X(32).   name
    02 SA-ADD1 PIC X(32).   address line 1
    02 SA-ADD2 PIC X(32).   address line 2
    02 SA-POST PIC X(10).   postal/zip code

FD  SHIPVIA.  shipping carriers
01  SV-RECORD PIC X(120).
01  SV-REC.
    02 SV-CARRIER PIC X(40).  carrier name
    02 SV-SCAC PIC X(4).      SCAC code
    02 SV-METHOD PIC XX.      method code
    02 SV-POOL PIC X(7).      pool name
    02 SV-EQNUM PIC X(10).    equipment no.
    02 SV-EQINIT PIC X(4).    equipment initials
    02 SV-SORT PIC 99 COMP-3. sort sequence for GM plants

FD  SOLDTO.  addresses that override regular address
01  UH-RECORD PIC X(240).
01  UH-REC.
    02 UH-KEY.
      03 UH-NO PIC X(6).  customer no.
    02 UH-LINE PIC X(40) OCCURS 5.  5 name & address lines

FD  STATEMENT.  archived customer statements
01  SW-RECORD PIC X(50).
01  SW-REC.
    02 SW-KEY.
      03 SW-CUS PIC X(6).   customer no.
      03 SW-DATE PIC 9(6).  statement date
      03 SW-LINE PIC 9(4).  statement line
    02 SW-DATA PIC X(30).   header data or line data
    02 REDEFINES SW-DATA.   header data (record with line=0)
      03 SW-BAL PIC S9(7)V99 COMP-3 OCCURS 6.  balances (total, current, 30-day, etc.)
    02 REDEFINES SW-DATA.   line data (record with line>0)
      03 SW-TDATE PIC 9(6) COMP-3.   transaction date
      03 SW-INV PIC 9(6) COMP-3.     invoice no.
      03 SW-AMT PIC S9(7)V99 COMP-3. transaction amount
      03 SW-CUSORD PIC X(9).         customer order no.
      03 SW-BL PIC 9(7) COMP-3.      bill of lading no.

FD  SUBCON BLOCK 1024.  subcontractor transactions
01  SJ-RECORD PIC X(320).
01  SJ-REC.
    02 SJ-KEY.
      03 SJ-MAC PIC 9(4).   machine/process no.
      03 SJ-MO PIC 9(6).    M.O. no. (manufacturing order)
      03 SJ-SUFFIX PIC X.   M.O. suffix
      03 SJ-LOT PIC 9(7).   lot no.
      03 SJ-PROD PIC X(12). product no.
    02 SJ-NPADS PIC 999 COMP-3.  number of pads
    02 SJ-BPADS PIC 99 COMP-3.   number of pad bundles
    02 SJ-DATE PIC 9(6) COMP-3.  transaction date
    02 SJ-OUTCON PIC 999 COMP-3.    contractor inbound process no.
    02 SJ-BUCKETS PIC S999 COMP-3.  original number of buckets
    02 SJ-WEIGHT PIC S9(7) COMP-3.  original weight
    02 SJ-OBUCKETS PIC S999 COMP-3. buckets currently out
    02 SJ-OWEIGHT PIC S9(7) COMP-3. weight currently out
    02 SJ-IBUCKETS PIC S999 COMP-3. buckets currently in
    02 SJ-IWEIGHT PIC S9(7) COMP-3. weight currently in
    02 SJ-SBUCKETS PIC S999 COMP-3. buckets in current shipment
    02 SJ-SWEIGHT PIC S9(7) COMP-3. weight in current shipment
    02 SJ-VEN PIC 9(4) COMP-3.  contractor vendor no.
    02 SJ-VIA PIC 99 COMP-3.    ship via code
    02 SJ-NAME PIC X(36).  ship-to name
    02 SJ-ADD1 PIC X(36).  ship-to address line 1
    02 SJ-ADD2 PIC X(24).  ship-to address line 2
    02 SJ-POST PIC X(7).   ship-to postal/zip code
    02 SJ-NOTE PIC X(50).  notes line
    02 SJ-USER PIC X(12).  operator id
    02 SJ-NCARTONS PIC 9(5) COMP-3.  number of cartons
    02 SJ-BCARTONS PIC 99 COMP-3.    number of carton bundles
    02 SJ-NSKIDS PIC 999 COMP-3.  number of skids
    02 SJ-BSKIDS PIC 99 COMP-3.   number of skid bundles
    02 SJ-FILL1 PIC X.  [dummy field]
    02 SJ-WEX PIC 9 COMP-3.  indicator: 0/1 = no/yes print excess weight message on bill of lading
    02 SJ-COST PIC 9(4)V999 COMP-3.  process cost based on cost mode
    02 SJ-CMODE PIC X.   cost mode: M/G/N = per 1000 pieces / per ton gross / per ton net
    02 SJ-BL PIC 9(7) COMP-3 OCCURS 15.  bill of lading history (up to 15 shipments)
    02 SJ-COFC PIC X(6).  c of c (certificate of compliance)

FD  SUBINV.  subcontractor invoicing details
01  SL-RECORD PIC X(115).
01  SL-REC.
    02 SL-KEY.
      03 SL-MAC PIC 9(4).    machine/process no.
      03 SL-MO PIC 9(6).     M.O. no. (manufacturing order)
      03 SL-SUFFIX PIC X.    M.O. suffix
      03 SL-LOT PIC 9(7).    lot no.
      03 SL-PROD PIC X(12).  product no.
      03 SL-KSLIP PIC X(10). packing slip no.
      03 SL-SEQ PIC 99.      sequence no.
    02 SL-KS.
      03 SL-SLIP PIC X(10).   packing slip no.
      03 SL-ORD PIC X(8).     purchase order no.
    02 SL-IND PIC 9 COMP-3.   indicator: 0/1 = yes/no record active
    02 SL-QTY PIC S9(9) COMP-3.     quantity
    02 SL-WEIGHT PIC S9(7) COMP-3.  weight
    02 SL-PALLETS PIC S999 COMP-3.  number of pallets
    02 SL-TRUCK PIC 9 COMP-3.  indicator: 0/1 = no/yes truck charge applies
    02 SL-LTLOAD PIC 9 COMP-3. indicator: 0/1 = no/yes less-than-truck-load premium applies
    02 SL-METRO PIC 9 COMP-3.  indicator: 0/1 = no/yes metro charge applies
    02 SL-INV-DATE PIC 9(6) COMP-3.  invoice date
    02 SL-RBUCKETS PIC S999 COMP-3.  number of returned buckets
    02 SL-JMAC PIC 9(4) COMP-3.   worksheet process no.
    02 SL-JDATE PIC 9(6) COMP-3.  worksheet date
    02 SL-JRET PIC 9 COMP-3.  worksheet indicator: 0/1 = no/yes final return

FD  TABLES.  various system tables
01  T-RECORD PIC X(60).
01  T-REC.
    02 T-KEY.
      03 T-TBL PIC 99.  table no.
      03 T-NO PIC 999.  item no. within table
    02 T-LINE PIC X(45).  item description
    02 REDEFINES T-LINE.  fields for table 5:
      03 T-OPM PIC 999.     process time in minutes
    02 REDEFINES T-LINE.  fields for table 6:
      03 T-DIS PIC 999 OCCURS 4.  up to 4 discount levels (interpreted as 0.999)
    02 REDEFINES T-LINE.  fields for table 7:
      03 T-GH1 PIC 9(6). 03 T-GH2 PIC 999. 03 T-GH3 PIC 99.  parts 1,2,3 of G/L A/C no.
    02 REDEFINES T-LINE.  fields for table 11:
      03 T-PLR PIC 9(4)V99. 03 T-PLS PIC X(39).  plating charge percentage, description
    02 REDEFINES T-LINE.  fields for table 14:
      03 T-CTA PIC XXX. 03 T-CTX PIC X. 03 T-CTN PIC X(20).  country abbreviation, name
    02 REDEFINES T-LINE.  fields for table 16:
      03 T-TE1 PIC 99. 03 T-TE2 PIC X(25).  days, terms
    02 REDEFINES T-LINE.  fields for table 22:
      03 T-GP1 PIC 99.    part 3 of G/L A/C no.
    02 REDEFINES T-LINE.  fields for table 24:
      03 T-PCN PIC 999. 03 T-PCX1 PIC X. 03 T-PCD PIC X(31). 03 T-PCX2 PIC X.  characteristic no., description
      03 T-PCI PIC 99. 03 T-PCU PIC 99. 03 T-PCX3 PIC X. 03 T-PCS PIC 999.  instrument, unit of measure, sample plan

FD  TOOLPROD.  index for tool operations
01  TP-RECORD PIC X(50).
01  TP-REC.
    02 TP-KEY.
      03 TP-TOOL PIC X(12).  part no. of tool
      03 TP-PROD PIC X(12).  product no. that uses the tool
      03 TP-MAC PIC 99.      machine
      03 TP-FLD PIC 999.     field no. in table in TOOLS file

FD  TOOLS.  tool lists
01  TS-RECORD PIC X(3300).
01  TS-REC.
    02 TS-KEY.
      03 TS-PROD PIC X(12).   product no.
      03 TS-MAC PIC 99.       machine
    02 TS-TOOL PIC X(12) OCCURS 250.  up to 250 tool part numbers
    02 TS-IND PIC 9 COMP-3.  indicator: 0/1 = no/yes new tool form was printed
    02 TS-NOTE PIC X(60) OCCURS 3.  3 note lines
    02 TS-PLNUM PIC X(8).  PL no.

FD  TRANS.  sales transactions
01  TR-RECORD PIC X(75).
01  TR-REC.
    02 TR-KEY.
      03 TR-CUS PIC X(6).    customer no.
      03 TR-KI.
        04 TR-INV PIC 9(6).  invoice no.
    02 TR-KB.
      03 TR-BL PIC 9(7).     bill of lading no.
      03 TR-BINV PIC 9(6).   invoice no.
    02 TR-ORD PIC 9(6) COMP-3.  order no.
    02 TR-DATE PIC 9(6) COMP-3. invoice date
    02 TR-AMT PIC S9(7)V99 COMP-3.      amount still unpaid
    02 TR-AMT-ORIG PIC S9(7)V99 COMP-3. amount originally invoiced
    02 TR-CUSORD PIC X(9).   customer order no.
    02 TR-DATE-PAY PIC 9(6) COMP-3.  payment effective date
    02 TR-TERMS PIC X(6).  invoice terms
    02 TR-DATE-PREV PIC 9(6) COMP-3 OCCURS 2.  effective date of previous two payments

FD  TRAUDIT.  audit details from A/R transactions
01  YT-RECORD PIC X(75).
01  YT-REC.
    02 YT-KEY.
      03 YT-CUS PIC X(6).   customer no.
      03 YT-INV PIC 9(6).   invoice no.
      03 YT-DATE PIC 9(6).  posting date
      03 YT-TIME PIC 9(8).  posting time
    02 YT-TYPE PIC 9 COMP-3. transaction code: 0/1/2/3 = trade/cash/adjustment/credit
    02 YT-AMT PIC S9(7)V99 COMP-3.  amount
    02 YT-IDATE PIC 9(6) COMP-3.  invoice date
    02 YT-TDATE PIC 9(6) COMP-3.  transaction date
    02 YT-TERMS PIC X(6).    invoice terms

FD  USERS.  user variables
01  UN-RECORD PIC X(1500).
01  UN-REC.
    02 UN-KEY.
      03 UN-USER PIC X(12).  VMS user id
    02 UN-KN.
      03 UN-NUM PIC 99.  system user id
    02 UN-TDX OCCURS 24. 03 UN-TD PIC X OCCURS 40.  menu functions authorization table
    02 UN-PR-FILE PIC X(8).    name of last file printed in G-6
    02 UN-PR-NO PIC 99.        number of last file printed in G-6
    02 UN-PR-EXT PIC XXX.      extension of last file printed in G-6
    02 UN-PR-QUEUE PIC X(10).  print queue of last file printed in G-6
    02 UN-PC PIC 9.        indicator: 0/1 = VT terminal / PC
    02 UN-NAME PIC X(24).  user's name
    02 UN-PRNM PIC XX.     default print file prefix (PR/PA/PB)
    02 UN-CFLD PIC 99 OCCURS 10.  fields permitted in customer file maintenance
    02 UN-PFLD PIC 99 OCCURS 10.  fields permitted in product file maintenance

FD  VENDOR.  vendors
01  V-RECORD PIC X(480).
01  V-REC.
    02 V-KEY.
      03 V-DIV PIC 99.  A/P division
      03 V-NO PIC 9(4). vendor no.
    02 V-KN.
      03 V-NAME PIC X(36). name
    02 V-ADD1 PIC X(36).   address line 1
    02 V-ADD2 PIC X(24).   address line 2
    02 V-POST PIC X(7).    postal code
    02 V-SNAME PIC X(36).  ship-to name
    02 V-SADD1 PIC X(36).  ship-to address line 1
    02 V-SADD2 PIC X(24).  ship-to address line 2
    02 V-SPOST PIC X(7).   ship-to postal code
    02 V-CONTACT PIC X(30) OCCURS 4.  4 contact information lines
    02 V-CRDATE PIC 9(6) COMP-3.  record creation date
    02 V-SIND PIC 9 COMP-3. subcontractor indicator: 0/1 = ship to regular/ship-to address
    02 V-DISC PIC 99V99 COMP-3.  discount
    02 V-CONTRA PIC 9(7) COMP-3. G/L contra
    02 V-PAY PIC 9 COMP-3.  payment-due code
    02 V-CLASS PIC 999 COMP-3.  commodity class
    02 V-GST-IND PIC 9 COMP-3.  indicator: 0/1 = yes/no GST applies
    02 V-FREIGHT-STD PIC 999V99 COMP-3.  standard freight charge
    02 V-FREIGHT-RATE PIC 99V99 COMP-3.  freight rate/100 lbs
    02 V-FRPAY PIC 9 COMP-3.  indicator: 0/1 = no/yes freight paid to vendor
    02 V-INV-DATE PIC 9(6) COMP-3.  last invoice date
    02 V-GROSS PIC S9(9)V99 COMP-3 OCCURS 2.  gross balances, Can$ & US$
    02 V-NET PIC S9(9)V99 COMP-3 OCCURS 2.    net balances, Can$ & US$
    02 V-PUR-YTD PIC S9(9) COMP-3 OCCURS 2.   purchases YTD, Can$ & US$
    02 V-PUR-LAST PIC S9(9) COMP-3 OCCURS 2.  purchases last year, Can$ & US$
    02 V-PUR-2 PIC S9(9) COMP-3 OCCURS 2.     purchases 2 years ago, Can$ & US$
    02 V-DISC-YTD PIC S9(9) COMP-3 OCCURS 2.  discounts YTD, Can$ & US$

FD  WORKSHEET BLOCK 2048.  worksheets for production processes
01  J-RECORD PIC X(240).
01  J-REC.
    02 J-KEY.
      03 J-NO PIC 9(6).   M.O. no. (manufacturing order)
      03 J-KM.
        04 J-MAC PIC 9(4).  machine/process no.
        04 J-DATE PIC 9(6). date
        04 J-SHIFT PIC 9.   operator shift code
        04 J-EMP PIC 9(4).  operator employee no.
    02 J-KN.
      03 J-KNO PIC 9(6).   M.O. no.
      03 J-KD.
        04 J-KDATE PIC 9(6). date
        04 J-KSHIFT PIC 9.   operator shift code
        04 J-KMAC PIC 9(4).  machine/process no.
    02 J-NAME PIC X(20).   employee name
    02 J-PROD PIC X(12).   product no.
    02 J-HOURS PIC 99V99 COMP-3. hours worked
    02 J-QTY PIC S9(9) COMP-3.   quantity made
    02 J-WEIGHT PIC S9(9) COMP-3.  calculated weight made
    02 J-AWEIGHT PIC S9(9) COMP-3. actual weight made
    02 J-NOTE PIC X(70).  notes line
    02 REDEFINES J-NOTE. 03 J-LOT PIC 9(7) OCCURS 10.  table of up to 10 lot nos.
    02 J-BKEMPTY PIC 9 COMP-3.  indicator: 0/1 = no/yes empty bucket(s)
    02 J-BKTOT PIC 99 COMP-3.   number of buckets
    02 J-DHOURS PIC 9V99 COMP-3 OCCURS 9. machine hours for 9 time codes
    02 J-BKWRONG PIC 9 COMP-3. indicator: 0/1 = no/yes actual weight greater than calculated

--------------------------------------------------------------------------------

