c subroutine putmss(diskfile,mssfile) c c Write disk file diskfile to mss file mssfile. c If diskfile is still open (connected), it is closed here. c Assume retention period of 367 days, no write password, c transparent synchronous dispose, etc. (see mswrite man page) c character*(*) diskfile,mssfile character*80 msserr logical isopen,exists c lendisk = lenstr(diskfile) if (lendisk.le.0) then write(6,"('>>> putmss: bad diskfile=',a, + ' (mswrite not done)')") diskfile return endif lenmss = lenstr(mssfile) if (lenmss.le.0) then write(6,"('>>> putmss: bad mss path=',a, + ' (mswrite not done)')") mssfile return endif inquire(file=diskfile(1:lendisk),opened=isopen,exist=exists) if (.not.exists) then write(6,"('>>> putmss: could not find disk file ',a, + ' (file not sent to mss)')") diskfile(1:lendisk) return endif if (isopen) then inquire(file=diskfile,number=lu) close(lu) write(6,"('putmss: closed file ',a,' (unit ',i2,')')") + diskfile(1:lendisk),lu endif write(6,"('putmss: doing mswrite of disk file ',a, + ' to mass store ',a,'...')") diskfile(1:lendisk), + mssfile(1:lenmss) call mswrite(ier,diskfile,mssfile,' ',367,' ') if (ier.ne.0) then write(6,"('>>> putmss: error ',i4,' from mswrite of ', + 'disk file ',a,' to mss file ',a)") + ier,diskfile(1:lendisk),mssfile(1:lenmss) call mserror(msserr) write(6,"('msserror=',a)") msserr else write(6,"('putmss: wrote disk file ',a,' to mss file ',a)") + diskfile(1:lendisk),mssfile(1:lenmss) endif return end