/* REXX */
/* CLS2REXXed by FSOX001 on 28 Aug 2017 at 15:51:56  */
Signal On NoValue
Call On Error
Signal On Failure
Signal On Syntax
Parse source opsys . exec_name .
Address ISREDIT
 
"MACRO"               /* SRRMPDI VIEW PDI(*) */
/*********************************************************************/
/* 04/22/2005 JL.Nelson Created for dialog - select only OPEN PDIs   */
/* 01/31/2008 CL.Fenton Added AUTOSAVE OFF NOPROMPT                  */
/* 10/02/2009 CL.Fenton Added AUTONUM OFF and set bounds in member.  */
/* 08/28/2017 CL.FENTON Converted script from CLIST to REXX.         */
/* 05/24/2018 CL.Fenton Chgs made to identify status of PDI mbrs,    */
/*            status reported are open (O) and not reviewed (NR),    */
/*            STS-019713.                                            */
/*                                                                   */
/*                                                                   */
/*********************************************************************/
pgmname = "SRRMPDI  05/24/18"
return_code = 0
maxcc = 0
Address ISPEXEC "CONTROL NONDISPL ENTER"
Address ISPEXEC "CONTROL ERRORS RETURN"
return_code = 0
/*******************************************/
/* VARIABLES ARE PASSED TO THIS MACRO      */
/* CONSLIST                                */
/* COMLIST                                 */
/* SYMLIST                                 */
/* TERMMSGS                                */
/*******************************************/
Address ISPEXEC "VGET (CONSLIST COMLIST SYMLIST TERMMSGS) ASIS"
cm24vget = return_code
If return_code <> 0 then do
  Say pgmname "VGET RC =" return_code zerrsm
  Say pgmname "CONSLIST/"conslist "COMLIST/"comlist,
    "SYMLIST/"symlist "TERMMSGS/"termmsgs
  end
return_code = 0
/*******************************************/
/* TURN ON MESSAGES                        */
/*******************************************/
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   */
/*******************************************/
/* MAIN PROCESS                            */
/*******************************************/
pdiinfo = ""
st = ""
call Check_Content
If return_code > 0 then do
  st = "O"
  "(PDIINFO) = LINE 1"
  return_code = 0
  "FIND 'Not Reviewed' 1 15"
  If return_code = 0 then do
    "(LN,COL) = CURSOR"
    st = "NR"
    If ln = 1 then,
      "(PDIINFO) = LINE 2"
    end
  end
/*******************************************/
/* END PROCESSES                           */
/*******************************************/
 
 
END_EDIT:
return_code = 0
 
 
ERR_EXIT:
If maxcc >= 16 | return_code > 0 then do
  Address ISPEXEC "VGET (ZISPFRC) SHARED"
  If maxcc > zispfrc then,
    zispfrc = maxcc
  Else,
    zispfrc = return_code
  Address ISPEXEC "VPUT (ZISPFRC) SHARED"
  end
Address ISPEXEC "VPUT (CM24VGET PDIINFO ST) ASIS"
"END"
Exit
 
 
Check_Content:
return_code = 0
"FIND 'Not a Finding' 1 15"
If return_code = 0 then,
  Return
return_code = 0
"FIND 'Not Applicable' 1 15"
If return_code = 0 then,
  Return
return_code = 0
"FIND 'Manual Review' 1 15"
Return
 
 
NoValue:
Failure:
Syntax:
say pgmname 'REXX error' rc 'in line' sigl':' strip(ERRORTEXT(rc))
say SOURCELINE(sigl)
Exit
 
 
Error:
return_code = RC
if return_code > maxcc then,
  maxcc = return_code
return
 
 
