Problem solve Get help with specific problems with your technologies, process and projects.

Collecting disk capacity on a daily basis

Collect your disk capacity into a database file and receive period queries.

The following code enables you to collect your disk capacity into a database file, which in turn, gives you period queries and information.

1 - the CL code
PGM DLTF FILE(HAFALA/DSKUTLP)
MONMSG MSGID(CPF9812 CPF2105)
CRTPF FILE(HAFALA/DSKUTLP) RCDLEN(132)
WRKSYSSTS OUTPUT(*PRINT) CPYSPLF FILE(QPDSPSTS)
TOFILE(HAFALA/DSKUTLP) +
SPLNBR(*LAST
DLTSPLF FILE(QPDSPSTS) SPLNBR(*LAST)
OVRDBF FILE(DSKUTLP) TOFILE(HAFALA/DSKUTLP)
OVRDBF FILE(DSKUTL) TOFILE(HAFALA/DSKUTL)
CALL PGM(HAFALA/DSKUTLW)
END:

Note:
The DSKUTLW is an HL program (in my case COBOL), which reads the UTLDSKP files four first records, and from the fourth record takes the ninety-ninth fifth characters, which is the iSeries disk capacity. It then writes it into a database file record with date and time fields. I run it automatically once every day by SBMJOBSCDE, and by doing this, I have a daily record of my asp capacity.

I have attached the source DSKUTLW because I used the date type fields in the file (also attached DSKUTL) the program must be compiled with the option CVTOPT(*datetime) the second file DSKUTLP is created with the CRTPF command RCDLN(132).

Click here to view the DSKUTLW code.

DSKUTL code:

 
     A          R DSKUTLREC
     A            DISKPRC        4S 2
     A            DSPDATE         L         DATFMT(*YMD)
     A            DSPTIME         T         TIMFMT(*HMS) 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Managing your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


This was last published in November 2003

Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close