/* REXX */
/* CLS2REXXed by FSOX001 on 15 Aug 2017 at 15:25:56  */
Signal On NoValue
Call On Error
Signal On Failure
Signal On Syntax
Parse source opsys . exec_name .
 
/*********************************************************************/
/* This CLIST is used for SRRAUDIT Security System Domain.           */
/*                                                                   */
/* 11/08/2005 JL.Nelson Added check for member.                      */
/* 11/08/2005 JL.NELSON Re-did data set checks with error panel.     */
/* 03/08/2006 C. STERN  Minor text change.                           */
/* 08/15/2017 CL.FENTON Converted script from CLIST to REXX.         */
/*                                                                   */
/*                                                                   */
/*********************************************************************/
pgmname = "SRR$BRWU 08/15/17"
pgm8 = substr(pgmname,1,8)
JOBINST  = "CACJ051D"               /* BATCH Install job for dialog  */
DATASUF  = "DATA"                   /* Data file suffix              */
DATAMBR  = "ALLUSERS"               /* Data file member              */
/***********************************************/
/* CONSLIST = CONLIST                          */
/* COMLIST = LIST                              */
/* TERMPRO = PROMPT                            */
/* TERMMSGS = MESSAGES                         */
/* TRACE TURNS ON MESSAGING                    */
/***********************************************/
 
Address ISPEXEC
"VGET (CONSLIST COMLIST SYMLIST TERMMSGS) ASIS"
 
If CONSLIST = "ON" | COMLIST = "ON" | SYMLIST = "ON" then,
  Trace r
 
syssymlist = symlist          /* CONTROL SYMLIST/NOSYMLIST */
sysconlist = conslist         /* CONTROL CONLIST/NOCONLIST */
syslist = comlist             /* CONTROL LIST/NOLIST       */
sysmsg = termmsgs             /* CONTROL MSG/NOMSG         */
sysprompt = "OFF"                /* CONTROL NOPROMPT          */
sysflush = "OFF"                /* CONTROL NOFLUSH           */
sysasis = "ON"                 /* CONTROL ASIS - CAPS OFF   */
"CONTROL ERRORS RETURN"
return_code = 0
"VGET (SRRUSER) ASIS"
dsnmbr = srruser"."datasuf"("datambr")"
return_code = 0
locate = sysdsn("'"dsnmbr"'")
If locate <> "OK" then do
  srrerr = "Member" datambr "is missing, batch job" jobinst,
    "must first be run to create the member."
  srrerc = return_code
  zerrlm = dsnmbr
  srrmsg1 = locate
  srrmsg2 = " "
  "DISPLAY PANEL(SRRPERR)"
  end
Else do
  return_code = 0
  "BROWSE DATASET('"dsnmbr"')"
  end
ERR_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
 
 
