/* REXX */
/*trace r?*/
/*Signal On NoValue*/
Call On Error
Signal On Failure
Signal On Syntax
Parse source opsys . exec_name .
Address ISREDIT
 
"MACRO"                /* CACM000E EDIT TABLE(CACT0008) */
/*                                       */
/* AUTHOR: Charles Fenton                */
/*                                       */
/*********************************************************************/
/* This Edit macro to add additional resources to CACT0008, copied   */
/* from CACM000B.  Used for details for CICS resources.              */
/*********************************************************************/
/* Change summary:                                                   */
/* 03/22/2019 CL Fenton Created to process ZCICS0021 resources,      */
/*            STS-021044.                                            */
/* 02/19/2020 CL Fenton Chgd AUTINSTMODEL access requirements for    */
/*            CICS, STS-023883.                                      */
/* 02/19/2020 CL Fenton Deleted access requirements entry for        */
/*            resource PARTITIONSET for CICS, STS-023884.            */
/* 03/27/2020 CL Fenton Chgd DFHSIT process to correct SYSIN         */
/*            content issues and corrected looping error from        */
/*            processing TSS CICS Acids and Master Facility for      */
/*            CICS, STS-024361.                                      */
/* 08/05/2020 CL Fenton Chgs made with processing DFHSIT module.     */
/*            Corrected error caused with multiple datasets/members  */
/*            being specified in SYSIN DD statement.                 */
/* 01/27/2021 CL Fenton Chgs made to collect dddsns from CACC1000    */
/*            DD request, STS-025549.                                */
/* 02/28/2022 CL Fenton Chgs made to initialize cnt variable to      */
/*            correct issue of missing rec 1 entry, STS-027768.      */
/* 02/07/2025 CL Fenton Chgs made to evaluate dfhsit configration    */
/*            for ZCIC0030, SCTASKU0197901.                          */
/* 02/13/2025 CL Fenton Chgs to ZCIC0030 DFHSIT module to allow for  */
/*            different versions of the module, SCTASKU0197901.      */
/*                                                                   */
/*                                                                   */
/*                                                                   */
/*                                                                   */
/*********************************************************************/
pgmname = "CACM000E 02/13/25"
sysprompt = "OFF"                /* CONTROL NOPROMPT          */
sysflush = "OFF"                /* CONTROL NOFLUSH           */
sysasis = "ON"                 /* CONTROL ASIS - caps off   */
return_code = 0
maxcc = 0
max_rc = 0
Address ISPEXEC "CONTROL NONDISPL ENTER"
Address ISPEXEC "CONTROL ERRORS RETURN"
Numeric digits 10                           /* dflt of 9 not enough  */
sysname = MVSVAR('SYSNAME')
sysplex = MVSVAR('SYSPLEX')
jesnode = SYSVAR('SYSNODE')
/*******************************************/
/* VARIABLES ARE PASSED TO THIS MACRO      */
/* CONSLIST                                */
/* COMLIST                                 */
/* SYMLIST                                 */
/* TERMMSGS                                */
/*******************************************/
Address ISPEXEC "VGET (CONSLIST COMLIST SYMLIST TERMMSGS",
  "ACPNAME TYPERUN)"
If CONSLIST = "ON" | COMLIST = "ON" | SYMLIST = "ON" ,
  then Trace r
cnt = 0
"(MEMBER) = MEMBER"
TYPRUN=left(TYPERUN,8,"9")
interpret call TYPRUN
continue:
"RESET"
"END"
Exit 0                                       /* End CACC1001 - RC 0  */
 
 
/*********************************************************************/
/*  Start of sub-routines                                            */
/*********************************************************************/
CICS9999:
rectype = "1"
Call COLLECT_REC
recs_1 = recs
resource = "CSVLLA.#"
cnt = 0
do until resource = ""
  parse var resource res "#" resource
  res = strip(res)
  rc = 0
  "FIND FIRST '"res" ' 21"
  if rc = 0 then do
    "(data) = LINE .ZCSR"
    parse var data pdi 9 .
    recs = recs_1
    do until recs = ''
      parse var recs . 72 userid 80 tp 81 recs
      line = left(pdi,8) '3' left(userid,8) 'UPDATE'
      line = left(line,30)res
      "FIND FIRST '"line"' 1"
      if rc <> 0 then do
        "LINE_AFTER .ZCSR = DATALINE (LINE)"
        cnt = cnt + 1
        end
      end /* do until recs */
    end /* if rc = 0 */
  end /* do until resource */
say pgmname right(cnt,4) 'records written to' MEMBER 'for' pdi'.'
pdi = ""
Call OBTAIN_ASSET_INFO
cnt = 0
dfhsit_info. =
dfhsit_info.0 = 0
xtran_info. = 0
 
