Module: Stupidedi::TransactionSets::FortyTen::Standards

Defined in:
lib/stupidedi/transaction_sets/004010/standards.rb,
lib/stupidedi/transaction_sets/004010/standards/AR943.rb,
lib/stupidedi/transaction_sets/004010/standards/FA997.rb,
lib/stupidedi/transaction_sets/004010/standards/GF990.rb,
lib/stupidedi/transaction_sets/004010/standards/HP835.rb,
lib/stupidedi/transaction_sets/004010/standards/IM210.rb,
lib/stupidedi/transaction_sets/004010/standards/OW940.rb,
lib/stupidedi/transaction_sets/004010/standards/PO850.rb,
lib/stupidedi/transaction_sets/004010/standards/PR855.rb,
lib/stupidedi/transaction_sets/004010/standards/PS830.rb,
lib/stupidedi/transaction_sets/004010/standards/QM214.rb,
lib/stupidedi/transaction_sets/004010/standards/RE944.rb,
lib/stupidedi/transaction_sets/004010/standards/SC832.rb,
lib/stupidedi/transaction_sets/004010/standards/SH856.rb,
lib/stupidedi/transaction_sets/004010/standards/SM204.rb,
lib/stupidedi/transaction_sets/004010/standards/SQ866.rb,
lib/stupidedi/transaction_sets/004010/standards/SS862.rb,
lib/stupidedi/transaction_sets/004010/standards/SW945.rb

Constant Summary collapse

SegmentReqs =
Versions::FortyTen::SegmentReqs
AR943 =
b.build("AR", "943", "Warehouse Stock Transfer",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::W06.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(10),
  s:: N1.use(140, r::Mandatory,  d::RepeatCount.bounded(1))),

