home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / dbaseii / zdirfile.lbr / DIRLST.CQD / DIRLST.CMD
OS/2 REXX Batch file  |  1986-09-26  |  2KB  |  118 lines

  1. *
  2. *-------------------------------------------------------
  3. * " DIRLST.CMD " , 0538pm, sun, 20.Jul.86, Glen Ellis
  4. *-------------------------------------------------------
  5. *
  6. *
  7. * primary call from dirfile.cmd
  8. *
  9. * generates the LST: file for submit.com
  10. *
  11. *
  12. rest from dirmem
  13. *
  14. erase
  15. **
  16. @ 01,00 say "--->  GENERATE the DIRLST.SUB file "
  17. **
  18. *
  19. if llstflt
  20.    USE DIRFLT
  21. else
  22.    USE DIRALL
  23. endif
  24. *
  25. COPY TO DIRDIR
  26. USE DIRDIR
  27. *
  28. *---> attach lst parameter
  29. *
  30. do while .not. eof
  31.    stor trim(line) + trim(llparm) to lline
  32.    replace line with lline
  33.    skip
  34. enddo
  35. *
  36. *--->  insert formfeed after each LST: filename
  37. *
  38. ****
  39.    goto bottom
  40.    *
  41.    @ 05,10 say "Bott RCD # " + str(#,5)
  42.    *
  43.    goto top
  44.    *
  45.    do while .not. eof
  46.       *
  47.       @ 07,10 say str(#,5) + " : " + line
  48.       *
  49.       skip
  50.       *
  51.       if .not. eof
  52.          *
  53.          * insert before the selected record
  54.          *
  55.          INSERT blank before
  56.          *
  57.          * now pointing to inserted record
  58.          *
  59.          @ 09,10 say str(#,5) + " : Insert FF"
  60.          *
  61.          * install the data into the inserted record
  62.          *
  63.          REPLACE line with "&lformfeed"
  64.          *
  65.          * skip past the inserted record
  66.          * point to the previously selected record
  67.          *
  68.          skip
  69.          *
  70.       endif
  71.       *
  72.    enddo
  73.    *
  74.    *
  75.    *--->  kicker formfeed
  76.    *
  77.    *
  78.    APPEND blank
  79.    REPLACE line with "&lformfeed"
  80.    @ 09,10 say str(#,5) + " : Insert FF kicker #1"
  81.    *
  82.    APPEND blank
  83.    REPLACE line with "&lformfeed"
  84.    @ 09,10 say str(#,5) + " : Insert FF kicker #2"
  85.    *
  86. ****
  87. *
  88. *--->  prefix the listing function and drive location
  89. *
  90. goto top
  91. *
  92. do while .not. eof
  93.    *
  94.    stor llstroot + ldrvsour + line to lline
  95.    REPLACE  line with lline
  96.    @ 11,10 say line
  97.    skip
  98.    *
  99. enddo
  100. *
  101. *--->  generate the LST: file for submit.com
  102. *
  103. COPY SDF to &LDRVSUB.DIRLST.SUB
  104. *
  105. SELECT PRIMARY
  106. USE
  107. *
  108. SELECT SECONDARY
  109. USE
  110. *
  111. DELETE FILE DIRDIR.DBF
  112. *
  113. *
  114. * * RETURN
  115. *
  116. * EOF (DIRLST.CMD)
  117.  
  118.