Address TSO "newstack"
Call Process_DFHSIT
/*do ct1 = 1 to dfhsit_info.0
  parse var dfhsit_info.ct1 stc sec secprfx xuser snscope dfltuser xtran,
    xcmd usr pt
  say pgmname "CICS STC:"stc "SEC:"sec "SECPRFX:"secprfx "XUSER:"xuser,
    "SNSCOPE:"snscope "DFLTUSER:"dfltuser "XTRAN:"xtran,
    "XCMD:"xcmd "USERID:"usr "PT:"pt
  end*/
 
rectype = "3"
Call COLLECT_REC
recs_3 = recs
prefix = ''
cicsacids =
cicsfacs =
cicsfac. =
cicsfac.0 = 0
cicsusr. =
cicsusr.0 = 0
allacids =
allfacs =
resclass =
 
if ACPNAME = "ACF2" |,
   ACPNAME = "TSS" then do
  if ACPNAME = "ACF2" then,
    resclass = 'XCMD'
  if ACPNAME = "TSS" then,
    resclass = 'SPI'
   end
else do until recs = ''
  parse var recs . 21 resclass 29 . 81 recs
  if ACPNAME = "RACF" then do
    resclass = 'C'substr(resclass,2,4)'CMD'
    end
  end /* do until recs */
 
If ACPNAME = "TSS" then do
  Call Process_TSS
/*do xx = 1 to cicsfac.0
    say "ACCESSORID="word(cicsfac.xx,1),
        "PROD/TEST ="word(cicsfac.xx,2),
        "MASTER FAC="word(cicsfac.xx,3),
        "FACMATRX="word(cicsfac.xx,4),
        "EXTSEC="word(cicsfac.xx,5),
        "XCMD="word(cicsfac.xx,6),
        "XTRAN="word(cicsfac.xx,7),
        "PCTEXTSEC="word(cicsfac.xx,8),
        "DEFACID="word(cicsfac.xx,9),
        "LOCKTIME="word(cicsfac.xx,10)
    end*/
  end
 
cnt = 0
recs = recs_1
do until recs = ''
  prefix = ''
  if recs = "" then leave
  parse var recs . .  mbr dsn usr 80 pt 81 recs
  usr = strip(usr)
  if length(usr) > 8 then do
    mbr = dsn
    parse var usr dsn usr
    end
/*say "1_MBR:"mbr "DSN:"dsn "USR:"usr "PT:"pt*/
/*  This is the ACF2 process to obtain information from the ACF2PARM DD
    statement dataset. */
  if sysdsn("'"dsn"("mbr")'") = "OK" &,
    acpname = "ACF2" then do
    call Obtain_dddsns
    if pos("//ACF2PARM",dddsns) > 0 then do
      parse var dddsns . "//ACF2PARM" dsnmbr "//"
      dsnmbr = strip(dsnmbr)
      say pgmname "Found DD ACF2PARM" dsnmbr"."
      call process_dsnmbr
      do x = 1 to out.0
        if out.x = "" then iterate
        if pos("CICSKEY",out.x) > 0 &,
           pos("OPTION=VALIDATE",out.x) > 0 &,
           pos("RESOURCE=XCMD",out.x) > 0 then do
          parse var out.x . "TYPE=" prefix "," .
          prefix = prefix" "
          end
        end
      end
    end
  if acpname = "RACF" then do ct1 = 1 to dfhsit_info.0
    parse var dfhsit_info.ct1 stc sec secprfx xuser snscope,
      dfltuser xtran xcmd usr pt
    if mbr = stc then do
/*    say "CICSSTC:"stc "SEC:"sec "SECPRFX:"secprfx "XUSER:"xuser,
        "SNSCOPE:"snscope "DFLTUSER:"dfltuser "XTRAN:"xtran,
        "XCMD:"xcmd "USERID:"usr "PT:"pt*/
      if xcmd = "YES" then xcmd = "CICSCMD"
      if secprfx = "YES" then secprfx = usr
      if sec = "YES" & secprfx <> "NO" then prefix = secprfx"."
      if sec = "YES" & xcmd <> "NO" then prefix = "C"xcmd"#"prefix
      leave
      end
    end
/*say "2_MBR:"mbr "DSN:"dsn "USR:"usr "PT:"pt
  say "PREFIX:"prefix "PREFIXS:"prefixs*/
  If pos(prefix" ",prefixs) = 0 &,
     prefix <> "" then do
    prefixs = prefixs""prefix" "
    Call Gen_Resources
    end
  end