s::G62.use(110, r::Optional,  d::RepeatCount.bounded(2)),
s::W27.use(130, r::Mandatory, d::RepeatCount.bounded(1))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("W04", d::RepeatCount.bounded(10000),
  s::W04.use(220, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N9.use(240, r::Optional,  d::RepeatCount.bounded(2)))),

          d::TableDef.summary("3 - Summary",
s::W03.use(10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(30, r::Mandatory, d::RepeatCount.bounded(1))))
FA997 =
b.build("FA", "997", "Functional Acknowledgment",
          d::TableDef.header("1 - Header",
s:: ST.use(10, r::Mandatory, d::RepeatCount.bounded(1)),
s::AK1.use(20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("AK2", d::RepeatCount.bounded(999999),
  s:: AK2.use( 30, r::Optional, d::RepeatCount.bounded(1)),

  d::LoopDef.build("AK3", d::RepeatCount.bounded(999999),
    s::AK3.use(40, r::Optional, d::RepeatCount.bounded(1)),
    s::AK4.use(50, r::Optional, d::RepeatCount.bounded(99))),

  s::AK5.use(60, r::Mandatory, d::RepeatCount.bounded(1))),

s::AK9.use(70, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(80, r::Mandatory, d::RepeatCount.bounded(1))))
GF990 =
b.build("GF", "990", "Response to a Load Tender",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: B1.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s:: N9.use( 30, r::Optional,  d::RepeatCount.bounded(1)),
s:: K1.use( 60, r::Optional,  d::RepeatCount.bounded(10)),
s:: SE.use( 70, r::Mandatory, d::RepeatCount.bounded(1))))
HP835 =
b.build("HP", "835", "Health Care Claim Payment/Advice",
          d::TableDef.header("1 - Header",
s:: ST.use(100, r::Mandatory, d::RepeatCount.bounded(1)),
s::BPR.use(200, r::Mandatory, d::RepeatCount.bounded(1)),
s::TRN.use(400, r::Optional,  d::RepeatCount.bounded(1)),
s::CUR.use(500, r::Optional,  d::RepeatCount.bounded(1)),
s::REF.use(600, r::Optional,  d::RepeatCount.bounded(1)),
s::DTM.use(700, r::Optional,  d::RepeatCount.bounded(1)),

d::LoopDef.build("1000", d::RepeatCount.bounded(200),
  s:: N1.use( 800, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N3.use(1000, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N4.use(1100, r::Mandatory, d::RepeatCount.bounded(1)),
  s::REF.use(1200, r::Optional,  d::RepeatCount.bounded(4)),
  s::PER.use(1300, r::Optional,  d::RepeatCount.bounded(1)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("2000", d::RepeatCount.unbounded,
  s:: LX.use(30, r::Optional,  d::RepeatCount.bounded(1)),
  s::TS3.use(50, r::Optional,  d::RepeatCount.bounded(1)),
  s::TS2.use(70, r::Optional,  d::RepeatCount.bounded(1)),

  d::LoopDef.build("2100", d::RepeatCount.unbounded,
    s::CLP.use(100, r::Mandatory, d::RepeatCount.bounded(1)),
    s::CAS.use(200, r::Optional,  d::RepeatCount.bounded(99)),
    s::NM1.use(300, r::Mandatory, d::RepeatCount.bounded(9)),
    s::MIA.use(330, r::Optional,  d::RepeatCount.bounded(1)),
    s::MOA.use(350, r::Optional,  d::RepeatCount.bounded(1)),
    s::REF.use(400, r::Optional,  d::RepeatCount.bounded(10)),
    s::DTM.use(500, r::Optional,  d::RepeatCount.bounded(4)),
    s::PER.use(600, r::Optional,  d::RepeatCount.bounded(3)),
    s::AMT.use(620, r::Optional,  d::RepeatCount.bounded(14)),
    s::QTY.use(640, r::Optional,  d::RepeatCount.bounded(15))),

    d::LoopDef.build("2110", d::RepeatCount.bounded(999),
      s::SVC.use( 700, r::Optional,  d::RepeatCount.bounded(1)),
      s::DTM.use( 800, r::Optional,  d::RepeatCount.bounded(3)),
      s::CAS.use( 900, r::Optional,  d::RepeatCount.bounded(99)),
      s::REF.use(1000, r::Optional,  d::RepeatCount.bounded(7)),
      s::AMT.use(1100, r::Optional,  d::RepeatCount.bounded(12)),
      s::QTY.use(1200, r::Optional,  d::RepeatCount.bounded(6)),
      s:: LQ.use(1300, r::Optional,  d::RepeatCount.bounded(99))))),

          d::TableDef.summary("3 - Summary",
s::PLB.use(100, r::Optional,  d::RepeatCount.unbounded),
s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))))
IM210 =
b.build("IM", "210", "Motor Carrier Freight Details and Invoice",
          d::TableDef.header("Heading",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: B3.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s:: C3.use( 40, r::Mandatory, d::RepeatCount.bounded(1)),
s:: N9.use( 60, r::Optional,  d::RepeatCount.bounded(300)),
s::G62.use( 70, r::Optional,  d::RepeatCount.bounded(6)),
s:: R3.use( 80, r::Optional,  d::RepeatCount.bounded(12)),
s:: H3.use( 90, r::Optional,  d::RepeatCount.bounded(6)),

d::LoopDef.build("0100", d::RepeatCount.bounded(5),
  s:: N1.use(110, r::Mandatory,  d::RepeatCount.bounded(1)),
  s:: N3.use(130, r::Mandatory,  d::RepeatCount.bounded(2)),
  s:: N4.use(140, r::Mandatory,  d::RepeatCount.bounded(1)),
  s:: N9.use(150, r::Optional,  d::RepeatCount.bounded(5))),

d::LoopDef.build("0200", d::RepeatCount.bounded(10),
  s:: N7.use(160, r::Mandatory,  d::RepeatCount.bounded(1)))),

          d::TableDef.detail("Detail",
d::LoopDef.build("0400", d::RepeatCount.unbounded,
  s:: LX.use(120, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N9.use(130, r::Mandatory,  d::RepeatCount.bounded(5)),
  s:: L5.use(140, r::Optional,  d::RepeatCount.bounded(30)),
  s:: L0.use(170, r::Optional,  d::RepeatCount.bounded(10)),
  s:: L1.use(180, r::Optional,  d::RepeatCount.bounded(10)),
  s:: L4.use(190, r::Optional,  d::RepeatCount.bounded(10)),
  s:: L7.use(200, r::Optional,  d::RepeatCount.bounded(10)))),

          d::TableDef.summary("Summary",
s:: L3.use(10, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use(20, r::Mandatory, d::RepeatCount.bounded(1))))
OW940 =
b.build("OW", "940", "Warehouse Shipping Order",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::W05.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(10),
  s:: N1.use( 40, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N2.use( 50, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N3.use( 60, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use( 70, r::Optional,  d::RepeatCount.bounded(1))),

s:: N9.use(  90, r::Optional,  d::RepeatCount.bounded(10)),
s::G62.use( 110, r::Optional,  d::RepeatCount.bounded(10)),
s::NTE.use( 120, r::Optional,  d::RepeatCount.bounded(1)),
s::W66.use( 140, r::Mandatory, d::RepeatCount.bounded(1))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("LX", d::RepeatCount.bounded(9999),
  s:: LX.use( 05, r::Mandatory, d::RepeatCount.bounded(1))),

d::LoopDef.build("W01", d::RepeatCount.bounded(9999),
  s::W01.use( 20, r::Mandatory,  d::RepeatCount.bounded(1)),
  s:: N9.use( 40, r::Optional,   d::RepeatCount.bounded(200)),
  s::W20.use( 50, r::Mandatory,  d::RepeatCount.bounded(1)))),

          d::TableDef.summary("3 - Summary",
s::W76.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use( 20, r::Mandatory, d::RepeatCount.bounded(1))))
PO850 =
b.build("PO", "850", "Purchase Order",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BEG.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::CUR.use( 40, r::Optional,  d::RepeatCount.bounded(1)),
s::REF.use( 50, r::Optional,  d::RepeatCount.unbounded),
s::PER.use( 60, r::Optional,  d::RepeatCount.bounded(3)),
s::DTM.use(150, r::Optional,  d::RepeatCount.bounded(10)),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s:: N1.use( 310, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N3.use( 330, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use( 340, r::Optional,  d::RepeatCount.unbounded),
  s::REF.use( 350, r::Optional,  d::RepeatCount.bounded(12)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("PO1", d::RepeatCount.bounded(10000),
  s::PO1.use( 10, r::Mandatory, d::RepeatCount.bounded(1))),

d::LoopDef.build("PID", d::RepeatCount.bounded(1000),
  s::PID.use( 50, r::Optional,  d::RepeatCount.bounded(1))),

d::LoopDef.build("SCH", d::RepeatCount.bounded(200),
  s::SCH.use( 295, r::Optional, d::RepeatCount.bounded(1))),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s::N1.use( 350, r::Optional, d::RepeatCount.bounded(1)),
  s::N3.use( 370, r::Optional,  d::RepeatCount.bounded(2)),
  s::N4.use( 380, r::Optional,  d::RepeatCount.bounded(1)))),

          d::TableDef.summary("3 - Summary",
d::LoopDef.build("CTT", d::RepeatCount.bounded(1),
  s::CTT.use( 10, r::Optional,  d::RepeatCount.bounded(1))),

s:: SE.use( 30, r::Mandatory, d::RepeatCount.bounded(1))))
PR855 =
b.build("PR", "855", "Purchase Order Ack",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BAK.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s:: N1.use( 310, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N3.use( 330, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use( 340, r::Optional,  d::RepeatCount.unbounded),
  s::REF.use( 350, r::Optional,  d::RepeatCount.bounded(12)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("PO1", d::RepeatCount.bounded(10000),
  s::PO1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)))),

          d::TableDef.summary("3 - Summary",
d::LoopDef.build("CTT", d::RepeatCount.bounded(1),
  s::CTT.use( 10, r::Optional,  d::RepeatCount.bounded(1))),

s:: SE.use( 30, r::Optional, d::RepeatCount.bounded(1))))
PS830 =
b.build("PS", "830", "Planning Schedule with Release Capability",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BFR.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::REF.use( 50, r::Optional,  d::RepeatCount.bounded(12)),

d::LoopDef.build("N1", d::RepeatCount.bounded(2),
  s:: N1.use( 230, r::Optional,  d::RepeatCount.bounded(1)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("LIN", d::RepeatCount.unbounded,
  s::LIN.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
  s::UIT.use( 20, r::Optional,  d::RepeatCount.bounded(1)),
  s::PID.use( 80, r::Optional,  d::RepeatCount.bounded(1)),

  d::LoopDef.build("N1", d::RepeatCount.bounded(1),
    s::N1.use( 320, r::Optional,  d::RepeatCount.bounded(1))),

  d::LoopDef.build("SDP", d::RepeatCount.bounded(1),
    s::SDP.use( 450, r::Optional,  d::RepeatCount.bounded(1)),
    s::FST.use( 460, r::Optional,  d::RepeatCount.bounded(6))),

  d::LoopDef.build("SHP", d::RepeatCount.bounded(1),
    s::SHP.use( 470, r::Optional,  d::RepeatCount.bounded(1))))),

          d::TableDef.summary("3 - Summary",
s::CTT.use( 10, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use( 20, r::Mandatory, d::RepeatCount.bounded(1))))
QM214 =
b.build("QM", "214", "Transportation Carrier Shipment Status Message",
          d::TableDef.header("Heading",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::B10.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::L11.use( 30, r::Optional , d::RepeatCount.bounded(300)),

d::LoopDef.build("0100", d::RepeatCount.bounded(10),
  s:: N1.use( 50, r::Optional , d::RepeatCount.bounded(1)),
  s:: N3.use( 70, r::Optional , d::RepeatCount.bounded(2)),
  s:: N4.use( 80, r::Optional , d::RepeatCount.bounded(1))),

d::LoopDef.build("0150", d::RepeatCount.bounded(12),
  s::MS3.use(120, r::Optional , d::RepeatCount.bounded(1))),

d::LoopDef.build("0200", d::RepeatCount.bounded(999999),
  s:: LX.use(130, r::Mandatory, d::RepeatCount.bounded(1)),

  d::LoopDef.build("0205", d::RepeatCount.bounded(10),
    s::AT7.use(140, r::Mandatory, d::RepeatCount.bounded(1)),
    s::MS1.use(143, r::Optional , d::RepeatCount.bounded(1)),
    s::MS2.use(146, r::Optional , d::RepeatCount.bounded(1))),

  s::L11.use(150, r::Optional , d::RepeatCount.bounded(10)),
  s::AT8.use(200, r::Optional , d::RepeatCount.bounded(10))),

s:: SE.use(610, r::Mandatory, d::RepeatCount.bounded(1))))
RE944 =
b.build("RE", "944", "Warehouse Stock Transfer Receipt Advice",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::W17.use(20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(10),
  s:: N1.use( 40, r::Mandatory,  d::RepeatCount.bounded(1))),

s::G62.use(140, r::Optional ,  d::RepeatCount.bounded(2))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("W07", d::RepeatCount.bounded(9999),
  s::W07.use(20, r::Mandatory, d::RepeatCount.bounded(1)),
  s::G69.use(30, r::Optional,  d::RepeatCount.bounded(5)),
  s:: N9.use(40, r::Mandatory, d::RepeatCount.bounded(200)))),

          d::TableDef.summary("3 - Summary",
s::W14.use(10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(20, r::Mandatory, d::RepeatCount.bounded(1))))
SC832 =
b.build("SC", "832", "Price/Sales Catalog",
          d::TableDef.header("1 - Header",
s:: ST.use( 100, r::Mandatory, d::RepeatCount.bounded(1)),
s::BCT.use( 200, r::Mandatory, d::RepeatCount.bounded(1)),
s::REF.use( 500, r::Optional, d::RepeatCount.unbounded),
s::DTM.use( 700, r::Optional, d::RepeatCount.bounded(10)),
d::LoopDef.build("N1", d::RepeatCount.bounded(1),
  s::N1.use(1500, r::Optional, d::RepeatCount.bounded(1)))),

          d::TableDef.detail("2 - Products",
d::LoopDef.build("LIN", d::RepeatCount.bounded(200000),
  s::LIN.use( 100, r::Optional,  d::RepeatCount.bounded(1)),
  s::DTM.use( 300, r::Optional,  d::RepeatCount.bounded(10)),
  s::REF.use( 400, r::Optional,  d::RepeatCount.unbounded),
  s::PID.use( 700, r::Optional,   d::RepeatCount.bounded(200)),
  s::PO4.use(1000, r::Mandatory,  d::RepeatCount.bounded(1)),
  d::LoopDef.build("CTP", d::RepeatCount.bounded(100),
    s::CTP.use(1700, r::Optional, d::RepeatCount.bounded(1))))),

          d::TableDef.summary("3 - Summary",
s::CTT.use(100, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))))
SH856 =
b.build("SH", "856", "Ship Notice/Manifest",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BSN.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::DTM.use( 40, r::Optional,  d::RepeatCount.bounded(10))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("HL", d::RepeatCount.bounded(200000),
  s:: HL.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
  s::MEA.use( 80, r::Optional,  d::RepeatCount.bounded(40)),
  s::TD1.use(110, r::Optional,  d::RepeatCount.bounded(20)),
  s::TD5.use(120, r::Optional,  d::RepeatCount.bounded(12)),
  s::TD3.use(130, r::Optional,  d::RepeatCount.bounded(12)),
  s::TD4.use(140, r::Optional,  d::RepeatCount.bounded(5)),
  s::REF.use(150, r::Optional,  d::RepeatCount.unbounded),),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s:: N1.use( 310, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N3.use( 330, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use( 340, r::Optional,  d::RepeatCount.unbounded),
  s::REF.use( 350, r::Optional,  d::RepeatCount.bounded(12)))),

          d::TableDef.summary("4 - Summary",
s::CTT.use(100, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))))
SM204 =
b.build("SM", "204", "Motor Carrier Load Tender",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: B2.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::B2A.use( 30, r::Mandatory, d::RepeatCount.bounded(1)),
s::L11.use( 80, r::Optional,  d::RepeatCount.bounded(100)),
s::G62.use( 90, r::Optional,  d::RepeatCount.bounded(1)),
s::MS3.use(100, r::Mandatory, d::RepeatCount.bounded(1)),
s::PLD.use(120, r::Optional,  d::RepeatCount.bounded(1)),
s::NTE.use(130, r::Optional,  d::RepeatCount.bounded(10)),

d::LoopDef.build("0100", d::RepeatCount.bounded(5),
  s:: N1.use(140, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N3.use(160, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use(170, r::Optional,  d::RepeatCount.bounded(1)),
  s::G61.use(190, r::Optional,  d::RepeatCount.bounded(3))),

d::LoopDef.build("0200", d::RepeatCount.bounded(10),
  s:: N7.use(200, r::Mandatory, d::RepeatCount.bounded(1)),
  s::MEA.use(208, r::Optional,  d::RepeatCount.bounded(1)),
  s:: M7.use(210, r::Optional,  d::RepeatCount.bounded(2)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("0300", d::RepeatCount.unbounded,
  s:: S5.use(10, r::Mandatory, d::RepeatCount.bounded(1)),
  s::L11.use(20, r::Optional,  d::RepeatCount.bounded(200)),
  s::G62.use(30, r::Optional,  d::RepeatCount.bounded(2)),
  s::LAD.use(50, r::Optional, d::RepeatCount.bounded(999)),
  s::NTE.use(65, r::Optional,  d::RepeatCount.bounded(20)),

  d::LoopDef.build("0310", d::RepeatCount.bounded(1),
    s:: N1.use( 70, r::Mandatory, d::RepeatCount.bounded(1)),
    s:: N3.use( 90, r::Optional,  d::RepeatCount.bounded(2)),
    s:: N4.use(100, r::Optional,  d::RepeatCount.bounded(1)),
    s::G61.use(120, r::Optional,  d::RepeatCount.bounded(3))),

  d::LoopDef.build("0320", d::RepeatCount.bounded(99),
    s:: L5.use(130, r::Optional,  d::RepeatCount.bounded(1)),
    s::AT8.use(135, r::Optional,  d::RepeatCount.bounded(1)),

    d::LoopDef.build("0325", d::RepeatCount.bounded(99),
      s::G61.use(140, r::Optional,  d::RepeatCount.bounded(1)),
      s::L11.use(135, r::Optional,  d::RepeatCount.bounded(30)),

      d::LoopDef.build("0330", d::RepeatCount.bounded(25),
        s::LH1.use(143, r::Optional,  d::RepeatCount.bounded(1)),
        s::LH2.use(144, r::Optional,  d::RepeatCount.bounded(4)),
        s::LH3.use(145, r::Optional,  d::RepeatCount.bounded(10)),
        s::LFH.use(146, r::Optional,  d::RepeatCount.bounded(20))))),

  d::LoopDef.build("0350", d::RepeatCount.bounded(999),
    s::OID.use(150, r::Optional, d::RepeatCount.bounded(1)),

    d::LoopDef.build("0360", d::RepeatCount.bounded(99),
      s:: L5.use(190, r::Optional, d::RepeatCount.bounded(1)),
      s::AT8.use(195, r::Optional, d::RepeatCount.bounded(1)),

      d::LoopDef.build("0365", d::RepeatCount.bounded(99),
        s::G61.use(200, r::Optional, d::RepeatCount.bounded(1)),
        s::L11.use(201, r::Optional, d::RepeatCount.bounded(5)),

        d::LoopDef.build("0370", d::RepeatCount.bounded(25),
          s::LH1.use(203, r::Optional, d::RepeatCount.bounded(1)),
          s::LH2.use(204, r::Optional, d::RepeatCount.bounded(4)),
          s::LH3.use(205, r::Optional, d::RepeatCount.bounded(10)),
          s::LFH.use(206, r::Optional, d::RepeatCount.bounded(20)))))))),

          d::TableDef.summary("Summary",
s:: L3.use(10, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use(20, r::Mandatory, d::RepeatCount.bounded(1))))
SQ866 =
b.build("SQ", "866", "Production Sequence",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BSS.use( 20, r::Mandatory, d::RepeatCount.bounded(1))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("DTM", d::RepeatCount.bounded(100),
  s::DTM.use(110, r::Mandatory, d::RepeatCount.bounded(1)),

  d::LoopDef.build("LIN", d::RepeatCount.unbounded,
    s::LIN.use(150, r::Optional, d::RepeatCount.bounded(1)),
    s::REF.use(160, r::Optional,  d::RepeatCount.unbounded),
    s::QTY.use(170, r::Optional,  d::RepeatCount.bounded(1))))),

          d::TableDef.summary("3 - Summary",
s::CTT.use(195, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))))
SS862 =
b.build("SS", "862", "Shipping Schedule",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BSS.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::DTM.use( 30, r::Optional, d::RepeatCount.bounded(10)),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s:: N1.use( 50, r::Optional,  d::RepeatCount.bounded(1)),
  s::REF.use( 90, r::Optional,  d::RepeatCount.bounded(12)),
  s::PER.use(100, r::Optional,  d::RepeatCount.bounded(3)))),

          d::TableDef.detail("2 - Detail",
d::LoopDef.build("LIN", d::RepeatCount.bounded(10000),
  s::LIN.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
  s::UIT.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
  s::REF.use( 50, r::Optional,  d::RepeatCount.bounded(12)),

  d::LoopDef.build("FST", d::RepeatCount.bounded(100),
    s::FST.use( 80, r::Optional, d::RepeatCount.bounded(1)),

    d::LoopDef.build("JIT", d::RepeatCount.bounded(96),
      s::JIT.use(110, r::Optional,  d::RepeatCount.bounded(1)),
      s::REF.use(120, r::Optional,  d::RepeatCount.bounded(500)))))),

          d::TableDef.detail("Summary",
s::CTT.use(10, r::Optional,  d::RepeatCount.bounded(1)),
s:: SE.use(20, r::Mandatory, d::RepeatCount.bounded(1))))
SW945 =
b.build("SW", "945", "Warehouse Shipping Advice",
          d::TableDef.header("1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::W06.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(10),
  s:: N1.use( 40, r::Mandatory, d::RepeatCount.bounded(1)),
  s:: N3.use( 60, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N4.use( 70, r::Optional,  d::RepeatCount.bounded(1))),

s:: N9.use( 90, r::Optional,  d::RepeatCount.bounded(10)),
s::G62.use(110, r::Optional,  d::RepeatCount.bounded(5)),
s::NTE.use(120, r::Optional,  d::RepeatCount.bounded(20)),
s::W27.use(130, r::Optional,  d::RepeatCount.bounded(1))),

          d::TableDef.header("2 - Detail",
d::LoopDef.build("LX", d::RepeatCount.bounded(9999),
  s:: LX.use(  5, r::Mandatory, d::RepeatCount.bounded(1)),
  s::MAN.use( 10, r::Mandatory, d::RepeatCount.bounded(1))),

d::LoopDef.build("W12", d::RepeatCount.bounded(9999),
  s::W12.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
  s::G69.use( 30, r::Optional,  d::RepeatCount.bounded(5)),
  s:: N9.use( 40, r::Optional,  d::RepeatCount.bounded(200)))),

          d::TableDef.header("3 - Summary",
s::W03.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use( 30, r::Mandatory, d::RepeatCount.bounded(1))))