-
Nach einer Idee von Bob Cozzi...
PHP-Code:
H BNDDIR('QC2LE') OPTION(*NODEBUGIO:*SRCSTMT) H DFTACTGRP(*NO) ACTGRP(*NEW) EXTBININT(*YES)
/copy qsysinc/qrpglesrc,qusec /copy qsysinc/qrpglesrc,qgy /copy qsysinc/qrpglesrc,qyaspol /copy qsysinc/qrpglesrc,qusgen
D listSpace S 65535A D QYASP0300_T DS LikeDS(QYAP0300) Inz D diskUnit DS LikeDS(QYASP0300_T) Inz D DU DS LikeDS(QYASP0300_T) Based(pDiskUnit) D pDiskUnit S * InZ(%addr(diskUnit))
D closeOpenList PR extPgm('QGY/QGYCLST') D handle 4A OPTIONS(*VARSIZE) D apiErrorDS LikeDS(QUSEC) OPTIONS(*VARSIZE)
D getOpenListE PR extPgm('QGY/QGYGTLE') D rtnValue 65535A OPTIONS(*VARSIZE) D rtnValueLen 10I 0 Const D handle 4A Const D listInfo 80A OPTIONS(*VARSIZE) D reqRtnCount 10I 0 Const D strRcd 10I 0 Const D apiErrorDS LikeDS(QUSEC) OPTIONS(*VARSIZE)
D openASPList PR extPgm('QGY/QYASPOL') D rtnValue 65535A OPTIONS(*VARSIZE) D rtnValueLen 10I 0 Const D listInfo 80A OPTIONS(*VARSIZE) D reqRtnCount 10I 0 Const D filterCount 10I 0 Const D filterInfo 80A OPTIONS(*VARSIZE) D apiFormat 8A Const D apiErrorDS LikeDS(QUSEC) OPTIONS(*VARSIZE)
D openFilter DS Qualified Inz D entrySize 10I 0 Inz(%size(openFilter)) D Key 10I 0 Inz(1) D dataSize 10I 0 Inz(4) D data 10I 0 Inz(-1)
D openListInfo DS Qualified D rcdAvail 10I 0 D rtnRcdCount 10I 0 D Handle 4A D rcdLen 10I 0 D complete 1A D crtDTS 13A D status 1A D reserved 1A D rtnLen 10I 0 D rcdOffset 10I 0 D reserved2 40A
D apiError DS LikeDS(QUSEC) Inz
D rcdCount S 10I 0 D i S 10I 0 D perUsed S 7P 2 D perFree S 7P 2
/free openASPList( listSpace : %size(listSpace) : openListInfo : -1 : 1 : openFilter : 'YASP0300' : apiError ); rcdCount = openListInfo.rtnRcdCount;
for i = 1 to rcdCount; getOpenListE(diskUnit : %size(diskUnit) : openListInfo.Handle : openListInfo : 1 : i : apiError );
// At this point, the DiskUnit struct has the returned Disk info. // Calc the percentage used and free for each disk unit perFree = %DEC((du.qyalable / du.qyatotal00) * 100 : 7: 2); perUsed = 100 - perFree;
endfor;
closeOpenList( openListInfo.Handle : apiError); *inlr = *on; return; /end-free
kf
Similar Threads
-
By TSchuler in forum NEWSboard Programmierung
Antworten: 9
Letzter Beitrag: 08-04-14, 14:03
-
By tarkusch in forum NEWSboard Programmierung
Antworten: 1
Letzter Beitrag: 11-02-14, 13:25
-
By AndreasH in forum IBM i Hauptforum
Antworten: 2
Letzter Beitrag: 18-09-02, 10:36
-
By dwolters in forum NEWSboard Server Software
Antworten: 0
Letzter Beitrag: 11-10-01, 09:45
-
By Burgy Zapp in forum NEWSboard Server Software
Antworten: 0
Letzter Beitrag: 03-04-01, 19:17
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks