Just read this one too. I'll check on the length. We are using 128
character max passwords ;-), and I'm pretty sure the length was 128 in
debug.

Jack
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, December 21, 2007 3:48 AM
To: Midrange Systems Technical Discussion
Subject: Re: Question about QSYGETPH and long passwords

Vern,

a) TYPE(*INT) was added to CL in V5R3 (so you may not need V5R4).

b) Prior to V5R3, you could use a TYPE(*CHAR) LEN(4) and assign a binary
value with the %BIN() function.

Granted, the %BIN() function isn't a true integer. It's like data type
B in RPG -- it'd be limited to 999999999 as the highest value. However,
that's probably adequate for the length of a password. (Or, I pity the
user who has to type a 1 billion character long password!)

So, I don't think the release is the most important issue here.

More important, I think, is to make sure the length parameter matches
the actual length of the password. Not the variable the password is
stored in -- but the length of the password itself.

You see, we're used to passing in a TYPE(*CHAR) LEN(10) variable for the
password, and then telling the API that the password length is 10. The
system ignores the trailing blanks in the field. However, with longer
password support (and someone will correct me if I'm wrong) these
trailing blanks are not ignored by the API. To ignore them, you need
the length that you pass to the API to match exactly the length of the
password itself. That way, the API won't even look at the trailing blanks.

Not sure if that description is any good -- I'm about half asleep -- but
maybe you can figure out what I'm saying.

Another concern is the infamous 32 character rule for parameters. If
the password is coming in as a parameter, and the parm is longer than 32
chars, there might be some really interesting issues if the data is not
passed in a manner that's safe for longer variables.

Anyway, Jack... if you need more help, you need to provide more
information. How are your parameters defined? What are the values in
them? Are those values supplied via parameters? Or do you display a
screen? or where do you get them from?

Vernon Hamberg wrote:
What version of the OS are you on? Is it V5R4? Or earlier? I'm going
to take a shot at being Scoot K for a bit - you have integer
arguments for this API, you probably can't use it in CL before V5R4.
So make an RPGLE module and bind it to your CL.



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.