rexxtest.cmd 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Test REXX UnZip API */
  2. call RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs'
  3. call UZLoadFuncs
  4. parse arg all
  5. say; say 'Demonstrating UZUnZip' UZUnZip(all,'TEST.')
  6. do num=1 to test.0
  7. say num':'test.num
  8. end
  9. /*** Demonstrate UZFileTree ***/
  10. fname = 'g:\cqc\channel1\12-30.qwk'
  11. say; say 'Demonstrating UZFileTree by displaying all entries in',
  12. fname
  13. exc.0 = 2
  14. exc.1 = '*.dat'
  15. exc.2 = '*.ndx'
  16. call UZFileTree fname, 'files','','exc'
  17. do num=1 to files.0
  18. say num':'files.num
  19. end
  20. say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT')
  21. test. = 0
  22. say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT','test.')
  23. SAY "Test =" test.0
  24. do num=1 to test.0
  25. say num':'test.num
  26. end
  27. test. = 0
  28. say; say 'Demonstrating UZUnZipToStem -' UZUnZipToStem('\SourceCode\cqc\cqcmain.zip','test',"*.rch",,'T')
  29. call recout "test"
  30. say; say 'Demonstrating UZVer -' UZVer()
  31. call UZDropFuncs
  32. exit
  33. recout: PROCEDURE EXPOSE test.
  34. parse arg this
  35. say this "Contains" value(this'.0') "entries"
  36. do num=1 to value(this'.0')
  37. tval = value(this'.'num)
  38. say "Got" this'.'num':' tval
  39. if Right(tval,1) = '/' then
  40. call recout this'.'left(tval,length(tval)-1)
  41. else
  42. say "Contains:" value(this'.tval')
  43. end
  44. return