






























































      SUBROUTINE GVS700 (LINE,WORK)

















      IMPLICIT      NONE
      INTEGER       LENWORK, GVLENIN, GVFLEN
      CHARACTER*(*) LINE, WORK










      LENWORK=LEN(WORK)
      GVLENIN=GVFLEN(LINE)
      IF (GVLENIN+10.GT.LENWORK) THEN
         CALL GVSTTE ('?M2766')
         GOTO 998
      END IF



      CALL GVSSTX (WORK,'chmod 700 ')
      CALL GVSSTX (WORK(11:LENWORK),LINE(1:GVLENIN))



      CALL GVSSPL (WORK)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE GVS755 (LINE,WORK)

















      IMPLICIT      NONE
      INTEGER       LENWORK, GVLENIN, GVFLEN
      CHARACTER*(*) LINE, WORK










      LENWORK=LEN(WORK)
      GVLENIN=GVFLEN(LINE)
      IF (GVLENIN+10.GT.LENWORK) THEN
         CALL GVSTTE ('?M2766')
         GOTO 998
      END IF



      CALL GVSSTX (WORK,'chmod 755 ')
      CALL GVSSTX (WORK(11:LENWORK),LINE(1:GVLENIN))



      CALL GVSSPL (WORK)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE GVS777 (LINE,WORK)

















      IMPLICIT      NONE
      INTEGER       LENWORK, GVLENIN, GVFLEN
      CHARACTER*(*) LINE, WORK










      LENWORK=LEN(WORK)
      GVLENIN=GVFLEN(LINE)
      IF (GVLENIN+10.GT.LENWORK) THEN
         CALL GVSTTE ('?M2766')
         GOTO 998
      END IF



      CALL GVSSTX (WORK,'chmod 777 ')
      CALL GVSSTX (WORK(11:LENWORK),LINE(1:GVLENIN))



      CALL GVSSPL (WORK)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE GVSCLP

















      IMPLICIT      NONE






         CALL GVSNL6 (15)







      RETURN
      END
      SUBROUTINE GVSCOP (FILE,WORK)

















      IMPLICIT      NONE
      CHARACTER*(*) FILE
      CHARACTER*(*) WORK
      INTEGER       GVFLEN, GVFPOS, LENWRK, I, LENFILE
      LOGICAL       GVFISF







      LENWRK=LEN(WORK)
      CALL GVSCTB (WORK,LEN(WORK))



      IF (GVFPOS(FILE,'*').EQ.0) THEN
         IF (.NOT.GVFISF(FILE)) THEN
            CALL GVSTTE ('?OSTSNF')
            CALL GVSTT6 (FILE)
         CALL GVSKIL
            GOTO 998
         END IF
      END IF
      LENFILE=GVFLEN(FILE)
      IF (LENFILE.GT.LENWRK-9) THEN
         CALL GVSEIW ('GVSCOP')
         CALL GVSTTE ('?OSTFTL')
         CALL GVSTT6 (FILE)
         CALL GVSTTI ('?OSTLFW',LENWRK)
         GOTO 998
      END IF




         WRITE (WORK,1000,ERR=999) (FILE(I:I),I=1,MIN(LENFILE,70))
 1000    FORMAT ('cp ',70A1)
         WORK(LENWRK:LENWRK)='.'
         CALL GVSRDB (WORK)
         CALL GVSSPL (WORK)






      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSCOP')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSCPP (FILE1,FILE2,BIGLIN)

















      IMPLICIT      NONE
      INTEGER       LEN1, LEN2, GVFLEN

      LOGICAL       GVFISF
      CHARACTER*(*) FILE1, FILE2
      CHARACTER*(*) BIGLIN







      CALL GVSCTB (BIGLIN,LEN(BIGLIN))



      IF (.NOT.GVFISF(FILE2)) THEN
         CALL GVSTTE ('?OSTSNF')
         CALL GVSTT6 (FILE2)
         CALL GVSKIL
         GOTO 998
      END IF
      LEN2=GVFLEN(FILE2)
      LEN1=GVFLEN(FILE1)



      IF (LEN1+LEN2.GT.120) THEN
         CALL GVSTTE ('?OSTB09')
         GOTO 998
      END IF



      CALL GVSSTX (BIGLIN(1:2),'cp')
      CALL GVSSTX (BIGLIN(10:132),FILE2(1:LEN2))
      CALL GVSRDB (BIGLIN)
      CALL GVSSTX (BIGLIN(73:132),FILE1(1:LEN1))
      CALL GVSRDB (BIGLIN)
      CALL GVSSPL (BIGLIN)







  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSDEL (LINEIN)

















      IMPLICIT      NONE
      INTEGER       GVFPOS, GVFLEN, LENFIL, IOS, IUNIT
      LOGICAL       GVFISF, ISOPEN
      CHARACTER*(*) LINEIN
      CHARACTER*20  FMTL
      CHARACTER*132 LINE, INFILE







      IF (GVFLEN(LINEIN).EQ.0) THEN
         CALL GVSTTB ('?OSTB01')
         GOTO 998
      END IF
      CALL GVSSTX (INFILE,LINEIN)
      IF (GVFPOS(INFILE,'*').EQ.0) THEN
         IF (.NOT.GVFISF(INFILE)) THEN
            GOTO 998
         END IF
      END IF



      IF (GVFPOS(INFILE,'*').EQ.0) THEN
         INQUIRE (FILE=INFILE,OPENED=ISOPEN,NUMBER=IUNIT,
     +    IOSTAT=IOS,ERR=999)
         IF (ISOPEN) THEN
            CALL GVSTT6 ('?OSTDOF')
            CALL GVSTTI ('File is open at unit=',IUNIT)
            CALL GVSTT6 (INFILE)
            CALL GVSKIL
            GOTO 998
         END IF
      END IF




         CALL GVSFMTL (FMTL,'?FMT1182')

         LENFIL=LEN(INFILE)
         WRITE (LINE,FMTL,ERR=999) INFILE(1:MIN(LENFIL,120))
         CALL GVSRDB (LINE)
         CALL GVSSPL (LINE)

      GOTO 998



 999  CONTINUE
      CALL GVSTTB ('?R00279')
      CALL GVSTT6 (LINE)



  998 CONTINUE

 
      RETURN
      END
      SUBROUTINE GVSPWD (PWD,IERR)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       IERR, IUNIT, GVFLEN
      LOGICAL       GRTFILE
      CHARACTER*(*) PWD







      IERR=0
      IUNIT=0
      CALL GVSCTB (PWD,LEN(PWD))







         CALL SYSTEM ('pwd > pwd.pwd')
         IF (.NOT.GRTFILE(IUNIT,'pwd.pwd')) THEN
            IERR=1
            GOTO 999
         END IF
         CALL GVSCTB (LINE,80)
         CALL GETLINE (IUNIT,LINE,IERR)
         IF (GVFLEN(LINE).LT.1) GOTO 999
         CALL GVSSTX (PWD,LINE(1:MIN(80,LEN(PWD))))
         CALL GVSCLF (IUNIT)
         IUNIT=0
         CALL GVSDEL ('pwd.pwd')

      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSPWD')



  998 CONTINUE
      IF (IUNIT.NE.0) CALL GVSCLF (IUNIT)


      RETURN
      END   
      SUBROUTINE GVSDIR (FILE)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      CHARACTER*(*) FILE
      CHARACTER*80  WORK
      INTEGER       GVFLEN, LENFIL, LENWRK







      LENFIL=GVFLEN(FILE)
      LENWRK=LEN(WORK)
      IF (LENFIL.GT.LENWRK-9) THEN
         CALL GVSTTE ('?OSTB09')
         CALL GVSTT6 (FILE)
         GOTO 998
      END IF







         CALL GVSFMT ('?FMT1183')
         CALL GVSCTB (WORK,80)
         WRITE (WORK,FMT,ERR=999) FILE(1:LENFIL)



         CALL GVSSPL (WORK)

      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSDIR')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSEDT (FILE,LOCLIN)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       GVFLEN, LENTXT, I
      CHARACTER*(*) FILE
      CHARACTER*(*) LOCLIN







      LENTXT=GVFLEN(FILE)
      IF (LENTXT.LE.0) THEN
         CALL GVSTTB ('?OSTB02')
         GOTO 998
      END IF



      CALL GVSFMT ('?FMT175')
      CALL GVSCTB (LOCLIN,LEN(LOCLIN))



      WRITE (LOCLIN,FMT,ERR=999) FILNMS(67)(1:20),
     + (FILE(I:I),I=1,MIN(59,LENTXT))



      CALL GVSRDB (LOCLIN)
      CALL GVSSPL (LOCLIN)
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSEDT')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSZIP (FILE,LOCLIN)


















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       GVFLEN, LENTXT
      CHARACTER*(*) FILE
      CHARACTER*80  LOCLIN







      LENTXT=GVFLEN(FILE)
      IF (LENTXT.LE.0) THEN
         CALL GVSTTB ('?OSTB02')
         GOTO 998
      END IF



      CALL GVSCTB (LOCLIN,80)



      CALL GVSSTX (LOCLIN(1:20),FILNMS(67)(1:20))
      IF (FILE(1:2).EQ.'!$') THEN
         CALL GVSSTX (LOCLIN(21:80),FILNMS(74)(1:60))
      ELSE
         CALL GVSSTX (LOCLIN(21:80),FILE(1:MIN(60,LENTXT)))
      END IF



      CALL GVSRDB (LOCLIN)
      CALL GVSSPL (LOCLIN)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSGPH (FILE)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       GVFLEN, LENTXT, I
      CHARACTER*(*) FILE
      CHARACTER*80  LOCLIN







      LENTXT=GVFLEN(FILE)
      IF (LENTXT.LE.0) THEN
         CALL GVSTTB ('?OSTB03')
         GOTO 998
      END IF
      CALL GVSFMT ('?FMT175')
      CALL GVSCTB (LOCLIN,80)
      WRITE (LOCLIN,FMT,ERR=999) FILNMS(71)(1:20),
     + (FILE(I:I),I=1,MIN(59,LENTXT))



      CALL GVSRDB (LOCLIN)
      CALL GVSTT6 (LOCLIN)
      CALL GVSSPL (LOCLIN)
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSGPH')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSEXE (FILE,WORK)

















      IMPLICIT      NONE
      CHARACTER*(*) FILE
      CHARACTER*(*) WORK
      INTEGER       GVFLEN, LENFIL, LENWRK










      LENFIL=GVFLEN(FILE)
      LENWRK=LEN(WORK)
      IF (LENFIL.GT.LENWRK-6) THEN
         CALL GVSEIW ('GVSEXE')
         CALL GVSTTB ('?OSTFTL')
         CALL GVSTT6 (FILE)
         CALL GVSTTI ('?OSTLFW',LENWRK)
         GOTO 998
      END IF







         IF (FILE(1:1).EQ.'/') THEN
            CALL GVSSTX (WORK,FILE)
         ELSE
            WORK(1:2)='./'
            CALL GVSSTX (WORK(3:),FILE)
         END IF




         CALL GVSSPL (WORK)




  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSLOC

















      IMPLICIT      NONE







      CALL GVSTT6 ('?M4127')



      CALL SYSTEM ('pwd')





      RETURN
      END   
      SUBROUTINE GVSMKD (DIRNAM,LINEL)

















      IMPLICIT      NONE
      INCLUDE 'BIGINC.INC'
      INTEGER       LENDIR, LENWRK, GVFLEN
      LOGICAL       GVFISF
      CHARACTER*(*) DIRNAM, LINEL







      LENDIR=GVFLEN(DIRNAM)
      LENWRK=LEN(LINEL)










         IF (GVFISF(DIRNAM)) THEN
            CALL GVSCTB (LINEL,LEN(LINE))
            CALL GVSSTX (LINEL,'chmod 777 ')
            CALL GVSSTX (LINEL(21:LENWRK),DIRNAM(1:GVFLEN(DIRNAM)))
            CALL GVSRDB (LINEL)
            CALL GVSSPL (LINEL)
            CALL GVSCTB (LINEL,LEN(LINEL))
            CALL GVSSTX (LINEL,'rm -R ')
            CALL GVSSTX (LINEL(21:LENWRK),DIRNAM(1:GVFLEN(DIRNAM)))
            CALL GVSRDB (LINEL)
            CALL GVSSPL (LINEL)
         END IF



         CALL GVSCTB (LINEL,LEN(LINEL))
         CALL GVSSTX (LINEL,'mkdir')
         CALL GVSSTX (LINEL(21:LENWRK),DIRNAM(1:GVFLEN(DIRNAM)))
         CALL GVSRDB (LINEL)
         CALL GVSSPL (LINEL)
         CALL GVSCTB (LINEL,LEN(LINEL))
         CALL GVSSTX (LINEL,'chmod 777')
         CALL GVSSTX (LINEL(21:LENWRK),DIRNAM(1:GVFLEN(DIRNAM)))
         CALL GVSRDB (LINEL)
         CALL GVSSPL (LINEL)






      RETURN
      END   
      SUBROUTINE GVSMV (FILNIN,FILOIN,WORK)

















      IMPLICIT      NONE
      INTEGER       LENNEW, LENOLD, LENWRK, GVFLEN

      CHARACTER*(*) FILNIN, FILOIN, WORK
      CHARACTER*80  FILNEW, FILOLD
      LOGICAL       GVFISF







      CALL GVSSTX (FILNEW,FILNIN)
      CALL GVSSTX (FILOLD,FILOIN)
      LENNEW=GVFLEN(FILNEW)
      LENOLD=GVFLEN(FILOLD)
      LENWRK=LEN(WORK)
      IF (LENNEW.LE.0.OR.LENOLD.LE.0) THEN
         CALL GVSTTE ('?OSTB05')
         GOTO 998
      END IF
      IF (LENOLD+LENNEW.GT.LENWRK-8) THEN
         CALL GVSEIW ('GVSMV')
         CALL GVSTTE ('?OSTFTL')
         CALL GVSTT6 (FILOLD)
         CALL GVSTT6 (FILNEW)
         CALL GVSTTI ('?OSTLFW',LENWRK)
         GOTO 998
      END IF
      IF (.NOT.GVFISF(FILOIN)) THEN
         CALL GVST6C ('?FILNOF',FILOIN,.TRUE.)
         CALL GVSKIL
      END IF



      CALL GVSSTX (WORK,'?M3634')
      WORK(LENWRK-LENOLD+1:LENWRK)=FILOLD(1:LENOLD)
      CALL GVSRDB (WORK)
      WORK(LENWRK-LENNEW+1:LENWRK)=FILNEW(1:LENNEW)
      CALL GVSRDB (WORK)



      CALL GVSSPL (WORK)







  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSCP (FILNIN,FILOIN,WORK)

















      IMPLICIT      NONE
      INTEGER       LENNEW, LENOLD, LENWRK, GVFLEN
      CHARACTER*(*) FILNIN, FILOIN, WORK
      CHARACTER*80  FILNEW, FILOLD
      LOGICAL       GVFISF







      CALL GVSSTX (FILNEW,FILNIN)
      CALL GVSSTX (FILOLD,FILOIN)
      LENNEW=GVFLEN(FILNEW)
      LENOLD=GVFLEN(FILOLD)
      LENWRK=LEN(WORK)
      IF (LENNEW.LE.0.OR.LENOLD.LE.0) THEN
         CALL GVSTTE ('?OSTB05')
         GOTO 998
      END IF
      IF (LENOLD+LENNEW.GT.LENWRK-8) THEN
         CALL GVSEIW ('GVSCP')
         CALL GVSTTE ('?OSTFTL')
         CALL GVSTT6 (FILOLD)
         CALL GVSTT6 (FILNEW)
         CALL GVSTTI ('?OSTLFW',LENWRK)
         GOTO 998
      END IF
      IF (.NOT.GVFISF(FILOIN)) THEN
         CALL GVST6C ('?FILNOF',FILOIN,.TRUE.)
         CALL GVSKIL
      END IF



      CALL GVSSTX (WORK,'?M3634A')
      WORK(LENWRK-LENOLD+1:LENWRK)=FILOLD(1:LENOLD)
      CALL GVSRDB (WORK)
      WORK(LENWRK-LENNEW+1:LENWRK)=FILNEW(1:LENNEW)
      CALL GVSRDB (WORK)




      CALL GVSSPL (WORK)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSPAU (INSEC)

















      IMPLICIT      NONE
      INCLUDE       'IRIGRA.INC'
      INTEGER       INSEC, ISEC, I
      REAL          TIME_RUN, TIMESTART, IRISEC, TIME_NOW







      ISEC=INSEC





      CALL WIFPUSHPPP (161,1)



      IF (ISEC.LT.1) THEN
         CALL GVSTTE ('?OSTB06')
         ISEC=1
      ELSE IF (ISEC.GT.300) THEN
         CALL GVSTTE ('?OSTB07')
         ISEC=300
      END IF



      TIME_NOW=0.0
      TIME_RUN=FLOAT(ISEC)
      TIMESTART=IRISEC(0)
   10 CONTINUE
      DO 20 I=1,5




               CALL BESOCIAL


   20 CONTINUE
      TIME_NOW=IRISEC(0)
      IF (TIME_NOW - TIMESTART .LT. TIME_RUN) GOTO 10
      CALL WIFPOPPPP (161)





      RETURN
      END
      SUBROUTINE GVSPAUN (INSEC)

















      IMPLICIT      NONE
      INTEGER       INSEC, ISEC, I
      REAL          TIME_RUN, TIMESTART, IRISEC, TIME_NOW







      ISEC=INSEC



      IF (ISEC.LT.1) THEN
         CALL GVSTTE ('?OSTB06')
         ISEC=1
      ELSE IF (ISEC.GT.300) THEN
         CALL GVSTTE ('?OSTB07')
         ISEC=300
      END IF



      TIME_NOW=0.0
      TIME_RUN=FLOAT(ISEC)
      TIMESTART=IRISEC(0)
   10 CONTINUE
      DO 20 I=1,5
         CALL IRI000
         CALL IRI000
   20 CONTINUE
      TIME_NOW=IRISEC(0)
      IF (TIME_NOW - TIMESTART .LT. TIME_RUN) GOTO 10





      RETURN
      END
      SUBROUTINE GVSPAUS (INSEC,LOWSCAL,HGHSCAL,XIN,YIN,ZIN,
     + XOUT,YOUT,ZOUT)

















      IMPLICIT      NONE
      INCLUDE       'IRIGRA.INC'
      INTEGER       INSEC, I, ISTEP
      REAL          TIME_RUN, TIMESTART, IRISEC, TIME_NOW, FACTOR, 
     +              LOWSCAL, HGHSCAL, XIN, YIN, ZIN, XOUT, YOUT, 
     +              ZOUT, TFACTX, TFACTY, TFACTZ







      TIME_RUN=FLOAT(INSEC)
      TIMESTART=IRISEC(0)



      CALL WIFPUSHPPP (161,1)
      SCVAL=LOWSCAL
      DO 10 I=1,20
         CALL IRI000
   10 CONTINUE



      TIME_NOW=IRISEC(0)
      IF (TIME_NOW-TIMESTART.GT.TIME_RUN) GOTO 998
      FACTOR=TIME_RUN/(TIME_NOW-TIMESTART)
      FACTOR=MAX(FACTOR,1.0)
      ISTEP=NINT(20.0*FACTOR)
      FACTOR=(HGHSCAL-LOWSCAL)/FLOAT(ISTEP)
      TFACTX=(XOUT-XIN)/FLOAT(ISTEP)
      TFACTY=(YOUT-YIN)/FLOAT(ISTEP)
      TFACTZ=(ZOUT-ZIN)/FLOAT(ISTEP)



      DO 20 I=1,ISTEP
         SCVAL=LOWSCAL+FLOAT(I)*FACTOR
         TX=0.0
         TY=0.0
         TZ=0.0
         CENTRX=XIN+FLOAT(I)*TFACTX
         CENTRY=YIN+FLOAT(I)*TFACTY
         CENTRZ=ZIN+FLOAT(I)*TFACTZ
         CALL IRI000
   20 CONTINUE



 998  CONTINUE
      CALL WIFPOPPPP (161)
      CALL IRI000
      CALL IRI000





      RETURN
      END
      SUBROUTINE GVSPRT (FILE,COLOUR)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       LENFIL, GVFLEN
      LOGICAL       COLOUR, GVFISF
      CHARACTER*(*) FILE
      CHARACTER*80  LOCLIN







      IF (GVFLEN(FILE).LE.0) THEN
         CALL GVSTTE ('?OSTB11')
         GOTO 998
      END IF
      IF (.NOT.GVFISF(FILE)) THEN
         CALL GVSTTE ('?OSTB12')
         CALL GVSTT6 (FILE)
         GOTO 998
      END IF



      LENFIL=GVFLEN(FILE)
      CALL GVSCTB (LOCLIN,80)



      IF (COLOUR) THEN
         CALL GVSSTX (LOCLIN,FILNMS(65))
      ELSE
         CALL GVSSTX (LOCLIN,FILNMS(68))
      END IF
      CALL GVSSTX (LOCLIN(21:80),FILE(1:MIN(60,LENFIL)))
      CALL GVSSPL (LOCLIN)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSSPL (TEXT)









      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      CHARACTER*(*) TEXT
      CHARACTER*10000 LOCLIN
      INTEGER       GVFLEN








      IF (GVFLEN(TEXT).GT.2558) THEN
         CALL GVSTTE ('?OSTB09')
         CALL GVSTT6 (TEXT)
         GOTO 998
      END IF
      CALL GVSSTX (LOCLIN,TEXT)
      CALL GVSSHL (LOCLIN)



      IF (GVFLEN(LOCLIN).LT.1) THEN
         CALL GVSTTE ('?OSTB08')
         GOTO 998
      END IF







         IF (LOCLIN(1:1).EQ.'$') LOCLIN(1:1)=' '
         CALL GVSSHL (LOCLIN)







         CALL SYSTEMX (LOCLIN)

      IF (WIFPAR(1131).NE.0) CALL GVSPAU (5)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSTIM

















      IMPLICIT      NONE

         CHARACTER*10 DATESTR
         CHARACTER*8  TIMESTR
         CHARACTER*10 LOC1,LOC2
         CHARACTER*80 LOCLIN









         LOC1=DATESTR()
         LOC2=TIMESTR()
         CALL GVSCCCB (LOCLIN,LOC1,LOC2)
         CALL GVSTT6 (LOCLIN)






      RETURN
      END
      CHARACTER*10 FUNCTION DATESTR()



















      IMPLICIT      NONE





         CHARACTER*11  LOCAL
         INTEGER       LEN
         CALL CDATESTR (LOCAL,LEN)

         IF (LEN.NE.10) CALL GVSTTE ('?R00278')
         DATESTR=LOCAL(1:10)









      RETURN
      END
      CHARACTER*8 FUNCTION TIMESTR()



















      IMPLICIT      NONE






         CHARACTER*9   LOCAL
         INTEGER       LEN
         CALL CTIMESTR (LOCAL,LEN)
         IF (LEN.NE.8) CALL GVSTTE ('?R00277')
         TIMESTR=LOCAL(1:8)








      RETURN
      END
      SUBROUTINE GVSTOU (TEXT)

















      IMPLICIT      NONE
      LOGICAL       GVFISF
      CHARACTER*80  TOUCH
      CHARACTER*(*) TEXT







      IF (GVFISF(TEXT)) CALL GVSTT6 ('?M4816')



      CALL GVSCTB (TOUCH,80)
      CALL GVSSTX (TOUCH(1:5),'touch')
      CALL GVSSTX (TOUCH(7:80),TEXT)



      CALL GVSSPL (TOUCH)





      RETURN
      END   
      SUBROUTINE GVSTUM (NUMUNT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      LOGICAL       GVFFOP
      INTEGER       NUMUNT, GVFLEN





         CHARACTER*10 DATESTR
         CHARACTER*8  TIMESTR
         CHARACTER*10 LOC1,LOC2
         CHARACTER*80 LOCLIN




      IF (.NOT.GVFFOP(NUMUNT)) THEN
         CALL GVSTTE ('?ERTWTN')
         GOTO 998
      END IF




         LOC1=DATESTR()
         LOC2=TIMESTR()
         CALL GVSCCCB (LOCLIN,LOC1,LOC2)
         CALL GVSFMT ('?FMT1184')
         WRITE (NUMUNT,FMT,ERR=999) LOCLIN(1:GVFLEN(LOCLIN))

      GOTO 998



  999 CONTINUE
      CALL GVSTTB ('?ERTWTS')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSTUMC (NUMUNT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      LOGICAL       GVFFOP
      INTEGER       NUMUNT, GVFLEN





         CHARACTER*10 DATESTR
         CHARACTER*8  TIMESTR
         CHARACTER*10 LOC1,LOC2
         CHARACTER*80 LOCLIN




      IF (.NOT.GVFFOP(NUMUNT)) THEN
         CALL GVSTTE ('?ERTWTN')
         GOTO 998
      END IF




         LOC1=DATESTR()
         LOC2=TIMESTR()
         CALL GVSCCCB (LOCLIN,LOC1,LOC2)
         CALL GVSFMT ('?FMT1184A')
         WRITE (NUMUNT,FMT,ERR=999) LOCLIN(1:GVFLEN(LOCLIN))

      GOTO 998



  999 CONTINUE
      CALL GVSTTB ('?ERTWTS')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSPAS (TEXT)

















      IMPLICIT      NONE
      INTEGER       GVFLEN
      CHARACTER*(*) TEXT







      IF (GVFLEN(TEXT).LE.0) THEN
         CALL GVSSTX (TEXT,'ERROR')
         CALL GVSTTE ('?M4217')
         GOTO 998
      END IF










  998 CONTINUE


      RETURN
      END   
      SUBROUTINE GVSVMS

















      IMPLICIT      NONE
      INCLUDE       'IRIGRA.INC'
      LOGICAL       WASIR6








         INCLUDE    'BIGINC.INC'
         WASIR6=IRSTAT(6).EQ.1
         IF (WASIR6) CALL GRTKON
         CALL GVSSPL (FILNMS(69))
         IF (WASIR6) CALL GRTKOF






      RETURN
      END
      SUBROUTINE GVSTMP (FILTMP,FILNAM)




















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       GETPID
      LOGICAL       GVFISF
      CHARACTER*(*) FILTMP, FILNAM
      CHARACTER*(MAXPATH) LOCPATH, LOCLIN
      CHARACTER*20  PID




      IF (WIFPAR(1451).EQ.0) THEN



         CALL GVSSTX(FILTMP,FILNAM)
      ELSE



         CALL GVSSTX(LOCPATH,FILDIR(31))
         IF (.NOT.GVFISF(LOCPATH)) THEN
            CALL GVSMKD(LOCPATH,LOCLIN)
         ENDIF



         CALL GVSFMT ('?FMT016')
         WRITE (PID,FMT,ERR=999) ABS(GETPID())
         CALL GVSSHL (PID)
         CALL GVSCC4 (FILTMP,LOCPATH,FILNAM,'_',PID)
      END IF   
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('GVSTMP')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE GVSDLT (FILE)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      CHARACTER*(*) FILE
      CHARACTER*(MAXPATH) LOCPATH




      CALL GVSTMP (LOCPATH,FILE)
      CALL GVSDEL (LOCPATH)





      RETURN
      END
