home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / padhd21.zip / READHELP.CMD < prev    next >
OS/2 REXX Batch file  |  1996-08-31  |  1KB  |  47 lines

  1. /*  readhelp.cmd                                                              *
  2.  *   Execute this file to read the NFNF help file - nfnfv11.hlp  * 
  3.  *   nfnfv11.hlp must be in the same directory as this file.      */
  4.  
  5. infchar = '01'x
  6. hlpchar = '10'x
  7.  
  8. call RXFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  9. call SysLoadFuncs
  10.  
  11. filename = strip(padhd.hlp)
  12.  
  13. fullname = stream(filename, 'c', 'query exists')
  14. if fullname = '' then
  15.   do
  16.   say 'File : ' || filename || ' could not be located!'
  17.   SAY 'READHLP.CMD must be in the same directory as PADHD.HLP to work correctly!'
  18.   SAY ''
  19.   SAY 'Press any key .....'
  20.   charIn()
  21.   return
  22.   end
  23.  
  24. result = stream(fullname, 'c', 'open write')
  25. if left(result, 5) <> 'READY' then
  26.   do
  27.   say 'Error (' || result || ') opening file : ' || fullname || '!'
  28.   SAY ''
  29.   SAY 'Press any key .....'
  30.   charIn()
  31.   return
  32.   end
  33.  
  34. left = charout(fullname, infchar, 4)
  35. clsd = stream(fullname, 'c', close)
  36.  
  37. 'VIEW.EXE ' || fullname
  38.  
  39. do until left(result, 3) <> 'NOT'
  40.   call SysSleep 1
  41.   result = stream(fullname, 'c', 'open write')
  42. end
  43.  
  44. fpos = charout(fullname, hlpchar, 4) 
  45. clsd = stream(fullname, 'c', 'close') 
  46. return
  47.