say pgmname right(cnt,4) 'records written to' MEMBER 'for ZCIC0021.'
Return
 
 
Process_DFHSIT:
sitcnt = 1
say pgmname "Processing DFHSIT modules and SYSIN DD datasets of CICS regions."
rectype = "2"
call COLLECT_REC
recs_2 = recs
dsnmbrs =
do until recs = ''
  parse var recs . . stc mbr dsn . 81 recs
  dsnmbr = dsn'('mbr')'
  address tso "alloc fi(sysin) da('"dsnmbr"') shr reuse"
  address tso "execio * diskr sysin (finis stem out."
  say pgmname "Processing DFHSIT module entries from" dsnmbr"."
  sec     = "NO"
  secprfx = "NO"
  xuser   = "NO"
  snscope =
  do b = 1 to out.0
    If pos("*DFHSIT",out.b) > 0 then do
      cnt = pos("*DFHSIT",out.b)
      cicsver = substr(out.b,cnt+13,4)
      if cicsver > "0720" then cnt = cnt - 8
      sitsecfl = substr(out.b,cnt+276,1)
      if bitand(sitsecfl,"80"x) = "80"x then sec    = "YES"
      if bitand(sitsecfl,"40"x) = "40"x then secprfx = "YES"
      if bitand(sitsecfl,"04"x) = "04"x then xuser  = "YES"
      sitscope = substr(out.b,cnt+279,1)
      if sitscope = "01"x then snscope = "NONE"
      if sitscope = "02"x then snscope = "CICS"
      if sitscope = "03"x then snscope = "MVSIMAGE"
      if sitscope = "04"x then snscope = "SYSPLEX"
      sitxtran = substr(out.b,cnt+202,7)
      if sitxtran = "" then xtran = "NO"
      else,
        if sitxtran = "CICSTRN" then xtran = "YES"
        else xtran = sitxtran
      sitxcmd  = substr(out.b,cnt+258,7)
      if sitxcmd = "" then xcmd = "NO"
      else,
        if sitxcmd = "CICSCMD" then xcmd = "YES"
        else xcmd = sitxcmd
      sitsecpx = substr(out.b,cnt+292,8)
      if sitsecpx <> " " &,
         sitsecpx <> "*" then secprfx = sitsecpx
      sitdfusr = substr(out.b,cnt+280,8)
      dfltuser = sitdfusr
      leave b /* Added to bypass processing remainder of module */
      end
    end
  say pgmname "     CICSVER="cicsver
  say pgmname "     SEC="sec
  say pgmname "     SECPRFX="secprfx
  say pgmname "     XUSER="xuser
  say pgmname "     SNSCOPE="snscope
  say pgmname "     XTRAN="xtran
  say pgmname "     XCMD="xcmd
  say pgmname "     DFLTUSER="dfltuser
  recs1 = recs_1
  do until recs1 = ''
    prefix = ''
    if recs1 = "" then leave
    parse var recs1 . .  mbr dsn usr 80 pt 81 recs1
    usr = strip(usr)
    if length(usr) > 8 then do
      mbr = dsn
      parse var usr dsn usr
      end
    if sysdsn("'"dsn"("mbr")'") = "OK" &,
       mbr = stc then do
      call Obtain_dddsns
      if pos("//SYSIN",dddsns) > 0 then do
        parse var dddsns . "//SYSIN" dsnmbr "//"
        dsnmbr = strip(dsnmbr)
        say pgmname "Processing SYSIN DD" dsnmbr"."
        call process_dsnmbr
        do x = 1 to out.0
          if out.x = "" then iterate
          if pos("SEC=",out.x) > 0 then do
            parse var out.x . "SEC=" sec . ","
            end
          if pos("SECPRFX=",out.x) > 0 then do
            parse var out.x . "SECPRFX=" secprfx . ","
            end
          if pos("XUSER=",out.x) > 0 then do
            parse var out.x . "XUSER=" xuser . ","
            end
          if pos("SNSCOPE=",out.x) > 0 then do
            parse var out.x . "SNSCOPE=" snscope . ","
            end
          if pos("DFLTUSER=",out.x) > 0 then do
            parse var out.x . "DFLTUSER=" dfltuser . ","
            end
          if pos("XTRAN=",out.x) > 0 then do
            parse var out.x . "XTRAN=" xtran . ","
            end
          if pos("XCMD=",out.x) > 0 then do
            parse var out.x . "XCMD=" xcmd . ","
            end
          end
        say pgmname "     SEC="sec
        say pgmname "     SECPRFX="secprfx
        say pgmname "     XUSER="xuser
        say pgmname "     SNSCOPE="snscope
        say pgmname "     XTRAN="xtran
        say pgmname "     XCMD="xcmd
        say pgmname "     DFLTUSER="dfltuser
        say
        end
      leave
      end
    end
  dfhsit_info.sitcnt = stc sec secprfx xuser snscope dfltuser,
    xtran xcmd usr pt
  xtrans = xtran""secprfx
  xtran_info.xtrans = xtran_info.xtrans + 1
  dfhsit_info.0 = sitcnt
  sitcnt = sitcnt + 1
  end
