/* REXX | | Name: SYSPLEX | | V1.R3 - July, 1999 - general clean-up & add logger info brg | V1.R2 - Nov, 1998 - added STR placement check routine brg | V1.R1 - April, 1997 - added interactive IXCMAIPU feature brg | V1.R0 - March, 1997 - initial Console command processor brg | | Purpose: Driving EXEC for the SYSPLEX ISPF application | Application: Sysplex/Parallel Sysplex Display Command Processor | | Author: Bruce R. Gillispie - email: gillispi@texasrock.com | | Disclaimer: | You may use the "Sysplex" utility AT YOUR OWN RISK, it is provided for | your enjoyment and neither the Author or his Employer provides any | warranty for its use. | */ /* trace ?r */ /* --------------------------------------------------------------- */ /* DSN is used by LIBDEFs to define where this exec will run from. */ /* --------------------------------------------------------------- */ DSN = "'SYSBRG.PLEXINFO'" /* ------------------------------------ */ /* assign panel names to variables */ /* ------------------------------------ */ sysplexg = 'SYSPLEXG'; /* general sysplex information */ sysplexl = 'SYSPLEXL'; /* general logger information */ sysplexw = 'SYSPLEXW'; /* provide user entertainment */ call add_libdefs /* add libdefs - did you update DSN(?) */ call plex_information /* invoke routine - Enlightenment */ call del_libdefs /* del libdefs - clean up this mess... */ exit 00 /*/\/\_oo_/\/\ /\/\_oo_/\/\ /\/\_oo_/\/\ /\/\_oo_/\/\ /\/\_oo_/\/\*/ plex_information: /* Display User Selection */ drop sw /* unassigns variables */ address ISPEXEC "DISPLAY PANEL("SYSPLEXG")" if rc <> 0 then do call del_libdefs; exit 01 end address ISPEXEC "VGET (UserIn) PROFILE" select when UserIn = '1' then do sw='1'; UserIn='D ETR,DATA'; end when UserIn = '2' then do sw='1'; UserIn='D CF'; /* note: physical CF required */ end when UserIn = '3' then do sw='1'; UserIn='D XCF,SYSPLEX,ALL'; end when UserIn = '4' then do sw='1'; UserIn='D XCF,COUPLE'; end when UserIn = '5' then do sw='1'; UserIn='D XCF,POLICY'; end when UserIn = '6' then do sw='1'; UserIn='RO *ALL,D XCF,PI,DEV=ALL'; end when UserIn = '7' then do sw='1'; UserIn='RO *ALL,D XCF,PO,DEV=ALL'; end when UserIn = '8' then do sw='1'; UserIn='RO *ALL,D XCF,PI,STRNAME=IXC*'; end when UserIn = '9' then do sw='1'; UserIn='RO *ALL,D XCF,PO,STRNAME=IXC*'; end when UserIn = '10' then do sw='1'; UserIn='D XCF,STR'; end when UserIn = '11' then do sw='1'; UserIn='D XCF,STR,STRNAME=*'; end when UserIn = '12' then do sw='1'; UserIn='D XCF,CF,CFNAME=*'; end when UserIn = '13' then do sw='1'; UserIn='D XCF,CLASSDEF,CLASS=ALL'; end when UserIn = '14' then do sw='1'; UserIn='D WLM,SYSTEMS'; end when UserIn = '15' then do sw='1'; UserIn='D XCF,GROUP'; end when UserIn = '16' then do sw='2'; UserIn = 'List LogStream (SYSLOG)'; CNTL_DATA. = ' DATA TYPE(LOGR)', 'LIST LOGSTREAM NAME(SYSPLEX.OPERLOG) DETAIL(YES)'; end when UserIn = '17' then do sw='2'; UserIn = 'Produce a CFRM report'; CNTL_DATA. = ' DATA TYPE(CFRM) REPORT(YES)'; end when UserIn = '18' then do sw='3'; UserIn = 'Structure Placement Check'; end when UserIn = '19' then do address ISPEXEC "DISPLAY PANEL("sysplexl")"; select /* start of nested select */ when UserIn = 'L.1' then do sw='1'; UserIn='D LOGGER,STATUS'; end when UserIn = 'L.2' then do sw='1'; UserIn='D LOGGER,L'; end when UserIn = 'L.3' then do sw='1'; UserIn='D LOGGER,CONNECTION'; end when UserIn = 'L.4' then do sw='1'; UserIn='D LOGGER,STR'; end otherwise nop end /* end nested select */ end otherwise nop end /* end select */ /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Select routine to process User Data */ /* - - - - - - - - - - - - - - - - - - - - - - - */ select when sw = '1' then call issue_standard_cmds; when sw = '2' then call invoke_utility; when sw = '3' then call check_structure_placement; otherwise nop; end call plex_information return issue_standard_cmds: /* - - - - - - - - - - - - - - - - - - - - - - - */ /* free work file going into this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "FREE FI("wrktmp1")"; "FREE ATTRLIST(DCB)"; msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - */ /* allocate work file */ /* - - - - - - - - - - - - - - - - - - - - - - - */ "ATTRIB DCB RECFM(F) LRECL(80) BLKSIZE(80)"; "ALLOC FILE("wrktmp1") UNIT(VIO) SP(2,1) TRACK USING(DCB) NEW" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Display "UserIn" and Working panel */ /* - - - - - - - - - - - - - - - - - - - - - - - */ function = "===>" UserIn address ISPEXEC "CONTROL DISPLAY LOCK" address ISPEXEC "DISPLAY PANEL("sysplexw")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Turn Console off going into this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "console deactivate" msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Construct command */ /* - - - - - - - - - - - - - - - - - - - - - - - */ Cart_V = 'PLEX1'random(100,) /* build CART value */ pass_arg. = "CONSOLE SYSCMD("UserIn") CART("Cart_V")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Issue message to Console Services */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO "consprof soldisp(no) solnum(300) unsoldisp(no)" "console activate name("Cart_V") cart("Cart_V")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Get Message Results */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO pass_arg. /* present command */ getcode = getmsg('issue_back.','SOL',Cart_V,,30) /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Turn Console off going out of this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "console deactivate" msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Write message to work file */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO "EXECIO * DISKW "wrktmp1" (STEM issue_back." /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Close work file */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO "EXECIO 0 DISKW "wrktmp1" (FINIS"; /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Library Services */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address ISPEXEC "LMINIT DATAID(LMID) DDNAME("wrktmp1")"; /* address ISPEXEC "edit DATAID(&LMID)"; edit rc = 4 */ address ISPEXEC "browse DATAID(&LMID)"; address ISPEXEC "LMFREE DATAID(&LMID)"; /* - - - - - - - - - - - - - - - - - - - - - - - */ /* post routine clean-up */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO drop pass_arg. /* unassigns variables */ drop issue_back. /* unassigns variables */ msg_status = MSG("OFF"); "FREE FI("wrktmp1")"; "FREE ATTRLIST(DCB)"; msg_status = MSG("ON"); return invoke_utility: /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Display "UserIn" and Working panel */ /* - - - - - - - - - - - - - - - - - - - - - - - */ function = "===>" UserIn address ISPEXEC "CONTROL DISPLAY LOCK" address ISPEXEC "DISPLAY PANEL("sysplexw")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* House Keeping going into routine... */ /* - - - - - - - - - - - - - - - - - - - - - - - */ msg_status = MSG("OFF"); address TSO; "FREE FI(SYSIN SYSPRINT)"; "FREE ATTRLIST(DCB01 DCB02)"; msg_status = MSG("ON"); address TSO "ATTRIB DCB01 RECFM(F) LRECL(80) BLKSIZE(80)"; "ATTRIB DCB02 RECFM(F) LRECL(121) BLKSIZE(0)"; "ALLOC FILE(SYSIN) UNIT(VIO) SP(1,1) TRACK USING(DCB01)"; "ALLOC FILE(SYSPRINT) UNIT(VIO) SP(1,1) TRACK USING(DCB02)"; "EXECIO 1 DISKW SYSIN (STEM CNTL_data."; "EXECIO 0 DISKW SYSIN (FINIS"; /* - - - - - - - - - - - - - - - - - - - - - - - */ /* IBM's SysPlex/Parallel SysPlex Utility */ /* SYS1.MIGLIB needs to be added to PROGxx */ /* add IXCMIAPU to IKJTSO00 AUTHPGM section */ address TSO "call 'sys1.miglib(ixcmiapu)'"; /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Library Services */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address ISPEXEC "LMINIT DATAID(LMID) DDNAME("sysprint")"; /* address ISPEXEC "edit DATAID(&LMID)"; edit rc = 4 */ address ISPEXEC "browse DATAID(&LMID)"; address ISPEXEC "LMFREE DATAID(&LMID)"; /* - - - - - - - - - - - - - - - - - - - - - - - */ /* House Keeping going out of routine... */ /* - - - - - - - - - - - - - - - - - - - - - - - */ msg_status = MSG("OFF"); address TSO; "FREE FI(SYSIN SYSPRINT)"; "FREE ATTRLIST(DCB01 DCB02)"; msg_status = MSG("ON"); return check_structure_placement: /* trace ?r */ /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Set UserIn console command */ /* - - - - - - - - - - - - - - - - - - - - - - - */ UserIn = 'D XCF,STR,STRNAME=*' /* - - - - - - - - - - - - - - - - - - - - - - - */ /* free work file going into this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "FREE FI("wrktmp1")"; "FREE ATTRLIST(DCB)"; msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - */ /* allocate work file */ /* - - - - - - - - - - - - - - - - - - - - - - - */ "ATTRIB DCB RECFM(F) LRECL(80) BLKSIZE(80)"; "ALLOC FILE("wrktmp1") UNIT(VIO) SP(2,1) TRACK USING(DCB) NEW" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Display "UserIn" and Working panel */ /* - - - - - - - - - - - - - - - - - - - - - - - */ function = "===>" UserIn address ISPEXEC "CONTROL DISPLAY LOCK" address ISPEXEC "DISPLAY PANEL("sysplexw")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Turn Console off going into this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "console deactivate" msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Construct command */ /* - - - - - - - - - - - - - - - - - - - - - - - */ Cart_V = 'PLEX1'random(100,) /* build CART value */ pass_arg. = "CONSOLE SYSCMD("UserIn") CART("Cart_V")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Issue message to Console Services */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO "consprof soldisp(no) solnum(300) unsoldisp(no)" "console activate name("Cart_V") cart("Cart_V")" /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Get Message Results */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO pass_arg. /* present command */ getcode = getmsg('issue_back.','SOL',Cart_V,,30) /* - - - - - - - - - - - - - - - - - - - - - - - */ /* Turn Console off going out of this routine */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO msg_status = MSG("OFF"); "console deactivate" msg_status = MSG("ON"); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* logic to parse Structure status information - gillispie 1999 */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ do i=1 to issue_back.0 if substr(issue_back.i,1,9) = ' STRNAME:' then do sn = issue_back.i; i = i + 1; if substr(issue_back.i,1,19) = ' STATUS: ALLOCATED' then do st = issue_back.i; i = i + 1; do k = i to issue_back.0 until , Substr(pl,1,19) = ' PREFERENCE LIST:' ; parse var issue_back.k pl '=' data ; if Substr(pl,1,19) = ' PREFERENCE LIST:' then do pl = issue_back.k; i = k + 1; do k = i to issue_back.0 until , Substr(cf,1,19) = ' CFNAME :' ; parse var issue_back.k cf '=' data ; if Substr(cf,1,19) = ' CFNAME :' then do cf = issue_back.k; i = k + 1; str_info.1 = sn ; str_info.2 = st ; str_info.3 = pl ; str_info.4 = cf ; say'--------------------------------------------------------'; say str_info.1 ; say str_info.2 ; say str_info.3 ; strchk = compare(substr(str_info.3,21,6), , substr(str_info.4,21,6)); if strchk = 0 then say str_info.4 'Structure location is OK.'; else do say '*** Warning *** Warning *** Warning ***', '*** Warning *** Warning ***'; say str_info.4 'Structure has been relocated', 'to backup CF'; say '*** Warning *** Warning *** Warning ***', '*** Warning *** Warning ***'; end end else iterate end k end else iterate end k end else iterate end else iterate end i /* - - - - - - - - - - - - - - - - - - - - - - - */ /* post routine clean-up */ /* - - - - - - - - - - - - - - - - - - - - - - - */ address TSO drop pass_arg. /* unassigns variables */ drop issue_back. /* unassigns variables */ msg_status = MSG("OFF"); "FREE FI("wrktmp1")"; "FREE ATTRLIST(DCB)"; msg_status = MSG("ON"); return /* - - - - - - - - - - - - - - - - - - - - - - - */ /* add libdefs */ /* - - - - - - - - - - - - - - - - - - - - - - - */ add_libdefs: address TSO x = LISTDSI(dsn) if x <> 0 then do say "Exec SYSPLEX - Could not locate DSN="dsn exit 99 end "ALTLIB ACTIVATE APPLICATION(EXEC) DA("dsn")" "ISPEXEC LIBDEF ISPPLIB DATASET ID("dsn")" return /* - - - - - - - - - - - - - - - - - - - - - - - */ /* del libdefs */ /* - - - - - - - - - - - - - - - - - - - - - - - */ del_libdefs: address TSO "ALTLIB DEACTIVATE APPLICATION(EXEC) " "ISPEXEC LIBDEF ISPPLIB DATASET" return