home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / binaries / old / vms / vmsfix.com < prev   
Text File  |  1992-06-05  |  942b  |  33 lines

  1. $! vmsfix.com -- fix the blocksize of VMS BACKUP file
  2. $!
  3. $! This command file repairs a BACKUP file which has an incorrect block size.
  4. $! That happens, for example, if a BACKUP file is transferred via FTP.
  5. $!
  6. $! The defaults are correct for fixing the VMS Icon distribution.
  7. $!
  8. $! usage:    @VMSFIX [filename [blocksize]]
  9. $! default:  @VMSFIX VMS.BCK 8192
  10. $!
  11. $ FILE = "VMS.BCK"
  12. $ BLKG = "8192"
  13. $ PROC = f$environment("procedure")
  14. $!
  15. $ If "''p1'" .Nes. "" Then $ FILE = "''p1'"
  16. $ If "''p2'" .Nes. "" Then $ BLKG = "''p2'"
  17. $!
  18. $ Backup 'PROC' XXTEMPXX.BCK/Save_Set/Block_Size='BLKG'
  19. $ If f$extract(0,4,f$getsyi("version")) .Eqs. "V5.0" Then GoTo V50
  20. $!
  21. $!    (fix for VMS 4.7, 5.1, or newer)
  22. $!
  23. $ Copy/Overlay 'FILE' XXTEMPXX.BCK
  24. $ Rename XXTEMPXX.BCK 'FILE'
  25. $ Exit 1
  26. $!
  27. $!    (fix for VMS 5.0 only)
  28. $V50:
  29. $ Analyze/RMS/FDL/Output=XXTEMPXX.FDL XXTEMPXX.BCK
  30. $ Convert/FDL=XXTEMPXX.FDL 'FILE' 'FILE'
  31. $ Delete/NoConfirm/NoLog XXTEMPXX.*;*
  32. $ Exit 1
  33.