say pgmname "Finished DFHSIT modules and SYSIN DD datasets of CICS regions."
call Process_dfhsit_info
Return
 
 
Process_TSS:
cnt = 1
cntf = 1
pcnt = 0
tcnt = 0
recs1 = recs_1
do until recs1 = ''
  if recs1 = "" then leave
  parse var recs1 . .  mbr dsn usr 80 pt 81 recs1
  usr = strip(usr)
  if wordpos(usr,allacids) = 0 then allacids = allacids usr
  allacids = strip(allacids,"B")
  If pt = " " then pt = "P" /* chg space to production */
  fac =
  tst1 = outtrap('out.')
  say pgmname "Processing CICS STC Acid" usr"."
  Address TSO "TSS LIST("usr")"
  fac = ""
  do xxx = 1 to out.0
    If pos("MASTER FAC =",out.xxx) > 0 then do
      parse var out.xxx . "MASTER FAC = " fac
      leave xxx
      end
    end
  If fac <> "" then do
    tst1 = outtrap('fout.')
    say pgmname "Processing MASTER FAC of" fac "for" usr"."
    Address TSO "TSS MODIFY(FACILITY("fac"))"
    fm =
    es =
    pctes =
    xc =
    xt =
    da =
    lt =
    do fxx = 1 to fout.0
      if pos(" FACMATRX=",fout.fxx) > 0 then ,
        parse var fout.fxx . "FACMATRX=" fm .
      if pos(" EXTSEC=",fout.fxx) > 0 then ,
        parse var fout.fxx . "EXTSEC=" es .
      if pos(" XCMD=",fout.fxx) > 0 then ,
        parse var fout.fxx . "XCMD=" xc .
      if pos(" XTRAN=",fout.fxx) > 0 then ,
        parse var fout.fxx . "XTRAN=" xt .
      if pos(" PCTEXTSEC=",fout.fxx) > 0 then ,
        parse var fout.fxx . "PCTEXTSEC=" pctes .
      if pos(" DEFACID=",fout.fxx) > 0 then ,
        parse var fout.fxx . "DEFACID=" da .
      if pos(" LOCKTIME=",fout.fxx) > 0 then ,
        parse var fout.fxx . "LOCKTIME=" lt .
      end
    cicsfac.cntf = usr pt fac fm es xc xt pctes da lt
    cicsfac.0 = cntf
    cntf = cntf + 1
    If fm = "YES" &,
       es = "YES" &,
       xc = "YES" then do
      If pt = "T" then do
        cicsfacs = cicsfacs fac
        cicsfacs = strip(cicsfacs,"B")
        tcnt = tcnt + 1
        if wordpos(usr,cicsacids) = 0 then cicsacids = cicsacids usr
        cicsacids = strip(cicsacids,"B")
        end
      Else pcnt = pcnt + 1
      allfacs = allfacs fac
      allfacs = strip(allfacs,"B")
      end
    end
  Else,
    say pgmname usr "does not specify MASTER FAC."
  cicsusr.cnt = usr pt fac
  cicsusr.0 = cnt
  cnt = cnt + 1
  end
 
If pcnt = 0 & ,
   tcnt > 0 then pt = "T"
Else pt = ""
 
cnt = 0
Call Gen_Resources
Return
 
 
Obtain_dddsns:
Address ISPEXEC "VGET (PROC)"
oproc = PROC
otermmsgs = TERMMSGS
oconlist  = CONLIST
oconslist = CONSLIST
osymlist  = SYMLIST
TERMMSGS = "OFF"
COMLIST  = "OFF"
CONSLIST = "OFF"
SYMLIST  = "OFF"
stcproc = dsn
proc = dsn
procvol = ""
Address ISPEXEC "VPUT (PROC STCPROC)"
Address ISPEXEC "VPUT (CONSLIST COMLIST SYMLIST TERMMSGS)"
x = outtrap("data.")
a = CACC1000('DDP JESPROC' mbr)
y = outtrap(off)
TERMMSGS = otermmsgs
CONLIST  = oconlist
CONSLIST = oconslist
SYMLIST  = osymlist
Address ISPEXEC "VPUT (CONSLIST COMLIST SYMLIST TERMMSGS)"
Address ISPEXEC "VGET (STCPROC PROC dddsns) asis"
PROC = oproc
Address ISPEXEC "vput (PROC)"
/*  say pgmname dddsns*/
Return
 
 
Gen_Resources:
if cnt = 0 then,
  queue 'ZCIC0021 1' left(resclass,8) left(resclass,8) left(resclass,8)
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'ASSOCIAT'
else,
  queue 'ZCIC0021 2          'prefix'ASSOCIATION'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'ATOMSERV'
