hello all,
I just finished developing a new tools to report the mirrored dasd. It =
is based on the interesting ANTTREXX interface. It runs much faster then
=
multiple Cquery and have several reporting options. If you like it, I'll
=
send the Panel as well.
Regards,
Itschak
/* rexx */
Cquery:
Signal Cquery.Config
Trace all
Cquery.Doc:
------------------------------------------------------------------
Cquery PPRC Status
This program is based on the ANTTREX interface to the ANTRQST macro
Documented in Z/OS DFSMSdfp Advanced Services manual.
The purpose of the program is to mimic the CQUERY command without
writing to the system console.
Setup & Usage notes.
1. Setup
Specify the unit addresses you wish to status examine. Do so by
entering the address ranges in DasdRng.1-9 in the Cquery.Config
Section.
Maintain the number of address ranges in DasdRng.0
2. Usage notes.
Specify program options at command invocations like this:
ANTITS option
XCPT - will report device status other then 'Duplex'.
ALL - will report all devices regardless of PPRC status.
ISPF - will Load and display all Devices information.
TALLY - will tell the total number of disks in DUPLEX
(C) SecuriTeam Software 2006.
------------------------------------------------------------------
Cquery.Config:
DasdRng.0 =3D 1 /* number of DASD ranges
=
*/
DasdRng.1 =3D '2330 25FF' /* doc. the ranges =
*/
DasdRng.2 =3D '6649 66AE' /*
=
*/
DasdRng.3 =3D '66D1 66FF' /*
=
*/
DasdRng.4 =3D '0000 0000' /*
=
*/
DasdRng.5 =3D '0000 0000' /*
=
*/
DasdRng.6 =3D '0000 0000' /*
=
*/
DasdRng.7 =3D '0000 0000' /*
=
*/
DasdRng.8 =3D '0000 0000' /*
=
*/
DasdRng.9 =3D '0000 0000' /*
=
*/
Cquery.Const:
Sts0001i =3D 'STS0001I MyCQuery command ver 1.0 started'
Sts0002i =3D 'STS0002I MyCquery options selected: '
Sts0003i =3D 'STS0003I Status for device address '
Sts0004W =3D 'STS0004W Device status exception at address'
Sts0030E =3D 'STS0030E unrecognized main option passed:'
Sts0040i =3D 'STS0040I Total number of disks in Duplex mode is'
Sts9999D =3D 'STS9999D'
Libdef4 =3D 'Application library does not exist for this type if =
a',
'delete requested.'
Libdef8 =3D 'Application already exists for this type if COND',
'specified.'
Libdef12 =3D 'ISPPROF was specified as the lib-type or EXCLDATA or',
'EXCLLIBR was specified with lib-type other than',
'ISPXLIB or ISPLLIB.'
Libdef16 =3D 'A libname was not allocated or the dataset-list is',
'incomplete.'
Libdef20 =3D 'Severe error.'
Disply4 =3D 'Command not found'
Disply8 =3D 'End or return command entered'
Disply12 =3D 'Panel, message, or cursor field could not be found'
Disply16 =3D 'Data truncation or translation error'
Disply20 =3D 'Severe error.'
Select4 =3D 'RETURN COMMAND ENTERED FROM SELECTED MENU OR FROM',
'OR FROM LOWER LEVEL PANEL.'
Select8 =3D 'Invalid for SELECT Panel command.'
Select12 =3D 'THE PANEL COULD NOT BE FOUND.'
Select16 =3D 'TRUNCATION ERROR IN STORING ZCMD OR ZSEL VARIABLE.'
Select20 =3D 'SEVERE ERROR.'
Tbopen4 =3D 'Invalid return code from TBOPEN service'
Tbopen8 =3D 'Table does not exist'
Tbopen12 =3D 'Table in use; enq failed'
Tbopen16 =3D 'Input library not allocated'
Tbopen20 =3D 'Severe error'
Tbcrea4 =3D 'Duplicate table exists but REPLACE specified'
Tbcrea8 =3D 'Table already exists; REPLACE not specified'
Tbcrea12 =3D 'Table in use; enq failed'
Tbcrea16 =3D 'Table input library not allocated with WRITE.'
Tbcrea20 =3D 'Severe error'
TBend4 =3D 'Invalid return code from TBEND service'
TBend8 =3D 'Invalid return code from TBEND service'
TBend12 =3D 'Table is not open'
TBend16 =3D 'Invalid return code from TBEND service'
TBend20 =3D 'Severe error'
Tbclos4 =3D 'Invalid return code from TBEND service.'
Tbclos8 =3D 'Invalid return code from TBEND service.'
Tbclos12 =3D 'Table is not open.'
Tbclos16 =3D 'Output library not allocated.'
Tbclos20 =3D 'Severe error.'
Tbsave4 =3D 'Invalid return code from TBSAVE service.'
Tbsave8 =3D 'Invalid return code from TBSAVE service.'
Tbsave12 =3D 'Table is not open.'
Tbsave16 =3D 'Output library not allocated.'
Tbsave20 =3D 'Severe error.'
Tbdisp4 =3D 'The enter key or scroll command used. Additional =
data',
'remains to be stored.'
Tbdisp8 =3D 'The end or return command was entered. If crp at =
top,',
'no lines modified.'
Tbdisp12 =3D 'Panel or message not found or table not open.'
Tbdisp16 =3D 'Invalid return code from TBDISPL service.'
Tbdisp20 =3D 'Severe error.'
Tbadd4 =3D 'Number of rows parameter was specified but storage',
'was only obtained for a single row.'
Tbadd8 =3D 'Key tables: a row with the same key already exists;'
/* 'crp set to top.' */
tbadd12 =3D 'Table is not open'
Tbadd16 =3D 'Invalid return code from TBADD service.'
Tbadd20 =3D 'Severe error.'
Tbmod4 =3D 'Invalid return code from TBADD service.'
Tbmod8 =3D 'Key tables:keys did not match. new row added to =
table.'
Tbmod12 =3D 'Table is not open.'
Tbmod16 =3D 'Numeric convert error.'
Tbmod20 =3D 'Severe error.'
Cquery.Var:
RangeIx =3D 0 /* Main loop index
=
*/
TallyDup =3D 0
Cquery.Main:
say Sts0001i
PARSE UPPER ARG QueryOpt
say Sts0002i
If (QueryOpt =3D 'ISPF') then do
Address ISPEXEC "CONTROL ERRORS RETURN"
Address ISPEXEC "TBClose StSPPRCx"
Address ISPEXEC "TBend StSPPRCx"
Address ISPEXEC "TBcreate StSPPRCx Keys(DevNum) Names(",
"DevLvl DevStt PthStt PthStt HomSSI HomLss HomCca",
"HomSer TgtSSI TgtCca TgtLss TgtSer CritSt Cgrplb PthNum)",
" nowrite"
If (Rc =AA=3D 0) then do
Call ErrorHandler Rc TBcrea STSPPRCX
end
Address ISPEXEC "TBSORT STSPPRCX FIELDS(DevNum)"
end
Do while (RangeIx < DasdRng.0)
RangeIx =3D RangeIx + 1
Parse VALUE DasdRng.RangeIx WITH FrXadr toXadr
FrNadr =3D x2d(FrXadr)
toNadr =3D X2d(ToXadr)
Do while (FrNadr < ToNadr +1)
inout.0 =3D 3
inout.1 =3D 'devn('frXadr')'
inout.2 =3D 'QRYSIZE(265)'
inout.3 =3D 'QRYINFO(qmsgs)'
call ANTTREXX 'PQUERY' , 'INOUT'
DevNum =3D Substr(Inout.3,01,04)
DevLvl =3D Substr(Inout.3,06,09)
DevStt =3D Substr(Inout.3,16,10)
PthStt =3D Substr(Inout.3,27,08)
HomSSI =3D Substr(Inout.3,36,04)
HomLss =3D Substr(Inout.3,40,02)
HomCca =3D Substr(Inout.3,43,02)
HomSer =3D Substr(Inout.3,46,12)
TgtSSI =3D Substr(Inout.3,59,04)
TgtCca =3D Substr(Inout.3,63,02)
TgtLss =3D Substr(Inout.3,66,02)
TgtSer =3D Substr(Inout.3,69,12)
CritSt =3D Substr(Inout.3,82,01)
Cgrplb =3D Substr(Inout.3,84,01)
PthNum =3D Substr(Inout.3,86,01)
Select
When (QueryOpt =3D '') then do /* no option or 'ALL'
=
*/
say Sts0003i devNum 'is' Devlvl DevStt Pthstt
end
When (QueryOpt =3D 'TALLY') then do
TallyDup =3D TallyDup + 1
end
When (QueryOpt =3D 'ISPF') then do /* Insert into ISPF tbl
=
*/
Address ISPEXEC "TBADD STSPPRCX ORDER"
If (Rc >4 ) then do
Call ErrorHandler Rc TBadd STSPPRCX
end
end
When (QueryOpt =3D 'XCPT') then do /* show Exceptions only
=
*/
If (DevLvl =AA=3D 'DUPLEX') then Do
say Sts0004w devNum Devlvl DevStt
end
end
Otherwise Do /* Cant identify parm */
Say Sts0030E QueryOpt /* do nothing */
end
end
FrNadr =3D FrNadr + 1
FrXadr =3D d2x(FrNadr)
end
end
if (QueryOpt =3D 'TALLY') then do
Say Sts0040i TallyDup
end
If (QueryOpt =3D 'ISPF') then do
Address ISPEXEC "TBTOP STSPPRCX"
Address ISPEXEC "TBDISPL STSPPRCX PANEL(STSPPPRC)"
end
exit
ErrorHandler:
Signal Handledails.Cons
trace all
ErrorHandler.Doc:
------------------------------------------------------------------
Application Error Handler
Generate error messages & call Cleanup
(c) copywrite SecuriTeam Software Ltd 2006
-----------------------------------------------------------------
ErrorHandler.Cons:
nop
ErrorHandler.Var:
nop
ErrorHandler.Main:
Arg Rcx Func Parm1
Say 'STS9999d' Value(Func||Rc)
Exit rc
end
************************************************ErrorHandler-End**=20
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html