|
Here is a quicky example:
pgm parm(&devd)
/* Just a quick throw together to see how it works */
/* This works for "standard tape devices" */
/* but not on *TAPMLB devices */
/* Bryan Dietz */
/* written on V5R4 */
/* http://publib.boulder.ibm.com/ +
infocenter/iseries/v5r4/ +
index.jsp?topic=/apis/qtardsts.htm */
DCL VAR(&RCV) TYPE(*CHAR) LEN(1000)
DCL VAR(&RCVL) TYPE(*INT) LEN(4 ) VALUE(1000)
DCL VAR(&FMT) TYPE(*CHAR) LEN(8) VALUE(RDST0100)
DCL VAR(&DEVD) TYPE(*CHAR) LEN(10)
DCL VAR(&RSC) TYPE(*CHAR) LEN(10)
DCL VAR(&ERR) TYPE(*CHAR) LEN(8) VALUE(X'00000000')
DCL VAR(&OFFSET) TYPE(*INT) LEN(4)
DCL VAR(&NUMENT) TYPE(*INT) LEN(4)
DCL VAR(&CHAR4) TYPE(*CHAR) LEN(4)
DCL VAR(&volid ) TYPE(*INT) LEN(4) /*offset to data */
DCL VAR(&cartid) TYPE(*INT) LEN(4) /*offset to data */
DCL VAR(&densit) TYPE(*INT) LEN(4) /*offset to data */
DCL VAR(&wp) TYPE(*INT) LEN(4) /*offset to data */
CHKTAP DEV(&TAPDEV)
CALL PGM(QTARDSTS) PARM(&RCV &RCVL &FMT &DEVD +
&RSC &ERR)
/* get to the data we want to see */
CHGVAR VAR(&CHAR4) VALUE(%SST(&RCV 9 4))
CHGVAR VAR(&OFFSET) VALUE(%BIN(&CHAR4))
CHGVAR VAR(&CHAR4) VALUE(%SST(&RCV 13 4))
CHGVAR VAR(&NUMENT) VALUE(%BIN(&CHAR4))
/* get the offsets to the Current cartridge information */
CHGVAR VAR(&VOLID) VALUE(&OFFSET + 1)
CHGVAR VAR(&CARTID) VALUE(&VOLID + 6)
CHGVAR VAR(&DENSIT) VALUE(&CARTID + 6)
CHGVAR VAR(&WP) VALUE(&DENSIT + 10)
/* show it */
SNDPGMMSG MSG('Tape device=' *CAT &DEVD *TCAT '. +
VolID=' *CAT %SST(&RCV &VOLID 6) *TCAT '. +
CartID=' *CAT %SST(&RCV &CARTID 6) *TCAT +
'. Density=' *CAT %SST(&RCV &DENSIT 10) +
*TCAT '. WP=' *CAT %SST(&RCV &WP 1))
end:
endpgm
----------------------
Bryan Dietz
On 1/31/07, John Candidi <jacandidi@xxxxxxxxxxxxxxxxxxxx> wrote:
Could I get an example of how to code the call to that api?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.