else,
  queue 'ZCIC0021 2          'prefix'ATOMSERVICE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'AUTINSTM'
else,
  queue 'ZCIC0021 2          'prefix'AUTINSTMODEL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'AUTOINST'
else,
  queue 'ZCIC0021 2          'prefix'AUTOINSTALL'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'BEAN'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'BRFACILIT'
else,
  queue 'ZCIC0021 2          'prefix'BRFACILITY'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'BUNDLE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'CAPTURES'
else,
  queue 'ZCIC0021 2          'prefix'CAPTURESPEC'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'CFDTPOOL'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'CLASSCAC'
else,
  queue 'ZCIC0021 2          'prefix'CLASSCACHE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'CONNECTI'
else,
  queue 'ZCIC0021 2          'prefix'CONNECTION'
queue 'ZCIC0021 3 CICBAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'CORBASER'
else,
  queue 'ZCIC0021 2          'prefix'CORBASERVER'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'DB2CONN'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'DB2ENTRY'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'DB2TRAN'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'DELETESH'
else,
  queue 'ZCIC0021 2          'prefix'DELETESHIPPED'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'DISPATCH'
else,
  queue 'ZCIC0021 2          'prefix'DISPATCHER'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'DJAR'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'DOCTEMPL'
else,
  queue 'ZCIC0021 2          'prefix'DOCTEMPLATE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'DSNAME'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'DUMP'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'DUMPDS'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'ENQMODEL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'EVENTBIN'
else,
  queue 'ZCIC0021 2          'prefix'EVENTBINDING'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'EVENTPRO'
else,
  queue 'ZCIC0021 2          'prefix'EVENTPROCESS'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'EXCI'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'EXITPROG'
else,
  queue 'ZCIC0021 2          'prefix'EXITPROGRAM'
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'FEPIRESO'
else do
  queue 'ZCIC0021 2          'prefix'FECONNECTION'
  queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
  queue 'ZCIC0021 3 CICSAUDT UPDATE  '
  queue 'ZCIC0021 3 CICBAUDT UPDATE  '
  queue 'ZCIC0021 3 OPERAUDT UPDATE  '
  queue 'ZCIC0021 3 CICUAUDT UPDATE  '
  queue 'ZCIC0021 2          'prefix'FENODE'
  queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
  queue 'ZCIC0021 3 CICSAUDT UPDATE  '
  queue 'ZCIC0021 3 CICBAUDT UPDATE  '
  queue 'ZCIC0021 3 OPERAUDT UPDATE  '
  queue 'ZCIC0021 3 CICUAUDT UPDATE  '
  queue 'ZCIC0021 2          'prefix'FEPOOL'
  queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
  queue 'ZCIC0021 3 CICSAUDT UPDATE  '
  queue 'ZCIC0021 3 CICBAUDT UPDATE  '
  queue 'ZCIC0021 3 OPERAUDT UPDATE  '
  queue 'ZCIC0021 3 CICUAUDT UPDATE  '
  queue 'ZCIC0021 2          'prefix'FEPROPSET'
  queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
  queue 'ZCIC0021 3 CICSAUDT UPDATE  '
  queue 'ZCIC0021 3 CICBAUDT UPDATE  '
  queue 'ZCIC0021 3 OPERAUDT UPDATE  '
  queue 'ZCIC0021 3 CICUAUDT UPDATE  '
  queue 'ZCIC0021 2          'prefix'FETARGET'
  end
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICBAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'FILE'
queue 'ZCIC0021 3 *        READ    '
queue 'ZCIC0021 3 CICBAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
If pt = "T" then,
  queue 'ZCIC0021 3 APPDAUDT UPDATE  '
Else do
  If acpname = "TSS" &,
     pcnt > 0 & ,
     tcnt > 0 then do x = 1 to words(cicsfacs)
    queue 'ZCIC0021 2          'prefix'FILE#'word(cicsfacs,x)
    queue 'ZCIC0021 3 *        READ    '
    queue 'ZCIC0021 3 CICBAUDT UPDATE  '
    queue 'ZCIC0021 3 OPERAUDT UPDATE  '
    queue 'ZCIC0021 3 CICUAUDT UPDATE  '
    queue 'ZCIC0021 3 SYSCAUDT ALTER   '
    queue 'ZCIC0021 3 CICSAUDT ALTER   '
    queue 'ZCIC0021 3 APPDAUDT UPDATE  '
    end
  end
