× 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 Bruce,

Trust me, I spared no mercy in my feedback to IBM on the example. Can you
believe this is on the technical support site???


I hope you mean "showed no mercy." :)

Since apparently nobody can come up with a good example of this API, I threw one together. I probably made it more complicated than I needed to... but it should (at least) be coded properly.


H DFTACTGRP(*NO) ACTGRP('KLEMENT') OPTION(*SRCSTMT)

D QSYRUSRI PR ExtPgm('QSYRUSRI')
D RcvVar 65535a options(*varsize)
D RcvVarLen 10i 0 const
D Format 8a const
D UsrPrf 10a const
D ErrorCode 32783a options(*varsize)

D QUILNGTX PR ExtPgm('QUILNGTX')
D text 65535a const options(*varsize)
D length 10i 0 const
D msgid 7a const
D qualmsgf 20a const
D errorCode 32783a options(*varsize)

D QMHRSNEM PR ExtPgm('QMHRSNEM')
D MsgKey 4A const
D ErrorCode 8000A options(*varsize)
D ToEntry likeds(RSNM0100)
D options(*nopass)
D ToEntLen 10i 0 const options(*nopass)
D ToEntFmt 8a const options(*nopass)
D FromAddr * const options(*nopass)
D FromCount 10i 0 const options(*nopass)

D RSNM0100 ds qualified
D counter 10i 0 inz(1)
D module 10a inz('*NONE')
D pgm 10a inz('*NONE')
D entrylen 10i 0 inz(7)
D entry 10a inz('*PGMBDY')

D ErrorNull ds qualified
D BytesProv 10i 0 inz(0)
D BytesAvail 10i 0 inz(0)

D USRI0100 ds qualified
D DaysTil 10i 0 overlay(USRI0100:69)

D msg s 200a varying

/free
monitor;
QSYRUSRI( USRI0100
: %size(USRI0100)
: 'USRI0100'
: '*CURRENT'
: ErrorNull );
on-error;
QMHRSNEM( *blanks
: ErrorNull
: RSNM0100
: %len(RSNM0100)
: 'RSNM0100'
: *null
: 0 );
endmon;

select;
when USRI0100.DaysTil = -1;
msg = 'Your password won''t expire +
in the next 7 days.';
when USRI0100.DaysTil = 0;
msg = 'Your password has expired.';
other;
msg = 'Your password will expire in '
+ %char(USRI0100.DaysTil)
+ ' days.';
endsl;

QUILNGTX( msg
: %len(msg)
: ' '
: ' '
: ErrorNull );

*inlr = *on;
/end-free

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.