anchor.diff:          CALL MEMMAN(KLCLSLR,NOCCLS,'ADDL  ',2,'CLSL_R')
           CALL BLKCLS(int_mb(KCIBT),NBLOCK,int_mb(KLBLKCLS),
        &              int_mb(KLSPSPCL),
  -     &              NOCCLS,int_mb(KLCLSL),NOCTPA,NOCTPB,WORK(KLCLSLR))
  +     &              NOCCLS,int_mb(KLCLSL),NOCTPA,NOCTPB,dbl_mb(KLCLSLR))
   *. Allocate space for additinal arrays used for class selection
           CALL MEMMAN(KLCLSC,NOCCLS,'ADDL  ',2,'CLSC  ')
           CALL MEMMAN(KLCLSE,NOCCLS,'ADDL  ',2,'CLSE  ')
  
positive.code: C    &           IOCCLS_ACT,IBLOCK,NBLK_PER_BATCH)  
          CALL CSDTVCMN(CB,HCB,WORK(KVEC3),
       &       1,0,ICSM,ICSPC,2,2,LU_CDET,LUC,NCOCCLS_ACT,
       &       WORK(KCIOCCLS_ACT),WORK(KCIBT),WORK(KCLBT))
         END IF
        END IF
  *
  C            RASSG3(CB,SB,LBATS,LEBATS,I1BATS,IBATS,LUC,LUHC,C,HC,ECORE)
        IF(ICISTR.GE.2) THEN
          CALL RASSG3(CB,HCB,NSBATCH,WORK(KSLBT),WORK(KSLEBT),
       &       WORK(KSI1BT),WORK(KSIBT),LLUC,LLUHC,XDUM,XDUM,ECORE,
       &       ITASK)
        ELSE
  *. ICISTR = 1, CB, HCB are the complete vectors
          IF(NOCSF.EQ.1) THEN
  *. CB and HCB on input are the complete vectors
            CALL RASSG3(WORK(KVEC1P),WORK(KVEC2P),NSBATCH,
       &         WORK(KSLBT),WORK(KSLEBT),
       &         WORK(KSI1BT),WORK(KSIBT),LLUC,LLUHC,CB,HCB,ECORE,
       &         ITASK)
  *. Input is in KCOMVEC1_SD, construct output in KCOMVEC2_SD
          ELSE
            CALL RASSG3(WORK(KVEC1P),WORK(KVEC2P),NSBATCH,
       &         WORK(KSLBT),WORK(KSLEBT),
       &         WORK(KSI1BT),WORK(KSIBT),LLUC,LLUHC,
       &         WORK(KCOMVEC1_SD),WORK(KCOMVEC2_SD),ECORE,
       &         ITASK)
          END IF ! CSF switch
  
negative.code:             IOUT = 6
  C              ANACSF(CIVEC,ICONF_OCC,NCONF_FOR_OPEN,IPROCS,THRES,MAXTRM,IOUT)
              IF(ICNFBAT.EQ.1) THEN
                CALL ANACSF(KPVEC1,int_mb(KICONF_OCC(ISM)),
       &                    NCONF_PER_OPEN(1,ISM),int_mb(KCFTP),
       &                    THRES,MAXTRM,IOUT)
              ELSE
  