queue 'ZCIC0021 2          'prefix'HOST'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'IPCONN'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'IRC'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'JOURNALM'
else,
  queue 'ZCIC0021 2          'prefix'JOURNALMODEL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'JOURNALN'
else,
  queue 'ZCIC0021 2          'prefix'JOURNALNAME'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'JVM'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'JVMPOOL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'JVMPROFI'
else,
  queue 'ZCIC0021 2          'prefix'JVMPROFILE'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'JVMSERVER'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'LIBRARY'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'LSRPOOL'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'MAPSET'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'MODENAME'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'MONITOR'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'MQCONN'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'MQINI'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 2          'prefix'MVSTCB'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'TERMINAL'
else,
  queue 'ZCIC0021 2          'prefix'NETNAME'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICBAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'PARTITIO'
else,
  queue 'ZCIC0021 2          'prefix'PARTITIONSET'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'PARTNER'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'PIPELINE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'PROCESST'
else,
  queue 'ZCIC0021 2          'prefix'PROCESSTYPE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'PROFILE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'PROGRAM'
queue 'ZCIC0021 3 CICBAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if pt = "T" then,
  queue 'ZCIC0021 3 APPDAUDT UPDATE  '
Else do
  If acpname = "TSS" &,
     pcnt > 0 & ,
     tcnt > 0 then do x = 1 to words(cicsfacs)
    queue 'ZCIC0021 2          'prefix'PROGRAM#'word(cicsfacs,x)
    queue 'ZCIC0021 3 CICBAUDT READ    '
    queue 'ZCIC0021 3 CICDAUDT READ    '
    queue 'ZCIC0021 3 OPERAUDT UPDATE  '
    queue 'ZCIC0021 3 CICUAUDT UPDATE  '
    queue 'ZCIC0021 3 SYSCAUDT ALTER   '
    queue 'ZCIC0021 3 CICSAUDT ALTER   '
    queue 'ZCIC0021 3 APPDAUDT UPDATE  '
    end
  end
queue 'ZCIC0021 2          'prefix'REQID'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'REQUESTM'
else,
  queue 'ZCIC0021 2          'prefix'REQUESTMODEL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
/*if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'RESETTIME'
else,
  queue 'ZCIC0021 2          'prefix'RESETTIME'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '*/
queue 'ZCIC0021 2          'prefix'RRMS'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'SECURITY'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'SESSIONS'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'SHUTDOWN'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'STATISTI'
else,
  queue 'ZCIC0021 2          'prefix'STATISTICS'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'STORAGE'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'STREAMNA'
else,
  queue 'ZCIC0021 2          'prefix'STREAMNAME'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'SUBPOOL'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'SYSDUMPC'
else,
  queue 'ZCIC0021 2          'prefix'SYSDUMPCODE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT CONTROL '
queue 'ZCIC0021 3 CICSAUDT CONTROL '
queue 'ZCIC0021 2          'prefix'SYSTEM'
queue 'ZCIC0021 3 CICBAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TASK'
queue 'ZCIC0021 3 CICBAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TCLASS'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TCPIP'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'TCPIPSER'
else,
  queue 'ZCIC0021 2          'prefix'TCPIPSERVICE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'TDQUEUE'
queue 'ZCIC0021 3 OPERAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'TEMPSTOR'
else,
  queue 'ZCIC0021 2          'prefix'TEMPSTORAGE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TERMINAL'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 CICBAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'TRANDUMP'
else,
  queue 'ZCIC0021 2          'prefix'TRANDUMPCODE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'TRANSACT'
else,
  queue 'ZCIC0021 2          'prefix'TRANSACTION'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if pt = "T" then,
  queue 'ZCIC0021 3 APPDAUDT UPDATE  '
Else do
  If acpname = "TSS" &,
     pcnt > 0 & ,
     tcnt > 0 then do x = 1 to words(cicsfacs)
    queue 'ZCIC0021 2          'prefix'TRANSACT#'word(cicsfacs,x)
    queue 'ZCIC0021 3 CICDAUDT READ    '
    queue 'ZCIC0021 3 OPERAUDT UPDATE  '
    queue 'ZCIC0021 3 CICUAUDT UPDATE  '
    queue 'ZCIC0021 3 SYSCAUDT ALTER   '
    queue 'ZCIC0021 3 CICSAUDT ALTER   '
    queue 'ZCIC0021 3 APPDAUDT UPDATE  '
    end
  end
queue 'ZCIC0021 2          'prefix'TSMODEL'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'TSPOOL'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'TSQNAME'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TSQUEUE'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'TYPETERM'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'UOW'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'UOWDSNFA'
else,
  queue 'ZCIC0021 2          'prefix'UOWDSNFAIL'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'UOWENQ'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 2          'prefix'UOWLINK'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'URIMAP'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
