C**                                                                 ***
C**-----------------------------------------------------------------***
C**                                                                 ***
C**** write the patran nodal result file :                          ***
C**   -----------------------------------                           ***
C**                                                                 ***
        IVEM(120)=LOUT
        IVEM(121)=CNTOUT*OUTFLG
        IVEM(127)=10+SET
        IVEM(128)=IVEM(32)
        IVEM(129)=IVEM(33)
        IF (IVEM(129).GT.3) THEN
          IVEM(130)=3
        ELSEIF (IVEM(129).GT.1) THEN
          IVEM(130)=2
        ELSE
          IVEM(130)=1
        ENDIF
        IF (MYPROC.EQ.1) THEN
	   IF (TCOUNT.LT.1) THEN
             NAME=FILE(SET)
           ELSE
	     K=INDEX(FILE(SET),' ')
	     WRITE(TEXT2,'(I3.3)') TCOUNT
	     NAME=FILE(SET)(:K-1)//'.'//TEXT2
           ENDIF
           OPEN(10+SET,FILE=NAME,STATUS='UNKNOWN',FORM='FORMATTED')
	ENDIF
        WRITE(TEXT2,3400) MAX(TCOUNT,0),T
3400    FORMAT(I4,'-th time step   T =',G14.6)
        CALL VEPA97(TITLE(SET),TEXT2,T,LUG,RBIG(UG),LIVEM,IVEM,
     &              LNEK,NEK,LRPARM,RPARM,LIPARM,IPARM,
     &              LDNOD,DNOD,LRDPRM,RDPARM,LIDPRM,
     &              IDPARM,LNODN,NODNUM,LNOD,NOD,LNOPRM,NOPARM,
     &              LBIG2,RBIG(RBIG2),IBIG(IBIG2))
        IF (IVEM(2).NE.0) GOTO 9999
        IF (MYPROC.EQ.1) THEN
	   CLOSE(10+SET)
	   WRITE(1,3030) TCOUNT,T,SET,IVEM(129),
     &                        TITLE(SET),NAME(:INDEX(NAME,' '))
        ENDIF
