|
Hi, Steve:
Perhaps you could try this approach ...
PGM PARM(&ADR)
DCL VAR(&ADR) TYPE(*CHAR) LEN(15)
DCL VAR(&RCV) TYPE(*CHAR) LEN(1024)
DCL VAR(&LEN) TYPE(*CHAR) LEN(4) VALUE(X'00000400')
DCL VAR(&ERR) TYPE(*CHAR) LEN(96) VALUE(X'00000060')
DCL VAR(&DEV) TYPE(*CHAR) LEN(10)
DCL VAR(&FMT) TYPE(*CHAR) LEN(8) VALUE('DEVD0600')
DCL VAR(&ZERO) TYPE(*CHAR) LEN(4) VALUE(X'00000000')
RTVJOBA JOB(&DEV)
CALL PGM(QSYS/QDCRDEVD) PARM(&RCV &LEN &FMT &DEV &ERR)
IF (%SST(&ERR 5 4) *NE &ZERO) +
CHGVAR VAR(&ADR) VALUE(%SST(&ERR 8 7))
ELSE +
CHGVAR VAR(&ADR) VALUE(%SST(&RCV 878 15))
RETURN
ENDPGM
Call this little CL program with a 15 character field as the single
parameter. If the value returned in the 15 character result is all
blanks, the device has no IP address, and so is likely a twinax device
(or some other session connected via SNA, etc.). If errors are detected
by the API, the CPF error message ID is returned. (Check the first 3
characters for e.g. "CPF".)
Regards,
Mark S. Waterbury
Steve Moland wrote:--
I don't have any dumb terminals on my 170 so I can't test something.
I would assume if I issue a STRPCO command from a device which is a dumb
that it will fail.
If so, what CPFxxxx or XXXxxxx message number comes up.
also
Is there a way to programmatically know that the device being is a dumb
terminal ?
Steve Moland
Access Paths Inc
12 Parmenter Rd Unit C4
Londonderry NH 03053
steve@xxxxxxxxxxx
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email:
MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.