home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / postroad.zip / mrkclosd.cmd < prev    next >
OS/2 REXX Batch file  |  1997-10-23  |  2KB  |  45 lines

  1. /*         To mark the specified note as never having been opened         */
  2. /*                          Parameters: note_file                         */
  3. /*    InnoVal Systems Solutions, Inc., and the authors cannot be held     */
  4. /*   responsible for damage that might occur while using this program.    */
  5. /*                         Use at your own risk.                          */
  6. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  7. signal on syntax name NoRexx
  8. call SysLoadFuncs
  9. signal on syntax name Syntax
  10. '@ECHO OFF'
  11. parse arg filename
  12. if pos('?',filename)>0 | filename='-h' | filename='-H' | ,
  13.    filename='/h' | filename='/H' | filename='' then do
  14.    say
  15.    say 'This program marks the specified note file as "never opened".'
  16.    exit
  17. end
  18. say
  19. call sysgetea filename,"POPNOTEBUFFER",variable
  20. if variable="VARIABLE" | variable='' then do
  21.    say "File" filename "does not exist or has no PopNoteBuffer EA."
  22.    exit
  23. end
  24. parse var variable one '09'x two '09'x three '09'x four '09'x five '09'x six '09'x seven '09'x attributes '09'x nine
  25. parse var attributes ten 2 opened 3 eleven
  26. if opened=' ' then do
  27.    say "The specified note had never been opened."
  28.    exit
  29. end
  30. attributes=ten||' '||eleven
  31. variable=one||'09'x||two||'09'x||three||'09'x||four||'09'x||five||'09'x||six||'09'x||seven||'09'x||attributes||'09'x||nine
  32. call sysputea filename,"POPNOTEBUFFER",variable
  33. say 'Note file' filename 'marked as "never opened".'
  34. exit
  35. Syntax:
  36.   say 'Error' rc 'in line' sigl':' errortext(rc)
  37.   say sigl':' sourceline(sigl)
  38.   exit
  39. return
  40. NoRexx:
  41.    say 'Unable to load the REXXUtil functions.  Either the REXXUTIL.DLL file'
  42.    say 'is not on the LIBPATH or REXX support is not installed on this system.'
  43.    exit
  44. return
  45.