× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Dave:

You might want to consider requiring your iSeries Access users to used named devices (session names), if you want to be able to provide this kind of functionality to your users (so they can just "signoff" and not worry whether they are at the "top level" or not.)

The only other alternative might be, if you know the range of IP addresses used by the users' PCs, you could use the following snippet of code to retrieve the IP address of the "client" of any telnet session:

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(&ADR) TYPE(*CHAR) LEN(15) DCL VAR(&ZERO) TYPE(*CHAR) LEN(4) VALUE(X'00000000')
RTVJOBA JOB(&DEV) CALL PGM(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))
If they are coming directly from telnet on their PC (e.g. via ClientAccess), this will be the IP address of their PC. If they telnet from one i5/OS system to another, this will be the IP address of the originating i5/OS system.

So then, you can compare the IP address in &ADR with the range of IP addresses known to be local PCs, to determine if it is one of them. If it is, this would indicate, in effect, that this user is "at the top level" and so ENDCNN(*NO) can be used, otherwise, use ENDCNN(*YES).

Hope that helps,

Mark

> Dave Kahn wrote:
2009/7/6 Mark S. Waterbury <mark.s.waterbury@xxxxxxx>:
Hi, Dave:

In that case, you could add code to retrieve the job name, which, for an
interactive job, is the name of device for the session. In most shops,
users using Client Access use pre-specified device names. But, when
they do STRPASTHR or TELNET to another system, they will usually have a
virtual device name such as "QPADEV0001" etc. -- so, perhaps you can
make a decision about when to issue ENDCNN(*YES) based on that?

No, sorry, that won't work for us either. Most of our top level jobs
have a QPADEV* name too.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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.