queue 'ZCIC0021 2          'prefix'VOLUME'
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'VTAM'
queue 'ZCIC0021 3 CICDAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
queue 'ZCIC0021 3 OPERAUDT UPDATE  '
queue 'ZCIC0021 3 CICUAUDT UPDATE  '
queue 'ZCIC0021 2          'prefix'WEB'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'WEBSERVI'
else,
  queue 'ZCIC0021 2          'prefix'WEBSERVICE'
queue 'ZCIC0021 3 SYSCAUDT ALTER   '
queue 'ZCIC0021 3 CICSAUDT ALTER   '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'WORKREQU'
else,
  queue 'ZCIC0021 2          'prefix'WORKREQUEST'
queue 'ZCIC0021 3 SYSCAUDT READ    '
queue 'ZCIC0021 3 CICSAUDT READ    '
queue 'ZCIC0021 3 CICUAUDT READ    '
if ACPNAME = "TSS" then,
  queue 'ZCIC0021 2          'prefix'XMLTRANS'
else,
  queue 'ZCIC0021 2          'prefix'XMLTRANSFORM'
queue 'ZCIC0021 3 CICUAUDT READ    '
queue 'ZCIC0021 3 SYSCAUDT UPDATE  '
queue 'ZCIC0021 3 CICSAUDT UPDATE  '
 
/*say pgmname right(queued(),4) 'records written to' MEMBER 'for ZCIC0021.'*/
cnt = cnt + queued()
Call Write_queued
return
 
 
Write_queued:
Address ISREDIT
do queued()
  Parse pull line                            /* pull queued lines    */
  "LINE_AFTER .ZLAST = DATALINE (LINE)"
  end /* do a = 1 */
Return
 
 
COLLECT_REC:
arg test
Address ISPEXEC
"lminit dataid(dialog) ddname(dialog)"
lminit_dialog = RC
"lmopen dataid("dialog")"
lmopen_dialog = RC
"lmmfind dataid("dialog") member(products)"
lmmfind_dialog = RC
if test = '' then,
  TRUN = left(TYPERUN,8)
else,
  TRUN = left(test,8)
RC = 0
recs =
do until RC>0
  "lmget dataid("dialog") mode(invar) dataloc(data) datalen(lrecl)",
  "maxlen(80)"
  if RC = 0 & ,
     pos(TRUN' 'rectype,data) = 1 then do
    recs = recs""data
    end /* if RC = 0 & */
end /* until RC>0 */
"lmclose dataid("dialog")"
lmclose_dialog = RC
"lmfree dataid("dialog")"
lmfree_dialog = RC
return
 
 
process_dsnmbr:
arg comma
dsnmbrs =
do x = 1 to words(dsnmbr)
  dsnmbrs = dsnmbrs"'"word(dsnmbr,x)"' "
  end
dsnmbr = strip(dsnmbrs,"B")
/*do x = 1 to words(keywords)
 dval.x = "*"
 end*/
address tso "alloc fi(sysin) da("dsnmbr") shr reuse"
address tso "execio * diskr sysin (finis stem out."
if pdi <> "" then,
  say pgmname "Processing contents of" dsnmbr "for" pdi"."
c = 1
do a = 1 to out.0
  parse upper var out.a out.a "*" .
  if out.a = "" then iterate
  out.a = strip(out.a)
  if right(out.a,1) = "," then do
    b = a + 1
    out.b = strip(out.a)strip(out.b)
    out.a = ""
    end
  end
return
 
 
OBTAIN_ASSET_INFO:
DESC   = ""
CLASS  = ""
MAC    = ""
CONF   = ""
STATUS = ""
USE    = ""
BLDG   = ""
ROOM   = ""
SERNR  = ""
BARCD  = ""
MAKE   = ""
MODEL  = ""
MANUF  = ""
asset. = ""
cnt = 0
prefixs = ""
Address ISPEXEC
"lminit dataid(dialog) ddname(dialog)"
lminit_dialog = RC
"lmopen dataid("dialog")"
lmopen_dialog = RC
"lmmfind dataid("dialog") member(asset)"
lmmfind_dialog = RC
RC = 0
do until RC>0
  "lmget dataid("dialog") mode(invar) dataloc(data) datalen(lrecl)",
  "maxlen(80)"
  cnt = cnt + 1
  asset.cnt = data
  end /* until RC>0 */
"lmclose dataid("dialog")"
lmclose_dialog = RC
"lmfree dataid("dialog")"
lmfree_dialog = RC
asset.0 = cnt
do cnt = 1 to asset.0
  ac = strip(asset.cnt,"T")
  parse var ac ass_key 11 ass_data
  interpret ass_key "= '"ass_data"'"
  end
