C
C SUBROUTINE 'STASAV'
C ===================
C
C Open file in which to store vectors 
C
      SUBROUTINE STASAV (IUN, FILNAM)
C
C PARAMETERS
C
C         IUN (I)  Logical unit number for the file
C      FILNAM (I)  Name of file in which to save vectors
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      CHARACTER*(*) FILNAM
      COMMON /PLTSV1/ KUN,ISAV,NB
      CHARACTER*80 SAVBUF
      COMMON /PLTSV2/ SAVBUF
      SAVE /PLTSV1/,/PLTSV2/
      EXTERNAL PLTSV
C
C CODE
C ----
C
      KUN = IUN
      IFAIL=1
      CALL CCPDPN (-KUN,FILNAM,'NEW','U',LDUM,IFAIL)
      IF (IFAIL.EQ.-1) THEN
         ISAV=0
         RETURN
      ENDIF
      ISAV=1
      NB=0
      RETURN
      END
