Hi,
I've just joined the forum and I find it really interesting... even though I'm just a System Administrator trying to learn some programming.
I need to monitor a Library and I thought about creating a CL program executing this:
DSPOBJD OBJ(SMZ4DTA/*ALL) +
OBJTYPE(*ALL) +
OUTPUT(*OUTFILE) +
OUTFILE(QTEMP/Library) +
And then execute the SQL statement with RUNSQL:
select sum(ODBPUN * ODSIZU) from library
this gives me the size of the library...
Now, what I'm having trouble with is trying to get the value calculated by the SQL statement into a variable so I can monitor the size.
I thought about creating a database using SQL statements and then doing a RCVF to get the value but I'm not sure.
All suggestions and ideas are welcome.
Thanks!!!
I've just joined the forum and I find it really interesting... even though I'm just a System Administrator trying to learn some programming.
I need to monitor a Library and I thought about creating a CL program executing this:
DSPOBJD OBJ(SMZ4DTA/*ALL) +
OBJTYPE(*ALL) +
OUTPUT(*OUTFILE) +
OUTFILE(QTEMP/Library) +
And then execute the SQL statement with RUNSQL:
select sum(ODBPUN * ODSIZU) from library
this gives me the size of the library...
Now, what I'm having trouble with is trying to get the value calculated by the SQL statement into a variable so I can monitor the size.
I thought about creating a database using SQL statements and then doing a RCVF to get the value but I'm not sure.
All suggestions and ideas are welcome.
Thanks!!!
Comment