Posted by Mike on March 04, 2008 at 08:45:45:
Hello! I'm trying to use IOF in what is probably an unconventionable way and I'm running into some difficulties. Here's a little background:
We have recently acquired a software monitoring product to monitor various things in our PC/AIX/Server environment. Unfortunately, the product wasn't designed with the mainframe in mind and so it has no mainframe probes. However, using SNMP, a user could interface with the product.
So, I've written an SNMP agent (assembler program) that I want to use to monitor certain mainfame metrics. One of the metrics I want to monitor is JES2, specifically the SPOOL volume utilization. The idea is to create an alert if the value exceeds a threshold.
While I can program to some degree and mess around with control blocks and the like, I do not have the knowledge for programming an interface into JES2. This is where IOF comes in.
I was playing around with REXX execs and IOF and wrote a simple one that ran from the SPV panel. I used it to read in the lines, populate my variables and do a quick calculation to come up with a total utilization value. The next obstacle was trying to do something like this from my program (agent).
I did a search on program interfaces into IOF and ran across this entry. I assembled your source as it appears here with the only modification being the the name of the REXX exec being invoked. The program appears to be working in that it does try to execute the exec. But the results are less than satisfying, LOL. I can't seem to get the IOF portion to work. What am I missing?
=======================================
JCL (wasn't provided so I guessed)
//S00010 EXEC PGM=INVOKIOF
//STEPLIB DD DISP=SHR,DSN=OSS.PROD.ASM.LOAD
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSEXEC DD DISP=SHR,DSN=SYS3.TECP.ISPCLIB
=======================================
OUTPUT
3 *-* Address TSO "IOF * TYPE(VOLUME) CLIST"
>L> "IOF * TYPE(VOLUME) CLIST"
<<<<<< OUTPUT RECORDS FOLLOW >>>>>>
You cannot use IOF because you are not in any IOF group
You cannot use IOF because you are not in any IOF group
+++ RC(3753) +++
4 *-* Address IOF
5 *-* "TSICOPY NAME(ROWS) TO(REXX) SECTION(PANEL)"
>L> "TSICOPY NAME(ROWS) TO(REXX) SECTION(PANEL)"
+++ RC(-3) +++
6 *-* "SORT VOLUME A"
>L> "SORT VOLUME A"
+++ RC(-3) +++
7 *-* "UP MAX"
>L> "UP MAX"
+++ RC(-3) +++
8 *-* Do a = 1 to rows
>L> "1"
>L> "ROWS"
8 +++ Do a = 1 to rows
IRX0041I Error running MIKE, line 8: Bad arithmetic conversion
=======================================
REXX Exec:
/* rexx */
trace I
Address TSO "IOF * TYPE(VOLUME) CLIST"
Address IOF
"TSICOPY NAME(ROWS) TO(REXX) SECTION(PANEL)"
"SORT VOLUME A"
"UP MAX"
Do a = 1 to rows
"TSICOPY NAME(VOLUME STATE PCT) TO(REXX)"
vol.a = volume
state.a = state
pct.a = pct
"DOWN 1"
End
"UP MAX"
pct_tot = 0
do a = 1 to rows
pct_tot = pct_tot + pct.a
end
tot_pct = pct_tot / rows
say tot_pct
Exit 0