Hi, Scott

If you google 'spare no mercy' you will find that the word 'spare' is one
strange beast. It's my understanding (though I will certainly defer to Simon
if he elects to chime in) that spare can be used in a fashion similar to
"give". I can assure you I gave no mercy :)

On Wed, Dec 23, 2009 at 6:24 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx>wrote:

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
--
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 thread ...

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.