×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Here are a couple I use, neither are original:

This one's a CLP I got from somewhere and run here from a job scheduler
everyday.  Perhaps you can use it as a basis until somebody comes up with
something better.
*--*
            PGM        PARM(&THRESHOLD)

            DCL        VAR(&C         ) TYPE(*CHAR) LEN(  10  )

            DCL        VAR(&D         ) TYPE(*DEC ) LEN(   7 2)

            DCL        VAR(&M         ) TYPE(*CHAR) LEN( 256  )

            DCL        VAR(&THRESHOLD ) TYPE(*CHAR) LEN(   2  )

            DCL        VAR(&ALERTLVL  ) TYPE(*DEC ) LEN(   7 2)

            DCL        VAR(&SRLNBR    ) TYPE(*CHAR) LEN(   8  )

            DCL        VAR(&SYSNAME   ) TYPE(*CHAR) LEN(   8  )

            DCLF       FILE(DISK_USED)



            RTVSYSVAL  SYSVAL(QSRLNBR) RTNVAR(&SRLNBR)

            RTVNETA    SYSNAME(&SYSNAME)

            CHGVAR     VAR(&ALERTLVL) VALUE(&THRESHOLD)

            DSPSYSSTS  OUTPUT(*PRINT) RESET(*YES) ASTLVL(*BASIC)

            CPYSPLF    FILE(QPDSPSTS) TOFILE(DISK_USED) +

                         SPLNBR(*LAST)

            DLTSPLF    FILE(QPDSPSTS) SPLNBR(*LAST)

            RCVF       RCDFMT(DISK_USED)

            RCVF       RCDFMT(DISK_USED)

            RCVF       RCDFMT(DISK_USED)

            RCVF       RCDFMT(DISK_USED)

            RCVF       RCDFMT(DISK_USED)

            CHGVAR     VAR(&C) VALUE(%SST(&DISK_USED 98 6))

            CHGVAR     VAR(&D) VALUE(&C)

            CHGVAR     VAR(&M) VALUE('Actual disk usage is' *BCAT +

                         &C *TCAT '% on ' *CAT &SRLNBR *BCAT &SYSNAME)

            IF         COND(&D > &ALERTLVL) THEN(DO)

                       CHGVAR     VAR(&M) VALUE('Alert:' *BCAT &M)



                       SNDDST     TYPE(*LMSG) +

                         TOINTNET((tom.westdorp@stationcasinos.com) +

                         (tjwestdorp@lvcm.com *CC)) DSTD('Disk +

                         Usage') LONGMSG(&M) SUBJECT(&M)

            ENDDO

            ENDPGM

*--*
and this one's a command and CLP CPP:

             CMD        PROMPT('Display System ASP usage')
*--*
             PGM

             DCL        VAR(&PCT) TYPE(*CHAR) LEN(7)

             DCL        VAR(&TOT) TYPE(*CHAR) LEN(7)

             DCL        VAR(&RCVDTA) TYPE(*CHAR) LEN(067)

             DCL        VAR(&RCVLEN) TYPE(*CHAR) LEN(4) +

                          VALUE(X'00000043')

             DCL        VAR(&RESETO) TYPE(*CHAR) LEN(10) +

                          VALUE('*YES      ')
             DCL        VAR(&FMTNAM) TYPE(*CHAR) LEN(08) +
                          VALUE('SSTS0200')
             DCL        VAR(&ERRSTS) TYPE(*CHAR) LEN(08) +
                          VALUE(X'0000000800000000')
             DCL        VAR(&PCTASP) TYPE(*DEC) LEN(7) VALUE(0)
             DCL        VAR(&TOTASP) TYPE(*DEC) LEN(7) VALUE(0)
             DCL        VAR(&PCTX) TYPE(*DEC) LEN(7 4) VALUE(0)
             CALL       PGM(QWCRSSTS) PARM(&RCVDTA &RCVLEN &FMTNAM +
                         &RESETO &ERRSTS)
             CHGVAR     VAR(&PCTASP) VALUE(%BIN(&RCVDTA 53 4))
             CHGVAR     VAR(&TOTASP) VALUE(%BIN(&RCVDTA 49 4))
             CHGVAR     VAR(&PCTX) VALUE(&PCTASP / 10000)
             CHGVAR     VAR(&PCT) VALUE(&PCTX)
             CHGVAR     VAR(&TOT) VALUE(&TOTASP)
             SNDPGMMSG  MSG('The system ASP is ' *CAT &PCT *TCAT '% +
                         used')
             ENDPGM
*--*
Result is a message "The system ASP is 76.1398% used"

-----Original Message-----
From: Rusling, John B. (Alliance) [mailto:jbrusling@alliancedev.com]
Sent: Tuesday, May 21, 2002 11:01 AM
To: 'rpg400-l@midrange.com'
Subject: Check for amount of disk space available on an AS/400 using an
rp g program?


Hello! I'm digging around and am turning up zilch so far.

How can I check for amount of dasd disk space available on an AS/400 using
an rpg program?

(or a cl program)

Thanks for any help.

John B.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.