



      SUBROUTINE PRP200 (IERR)
C




















C



















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFFOP, GOTFILE, GVFISF







      IF (DATLOG.GT.0) THEN
         IF (GVFFOP(DATLOG)) THEN
            IERR=0
            GOTO 998
         END IF
      END IF



      IERR=0



      IF (GVFISF(LOGNAM)) CALL GVSDEL (LOGNAM)
      IF (.NOT.GOTFILE(DATLOG,LOGNAM)) THEN
         CALL GVSTTE ('?M3793')
         IERR=1
         GOTO 999
      END IF



      CALL GVSTUM (DATLOG)
      CALL GVSTTU (DATLOG,'?M3788')
      DATOPE=.TRUE.



      CALL GVSTT6 ('?M4842')
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('PRP200')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP201 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       GVFLEN, IERR
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSSTX (LINE,TEXT)
      CALL GVSTTU (DATLOG,LINE)
      CALL GVSSTX (LINE2,'----------------------------------------')
      CALL GVSTTU (DATLOG,LINE2(1:MIN(40,GVFLEN(LINE))))



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP202 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSTTU (DATLOG,TEXT)
      CALL SHOSUU (DATLOG)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP203 (IAA,TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IAA, IERR
      LOGICAL       GVFFOP
      CHARACTER*(*) TEXT







      IF (GVFFOP(DAVBUG)) CALL DIF008A (DAVBUG,IAA,
     + 'Pre-fixing in USED10')



      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998    



      CALL DIF008A (DATLOG,IAA,TEXT)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP204 (IAA,TEXT)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IAA, IERR
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSTTU (DATLOG,TEXT)



      CALL SHOUAA (DATLOG,IAA)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP205 (IERR)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFISF, GVFFOP







      IF (.NOT.GVFISF(LOGNAM)) THEN
         CALL PRP200 (IERR)
         IF (IERR.NE.0) GOTO 999
         GOTO 998
      END IF



      IERR=0



      CALL GVSROF (DATLOG,IERR)
      IF (DATLOG.LE.0.OR.IERR.NE.0) GOTO 999



      OPEN (DATLOG,FILE=LOGNAM,ACCESS='APPEND',FORM='FORMATTED')
      IF (.NOT.GVFFOP(DATLOG)) THEN
         CALL GVSTTE ('?M3796')
         GOTO 999
      END IF
      GOTO 998



  999 CONTINUE
      IERR=1
      CALL GVSEIW ('PRP205')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP206 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFFOP
      CHARACTER*(*) TEXT







      IF (GVFFOP(DAVBUG)) CALL GVSTTU (DAVBUG,TEXT)



      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSTTU (DATLOG,TEXT)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP207 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSCTB (LINE,80)
      CALL GVSSTX (LINE,TEXT)



      CALL GVSTTU (DATLOG,'===========================================')
      CALL GVSTTU (DATLOG,'==                                       ==')
      CALL GVSTTU (DATLOG,'==  '//LINE(1:35)//'  ==')
      CALL GVSTTU (DATLOG,'==                                       ==')
      CALL GVSTTU (DATLOG,'===========================================')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP207A (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      CHARACTER*(*) TEXT

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








      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSCTB (LINE,80)
      CALL GVSSTX (LINE,TEXT)




         LOC1=DATESTR()
         LOC2=TIMESTR()




      CALL GVSTTU (DATLOG,'===========================================')
      CALL GVSTTU (DATLOG,'==                                       ==')
      CALL GVSTTU (DATLOG,'==  '//LINE(1:35)//'  ==')
      CALL GVSTTU (DATLOG,
     + '==  '//LOC1//' '//LOC2//'                  ==')
      CALL GVSTTU (DATLOG,'==                                       ==')
      CALL GVSTTU (DATLOG,'===========================================')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP208 (TEXT,INT)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR, INT
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSTUI (DATLOG,TEXT,INT)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP209 (IERR)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFIBN, GVFFOP







      IF (.NOT.GVFIBN(DATLOG,1,120)) THEN
         CALL GVSTTI ('?M4824',DATLOG)
         IERR=1
         GOTO 998
      END IF
      IF (.NOT.GVFFOP(DATLOG)) THEN
         CALL GVSTTE ('?M4823')
         IERR=1
         GOTO 998
      END IF



      IERR=0



      CALL GVSCLF (DATLOG)
      DATOPE=.FALSE.



      CALL GVSTT6 ('?M4843')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP210 (IERR)

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFFOP







      IERR=1

         GOTO 998




      IF (DATLOG.GT.0) THEN
         IF (GVFFOP(DATLOG)) THEN
            IERR=0
         END IF
      END IF      




  998    CONTINUE



      RETURN
      END   
      SUBROUTINE PRP211 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'GETMOL.INC'
      INCLUDE       'DATBAS.INC'
      INCLUDE       'ESPACE.INC'
      INTEGER       I, GVFLEN, IERR
      character*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998
      IF (ITT.LE.0) THEN

         GOTO 998
      END IF



      CALL GVSTUC (DATLOG,'READIN',TEXT,.TRUE.)



      CALL GVSTTU (DATLOG,'?M2275B')
      DO 10 I=1,ITT
         CALL GVSTUC (DATLOG,'?M2275',READIN(I)(1:65),.FALSE.)
         IF (GVFLEN(READN2(I)).GT.0) THEN

            CALL GVSTUC (DATLOG,'?M2275A',READN2(I)(1:65),.FALSE.)
         END IF
 10   CONTINUE



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP212 

















      IMPLICIT      NONE
      INCLUDE       'DATBAS.INC'
      INTEGER       IPNT, IERR
      LOGICAL       FOUND, GVFFOP
      CHARACTER*80  LINE







      FOUND=.TRUE.
      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998
      IF (.NOT.GVFFOP(13)) THEN
         CALL GVSTTE ('?M4946')
         GOTO 998
      END IF



      CALL GVSTTU (DATLOG,'?M4801')
      IPNT=0
      FOUND=.FALSE.



   10 CONTINUE
         IPNT=IPNT+1
         READ (13,REC=IPNT,ERR=998) LINE
         CALL GVSTTU (DATLOG,LINE)
         FOUND=.TRUE.
      GOTO 10



  998 CONTINUE
      IF (.NOT.FOUND) THEN
         PRINT*,'IN PRP212'
         CALL GVSTT6 ('?M4800')
      END IF


      RETURN
      END   
      SUBROUTINE PRP213 (IAT,TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IAT, IERR
      LOGICAL       GVFFOP
      CHARACTER*(*) TEXT







      IF (GVFFOP(DAVBUG)) CALL DIF015E (DAVBUG,IAT,TEXT)



      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998    



      CALL DIF015E (DATLOG,IAT,TEXT)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP214

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSLUN (DATLOG)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE PRP215

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL WIF301U (DATLOG)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE PRP216 (IAT,JAT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR, IAT, JAT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998
      IF (.NOT.ISATOK(IAT)) GOTO 998
      IF (.NOT.ISATOK(JAT)) GOTO 998



      CALL DIF016 (DATLOG,IAT,JAT)



  998 CONTINUE


      RETURN
      END
      SUBROUTINE PRP217 (TEXT1,TEXT2)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR, GVFLEN
      CHARACTER*(*) TEXT1, TEXT2







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998      



      IF (GVFLEN(TEXT1).GE.1) THEN
         IF (GVFLEN(TEXT2).GE.1) THEN
            CALL GVSTUC (DATLOG,TEXT1,TEXT2,.TRUE.)
         ELSE
            CALL GVSTTU (DATLOG,TEXT1)
         END IF
      ELSE
         IF (GVFLEN(TEXT2).GE.1) THEN
            CALL GVSTTU (DATLOG,TEXT2)
         ELSE
            CALL GVSNLU (DATLOG,1)
         END IF
      END IF



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP218 (TEXT)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      CHARACTER*(*) TEXT







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998            



      CALL SHOWTEXTU (DATLOG,TEXT)



  998 CONTINUE


      RETURN
      END   

      SUBROUTINE PRP_TUM

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR







      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998      



      CALL GVSTUM (DATLOG)



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP222 (TEXT,CHAR4)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IAA, IERR
      LOGICAL       CH4EQCH4
      CHARACTER*4   CHAR4
      CHARACTER*(*) TEXT







      IF (CHAR4.NE.'KILL') GOTO 998
      IF (NUMAAT.LE.0) GOTO 998
      CALL PRP210 (IERR)
      IF (IERR.NE.0) GOTO 998



      CALL GVSTTU (DATLOG,TEXT)
      DO 10 IAA=1,NUMAAT
         IF (CH4EQCH4(CHAR4,ONESA3(IAA))) CALL SHOUAA (DATLOG,IAA)
         IF (CH4EQCH4(CHAR4,ONESA3(IAA))) CALL SHOIAA (IAA)
 10   CONTINUE



  998 CONTINUE


      RETURN
      END
      SUBROUTINE PRP_SHOLOG

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      INTEGER       IERR
      LOGICAL       GVFFOP, GVFISF







      IF (DATLOG.NE.0) THEN
         IF (GVFFOP(DATLOG)) CALL GVSCLF (DATLOG)
      END IF



      IF (GVFISF(LOGNAM)) THEN
         CALL GVSEDT (LOGNAM,LINE)
      ELSE
         CALL GVSTTE ('?M5148')
         GOTO 998
      END IF



      IF (DATLOG.EQ.0) THEN
         CALL GVSROF (DATLOG,IERR)
         IF (DATLOG.LE.0.OR.IERR.NE.0) GOTO 999
      END IF
      CALL GVSOPF (LOGNAM,DATLOG,'APP')
      CALL GVSNLU (DATLOG,1)
      CALL GVSTTU (DATLOG,'?M5149')
      CALL GVSNLU (DATLOG,1)
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('PRP_SHOLOG')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE PRP_DELLOG

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'DATBAS.INC'
      LOGICAL       GVFFOP, GVFISF







      IF (DATLOG.NE.0) THEN
         IF (GVFFOP(DATLOG)) CALL GVSCLF (DATLOG)
      END IF



      IF (GVFISF(LOGNAM)) CALL GVSDEL (LOGNAM)





      RETURN
      END   
