/* REXX */
/* CLS2REXXed by FSOX001 on 11 Aug 2017 at 14:35:08  */
Signal On NoValue
Call On Error
Signal On Failure
Signal On Syntax
Parse source opsys . exec_name .
Address ISPEXEC
 
/*********************************************************************/
/* This is used by the SRRAUDIT which is part of opts                */
/*********************************************************************/
/* 11/03/2005 JL.NELSON Copied form SY$SRRAU                         */
/* 10/20/2005 JL.NELSON SVC4001I NOCATLG2 ERROR ON DATASETS          */
/* 10/21/2005 JL.NELSON Create member CAMELCKC for now               */
/* 10/27/2005 JL.NELSON Added program name to panel for diagnostics. */
/* 10/27/2005 JL.NELSON Changed option A to bypass edit panel.       */
/* 11/03/2005 JL.NELSON Deleted unused files.                        */
/* 11/02/2006 C.STERN   Created for V521.                            */
/* 06/06/2007 CL.Fenton Renamed SRR$V521 to SRR$MAIN                 */
/* 08/07/2007 CL.Fenton Added IAVM option                            */
/* 02/28/2009 CL.Fenton Added Vulnerability Questions                */
/* 10/26/2015 CL.Fenton Added cleanup of IAVM Dialog member and the  */
/*            removal of the IAVM selection process, STS-012220.     */
/* 08/11/2017 CL.FENTON Converted script from CLIST to REXX.         */
/*                                                                   */
/*                                                                   */
/*********************************************************************/
pgmname = "SRR$MAIN 08/11/17"
pgm8 = substr(pgmname,1,8)
"VGET (CONSLIST COMLIST SYMLIST TERMMSGS) ASIS"
If CONSLIST = "ON" | COMLIST = "ON" | SYMLIST = "ON" then,
  Trace r
"CONTROL ERRORS RETURN"
syssymlist = symlist           /* CONTROL SYMLIST/NOSYMLIST */
sysconlist = conslist          /* CONTROL CONLIST/NOCONLIST */
syslist = comlist              /* CONTROL LIST/NOLIST       */
sysmsg = termmsgs              /* CONTROL MSG/NOMSG         */
sysasis = "ON"                 /* CONTROL ASIS - caps off   */
CLEAN_UP:
return_code = 0
"VGET (SRRINST SRRUSER ACPNAME) ASIS"
DISPLAY:
Do until return_code > 0
  return_code = 0
  opt = " "
  zcmd = " "
  "DISPLAY PANEL(SRRPMAIN)"
  "VPUT (ZTRAIL) ASIS"
  If return_code = 8 then leave
  If return_code > 4 then do
    Say pgmname "DISPLAY RC =" return_code zerrmsg zerrsm
    leave
    end
/*srrmsg = "Please wait, locating information may take a few minutes."*/
  "CONTROL DISPLAY LOCK"
  "DISPLAY PANEL(SRRPMAIN)"
  srrmsg = ""
  Select
    When opt = "A" then,
      "SELECT CMD(SRR$AUGR)"
    When opt = "B" then,
      "SELECT CMD(SRR$PROC)"
    When opt = "C" then,
      "SELECT CMD(SRR$ADMN)"
    When opt = "D" then,
      "SELECT CMD(SRR$PROD)"
    When opt = "E" then,
      "SELECT CMD(SRR$PROD DATAMBR(VULQUES))"
    end
  end
END_EXIT:
Exit
 
 
NoValue:
Failure:
Syntax:
say pgmname 'REXX error' rc 'in line' sigl':' strip(ERRORTEXT(rc))
say SOURCELINE(sigl)
Exit
 
 
Error:
return_code = RC
return