       identification division.
      *--------------------------------------------------------------*
      * Micro Focus CICS Option.                              *
      * This is a sample user exit which emulates the QUERY SECURITY *
      * application programming interface.                           *
      * It must be compiled with the 'non-mainframe' dialect.        *
      * No CICS calls are allowed.                                   *
      *--------------------------------------------------------------*
       program-id. dfhuesm.
       data division.
       working-storage section.
       linkage section.
       copy 'dfhcbesm.cpy'.
       procedure division using esm-input-parms
                                esm-output-parms
                                .
      *** Add your code here ***
           perform set-values
           exit program
           .
       set-values section.
           move 0                      to esm-eibresp
           move 0                      to esm-eibresp2
           move low-values             to esm-eibrcode
           if esm-RESTYPE-exists-88
               evaluate true
               when esm-file-88       
               when esm-journalname-88
               when esm-journalnum-88 
               when esm-program-88    
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when esm-db2entry-88   
               when esm-psb-88        
                   set esm-notctrlable-88 
                                       to true
                   set esm-readable-88 to true
                   set esm-notupdatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               when esm-spcommand-88  
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when esm-transaction-88
                   set esm-notctrlable-88
                                       to true
                   set esm-readable-88 to true
                   set esm-notupdatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               when esm-transattach-88
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when esm-tdqueue-88    
               when esm-tsqueue-88    
                   set esm-notctrlable-88
                                       to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               end-evaluate
           else
               evaluate esm-resclass
               when 'ACICSPCT'
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when 'CCICSCMD'
               when 'OPERCMDS'
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when 'DCICSDCT'
               when 'SCICSTST'
                   set esm-notctrlable-88
                                       to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               when 'FCICSFCT'
               when 'JCICSJCT'
               when 'MCICSPPT'
                   set esm-ctrlable-88 to true
                   set esm-readable-88 to true
                   set esm-updatable-88
                                       to true
                   set esm-alterable-88
                                       to true
               when 'PCICSPSB'
                   set esm-notctrlable-88 
                                       to true
                   set esm-readable-88 to true
                   set esm-notupdatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               when 'TCICSTRN'
                   set esm-notctrlable-88
                                       to true
                   set esm-readable-88 to true
                   set esm-notupdatable-88
                                       to true
                   set esm-notalterable-88
                                       to true
               end-evaluate
           end-if
           exit
           .