return
 
 
Process_dfhsit_info:
Address ISPEXEC "VGET (PDIDD) ASIS"
 
lminit_pdidd_rc = "N/A"
lmopen_pdidd_rc = "N/A"
lmclose_pdidd_rc = "N/A"
lmfree_pdidd_rc = "N/A"
 
return_code = 0
/*Address ISPEXEC "LMINIT DATAID(PDIDD) DDNAME("pdidd") ENQ(EXCLU)"*/
Address ISPEXEC "LMINIT DATAID(PDIDD) DDNAME("pdidd")"
lminit_pdidd_rc = return_code
If return_code <> 0 then do
  Say pgmname "LMINIT_PDIDD_RC =" return_code zerrsm
  signal PDI_ERR
  end
return_code = 0
Address ISPEXEC "LMOPEN DATAID("pdidd") OPTION(OUTPUT)"
lmopen_pdidd_rc = return_code
If return_code <> 0 then do
  Say pgmname "LMOPEN_PDIDD_RC =" return_code zerrsm
  signal PDI_ERR
  end
 
chk = " "
Do cnt = 1 to dfhsit_info.0
  parse var dfhsit_info.cnt stc sec secprfx xuser snscope,
    dfltuser xtran xcmd usr pt
 
  If sec = "NO" then,
    queue "          SEC="sec
 
  If dfltuser = " " then,
    queue "          DFLTUSER does not specify a user."
 
  If xuser = "NO" then,
    queue "          XUSER="xuser
 
  If snscope = "NONE" & pt <> "T" then,
    queue "          SNSCOPE="snscope
 
  If acpname = "RACF" then do
    xtrans = xtran""secprfx
    If xtran = "NO" then,
      queue "          XTRAN="xtran
    Else,
      If secprfx = "NO" then,
        queue "          SECPRFX="secprfx
      Else,
        If secprfx <> "YES" &,
         xtran_info.xtrans > 1 then,
        queue "          SECPRFX="secprfx
    end
 
  If queued() > 0 then,
    call Process_finding_details
  end
 
If chk <> "X" then do
  ac = "Not a Finding"
  Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
    "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
  end
 
return_code = 0
Address ISPEXEC "LMMADD DATAID("pdidd") MEMBER(ZCIC0030)"
If return_code = 4 then do
  return_code = 0
  Address ISPEXEC "LMMREP DATAID("pdidd") MEMBER(ZCIC0030)"
  end
 
return_code = 0
Address ISPEXEC "LMCLOSE DATAID("pdidd")"
lmclose_pdidd_rc = return_code
If return_code <> 0 then do
  Say pgmname "LMCLOSE_PDIDD_RC =" return_code zerrsm
  end
return_code = 0
Address ISPEXEC "LMFREE DATAID("pdidd")"
lmfree_pdidd_rc = return_code
If return_code <> 0 then do
  Say pgmname "LMFREE_PDIDD_RC =" return_code zerrsm
  end
 
 
PDI_ERR:
If termmsgs = "ON" then do
  Say "==============================================================="
  Say pgmname "LMINIT_PDIDD_RC                "lminit_pdidd_rc
  Say pgmname "LMOPEN_PDIDD_RC                "lmopen_pdidd_rc
  Say pgmname "LMCLOSE_PDIDD_RC               "lmclose_pdidd_rc
  Say pgmname "LMFREE_PDIDD_RC                "lmfree_pdidd_rc
  Say "==============================================================="
  End /* do - end */
 
return
 
 
Process_finding_details:
If chk = " " then do
  chk = "X"
  ac = "The following CICS system initialization parameters",
    "specify the improper value."
  Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
    "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
  ac = "     "
  Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
    "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
  end
 
ac = "     "stc
Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
  "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
 
do xx = 1 to queued()
  parse pull ac
  Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
    "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
  end
 
ac = "     "
Address ISPEXEC "LMPUT DATAID("pdidd") MODE(INVAR)",
  "DATALOC(AC) DATALEN("length(ac)") MEMBER(ZCIC0030)"
return
 
 
NoValue:
Failure:
Syntax:
say pgmname "REXX error" rc "in line" sigl":" strip(ERRORTEXT(rc))
say SOURCELINE(sigl)
return
 
 
Error:
return_code = RC
if RC >= 16 then do
  say pgmname "LASTCC =" RC strip(zerrlm)
  say pgmname "REXX error" rc "in line" sigl":" ERRORTEXT(rc)
  say SOURCELINE(sigl)
  end
if return_code > maxcc then
  maxcc = return_code
return
 
 
