Hi, Scott:

I do not recall ever seeing such an interface (API, documented or otherwise) for that ...

This seems like a job for a "virtual terminal" session ... for example, Albert York's excellent TNAPI should do the trick ... see:


For example, you could retrieve the last signed-on date, at the time your application calls QSYGETPH, and if it is not equal to today's date, use TNAPI tool to "sign-on" to a virtual 5250 device, then immediately issue "SIGNOFF" to end that session. That will update this date for you. This should even work if the user profile has INLMNU(*SIGNOFF) specified.

You may also want to submit a DCR to IBM for a new API to do this, but who knows how long that might take for IBM to accept this as a valid requirement, an then to implement it (in V8R1+ of IBM i)?

Hope that helps,

Mark S. Waterbury

> On 3/11/2014 2:55 PM, Scott Klement wrote:

I have a network server application where users sign on. The
application uses QSYGETPH & friends to validate the userid/password and
run under the users authority. This all works great.

Recently, we've had a need to also update the user's last "sign-on" date
when they sign on. Although QSYGETPH updates the profile's last-used
date, and resets the invalid sign-ons to 0, it does not update the last
sign-on date.

Does anyone know if there's a way, programmatically, to update the last
sign-on date for a user profile?

Various utilities rely on this last sign-on date -- and with users
signing on to the network server instead of 5250, it is causing problems
that it does not update the sign-on date.


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page