home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rpvcs.zip / UNLOCK.REX < prev    next >
OS/2 REXX Batch file  |  1993-01-14  |  778b  |  34 lines

  1. /* Unlock.rex - PVCS logfile Unlock 
  2.  
  3.   Customizations necessary:
  4.   1. Change pvcsUnlock alias to point to the VCS executable.
  5.  
  6. */
  7.  
  8. /* -------------------------- Alias list ----------------------------*/
  9.  
  10. pvcsUnlock = 'e:\pvcs\vcs -u -Xeerr -Xooutput'
  11.  
  12. /* ---------------------------- Begin ------------------------------ */
  13.  
  14. 's_prompt "Logfile to Unlock?", logfile'
  15.  
  16. cmd = pvcsUnlock logfile
  17. cmd
  18.  
  19. /* Scan for the last line of the ERR file. */
  20. do while(lines(err))
  21.   lastline = linein(err)
  22. end
  23.  
  24. /* Parse this last line. */
  25. parse upper var lastline w1 w2 w3 w4 w5 wr
  26.  
  27. /* Depending on field 5 of the line, yields the result of the unlock. */
  28. if (w5 = 'NO') then
  29.   's_msg "Already unlocked",,,resp'
  30. else
  31.   's_msg "Unlocked",,,resp'
  32. exit
  33.  
  34. /* fini */