
      SUBROUTINE gpf2xs(infile, phafil, rspfil, nspec, qclobber, status)

      CHARACTER*(*) infile, phafil, rspfil

      INTEGER nspec, status

      LOGICAL qclobber

c Subroutine to get the parameters for FLX2XSP.
c Arguments :
c     infile     c*(*)      r: ASCII input file
c     phafil     c*(*)      r: Output spectrum file
c     rspfil     c*(*)      r: Output response file
c     nspec      i          r: Number of spectra in input file
c     qclobber   l          r: If true overwrite output files
c     status     i          r: Status  : 0 = OK


      CHARACTER*72 contxt

      CALL uclgst('infile', infile, status)
      contxt = ' Cannot get the infile parameter'
      IF ( status .NE. 0 ) GOTO 999

      CALL uclgst('phafil', phafil, status)
      contxt = ' Cannot get the phafil parameter'
      IF ( status .NE. 0 ) GOTO 999

      CALL uclgst('rspfil', rspfil, status)
      contxt = ' Cannot get the rspfil parameter'
      IF ( status .NE. 0 ) GOTO 999

      CALL uclgsi('nspec', nspec, status)
      contxt = ' Cannot get the nspec parameter'
      IF ( status .NE. 0 ) GOTO 999

      CALL uclgsb('clobber', qclobber, status)
      contxt = ' Cannot get the clobber parameter'
      IF ( status .NE. 0 ) GOTO 999

 999  CONTINUE
      IF ( status .NE. 0 ) THEN
         CALL fcecho(contxt)
         CALL fcerrm(status)
      ENDIF

      RETURN
      END
