home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 25 / CD_ASCQ_25_1095.iso / dos / tools / par330 / exampl14.pom < prev    next >
Text File  |  1995-09-06  |  1KB  |  54 lines

  1. ;
  2. ;   NOTE:  A quick-reference summary of POM commands appears in EXAMPL04.POM
  3. ;
  4. ;-------------------------------------------------------------------------------
  5. ;
  6. ;   Ignore the header line
  7. ;
  8. IGNORE   $FLINE[3 8] = "ORDER#"
  9. ;
  10. ;   Everything else in the file is handled below
  11. ;
  12. BEGIN $FLINE[5 8] <> "    "
  13.   ;
  14.   ;   This is the start of a customer record
  15.   ;
  16.   SET      custcode = $FLINE[10 15]
  17.   TRIM     custcode "B" " "
  18.   SET      custname = $FLINE[17 47]
  19.   TRIM     custname "B" " "
  20.   ;
  21.   ;   Output two linefeeds (except at the start of the report)
  22.   ;
  23.   OUTEND   leadlf = "Y" |
  24.   OUTEND   leadlf = "Y" |
  25.   SET      leadlf = "Y"
  26.   ;
  27.   ;   Output customer name and customer code
  28.   ;
  29.   APPEND   title custname " (" custcode ")"
  30.   SETLEN   tlen  title
  31.   SET      uline = ""
  32.   PAD      uline "L" "-" tlen
  33.   OUTEND   |{custname} ({custcode})
  34.   OUTEND   |{uline}
  35.   ;
  36.   ;   Skip the header line
  37.   ;
  38.   READNEXT
  39. ELSE
  40.   ;
  41.   ;   This is the start of a product information line
  42.   ;   Extract the product code and (on the next line) the product name
  43.   ;
  44.   SET      prodcode = $FLINE[10 19]
  45.   READNEXT
  46.   SET      prodname = $FLINE[10 60]
  47.   TRIM     prodname "B" " "
  48.   ;
  49.   ;   Output this item if the code doesn't contain "-30-"
  50.   ;
  51.   OUTEND   prodcode ~ "-30-" |{prodcode} {prodname}
  52. END
  53.  
  54.