CDECK  ID>, KROPT.
      SUBROUTINE KROPT (IXOPT,MASK)

C-    Krack the option parameter into MOPTIO(34)
C.    started 13-jan-94

      COMMON /SLATE/ NDSLAT,NESLAT,NFSLAT,NGSLAT,NUSLAT(2),DUMMY(34)
      CHARACTER       SLLINE*512, SLERRM*256
      COMMON /SLATLN/ SLLINE, SLERRM
      CHARACTER      CQBLAN*128, CQEQS*128, CQCETA*32
      CHARACTER      CQAPO*1, CQBSL*1, CQTAB*1
      COMMON /QCHAR/ CQBLAN, CQEQS, CQCETA, CQAPO, CQBSL, CQTAB
      PARAMETER      (NEWLN=10, NCHNEWL=1)
      PARAMETER      (NSIZEQ=100000, NSIZELN=100000)
      PARAMETER      (NSIZETX=40*NSIZELN)
                     CHARACTER    TEXT(NSIZETX)*1
                     DIMENSION    LQ(NSIZEQ), IQ(NSIZEQ), MLIAD(NSIZELN)
                     EQUIVALENCE (LQ,IQ,LQGARB), (MLIAD(1),LQ(NSIZEQ))
                     EQUIVALENCE (TEXT(1), MLIAD(NSIZELN))
      COMMON //      IQUEST(100),LQGARB,LQHOLD,LQARRV,LQKEEP,LQPREP
     +,         LEXP,LLPAST,LQPAST, LQUSER(4), LHASM,LRPAM,LPAM, LQINCL
     +,         LACRAD,LARRV, LPCRA,LDCRAB, LEXD,LDECO, LCRP,LCRD, LSERV
     +, INCRAD, IFLGAR, JANSW, IFMODIF, IFALTN
     +, JDKNEX,JDKTYP, JSLZER,NSLORG,JSLORG
     +, MOPTIO(34), MOPUPD, NCLASH, IFLMERG,IFLDISP, NSLFRE,NTXFRE
     +, NVGAP(4), NVGARB(6), NVIMAT(4), NVUTY(4),  LASTWK
C--------------    End CDE              --------------------------------
      CHARACTER    LINE*80, COL(80)*1
      EQUIVALENCE (LINE,SLLINE), (COL,SLLINE)

      IAND (IZV,IZW) = AND (IZV, IZW)


      MOPTIO(34) = 0
      IF (IXOPT.EQ.0)              GO TO 37

      CALL NA_GET (IXOPT,LINE,1)
      NN = NDSLAT

      DO 24  JL=1,NN
      J = INDEX (CQCETA(1:32),COL(JL))
      IF (J.NE.0)  CALL SBIT1 (MOPTIO(34),J)
   24 CONTINUE

   37 MOPTIO(33) = IAND (MOPTIO(34),MASK)
      CALL UPKBYT (MOPTIO(33),1,MOPTIO(1),32,0)
      RETURN
      END
