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



No it doesn't. But that's the way it is.


Gary Monnier
*ATI Administrator*
*425.427.7959*

On Tue, May 1, 2018 at 9:16 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

That doesn't make sense...

The callee can't tell if it's been called by RPG or C

What did your RPG prototype look like?

Charles

On Tue, May 1, 2018 at 9:08 AM, Gary Monnier <gmonnier@xxxxxxxxxx> wrote:

Well, problem solved.

Turns out the api doesn't play nice with ILE RPG. Using a C wrapper
function did the trick.




Gary Monnier
*ATI Administrator*
*425.427.7959*

On Fri, Apr 27, 2018 at 1:33 PM, Gary Monnier <gmonnier@xxxxxxxxxx>
wrote:

Hi Mark,

Thanks for the link.

Yes, I do execute ldsp_init() first. It is returning a handle and the
bind works. At least it did until I introduced ldap_set_option().

The problem cane in when ldap_first_entry() was invoked. A trace dump
showed the expected data being obtained but it then went into looking
down
referrals and finally failed due to rebind issues.

I'm led to believe ldap_set_option has to be executed before the bind
step
so it runs right after ldap_init().

To stop the process from looking for referrals my understanding is you
use
ldap_set_option() to set ldap option LDAP_OPT_REFERRALS to
LDAP_OPT_OFF.
The default is LDAP_OPT_ON.

This is where I receive the return code 89.

I never reach the bind step with ldap_set_option() in place.





Gary Monnier
*ATI Administrator*
*425.427.7959*

On Fri, Apr 27, 2018 at 12:42 PM, Mark S Waterbury <
mark.s.waterbury@xxxxxxxxxxxxx> wrote:

Gary,

Did you first call the "ldap_init()" function to initialize the
required
"ldap" structure? e.g something like:

ld = ldap_init('server1' ; ldap_port);

Or you may need to call the "ldap_ssl_init()" function to initiate a
secure connection with the server, e.g.:

ld = ldap_ssl_init('server1', ldap_port, cert_label);

I found an older Redbook that may help ...

https://urldefense.proofpoint.com/v2/url?u=ftp-3A__public.dh
e.ibm.com_systems_power_docs_systemi_v5r3_en-5FUS_dirserv1.p
df&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4
_ztz5b0wbCtdhwrG0PzYq8&m=1dcqP06XjNFdKQv4h_Y-6o314QR_WHDRALe
bJJ4BJC0&s=Xd4GCzttE4m6sLIQ15SOCOVCW_CfPDR2wuf0O42r0ik&e=

It explains the requirements vis-a-vis the sequence of API calls
needed,
etc.

HTH,

Mark S. Waterbury

On 4/27/2018 3:23 PM, Gary Monnier wrote:

Hi,

I'm trying to set the LDAP_OPT_REFERRALS option off but I keep
running
into a "Bad parameter to an ldap routine" error. I've searched the
archives and found two similar questions bu not answers. Doesn't
mean
the
aren't there I just can't find them so I'm asking too.

IBM's documentation has the following interface:


int ldap_set_option(
LDAP **ld*,
int *optionToSet*,
const void **optionValue* )



I have the following prototype defined:

D ldap_set_option...
D PR 10I 0
EXTPROC('ldap_set_option')
D ldapPointer * value
D LDAP_OPT_REFERRALS...
D 10I 0 value
D ldapOptValue * CONST

D LDAP_OPT_REFERRALS...
D S 10I 0 inz(2)
D ldapOptValue S *
D debugOffValue S 10I 0 inz(0)

/free
.
.
.
debugOffValue = ldapDebugOff;
ldapOptValue = %addr(debugOffValue);
returnCode = ldap_set_option(ldapPointer:
LDAP_OPT_REFERRALS:
ldapOptValue);
.
.
.
/end-free

I've tried other combinations but I keep receiving a return code
value
of
89 with a message text of "Bad parameter to an ldap routine".

Using

D ldapOptValue * value

results in the same error

What parameter is bad? I can't tell. My guess is parameter 3.

A trace dump is of no use.

ldap_start_operation: ld->ld_ref_count(1)
ldap_end_operation: ld->ld_ref_count(0)
ldap_err2string: err(89)


Does anyone see anything wrong with the way I set up the prototype?

Any suggestions?

T
​hank you,


Gary Monnier



--
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: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.m
idrange.com_mailman_listinfo_midrange-2Dl&d=DwIGaQ&c=pApUd0A
UA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq
8&m=1dcqP06XjNFdKQv4h_Y-6o314QR_WHDRALebJJ4BJC0&s=1LyQRvWDJ6
qfJDZOBK0-rxzcKTIJe8PpUXYFXPPonc8&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive
.midrange.com_midrange-2Dl&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA
&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=1dcqP06XjNF
dKQv4h_Y-6o314QR_WHDRALebJJ4BJC0&s=JXE8272PmNhiWqgrU04fp9W0o
uu5xSrA8FNACZUuD4c&e=.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_
2dEadiD&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVC
vCsz4_ztz5b0wbCtdhwrG0PzYq8&m=1dcqP06XjNFdKQv4h_Y-6o314QR_WH
DRALebJJ4BJC0&s=28nRB6kNeJQA5KJm2vsmYsqA3ZlQGJM2EoGKtW_JrWo&e=



--
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: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.
midrange.com_mailman_listinfo_midrange-2Dl&d=DwIGaQ&c=
pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_
ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_KQiXrXjekwonqGH0DqY84LgXhpCzk&
s=OI6dwJf3OpUFiAU6ptn-QVftI3A0luCAGZxH7zT1snk&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?u=https-3A__
archive.midrange.com_midrange-2Dl&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=
r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_
KQiXrXjekwonqGH0DqY84LgXhpCzk&s=0MQwrJG9PHxBmLRvxFgotBjSMlaJGd
Lw8UDfQbh56go&e=.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_
2dEadiD&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_
ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_KQiXrXjekwonqGH0DqY84LgXhpCzk&s=
14RWCY24JV5KiH6Y8wOxQbj6ksx4yVcfsQZ8v2xzU_U&e=

--
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: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.
midrange.com_mailman_listinfo_midrange-2Dl&d=DwIGaQ&c=
pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_
ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_KQiXrXjekwonqGH0DqY84LgXhpCzk&
s=OI6dwJf3OpUFiAU6ptn-QVftI3A0luCAGZxH7zT1snk&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?u=https-3A__
archive.midrange.com_midrange-2Dl&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=
r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_
KQiXrXjekwonqGH0DqY84LgXhpCzk&s=0MQwrJG9PHxBmLRvxFgotBjSMlaJGd
Lw8UDfQbh56go&e=.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_
2dEadiD&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_
ztz5b0wbCtdhwrG0PzYq8&m=qGNS_9XjzPPPl_KQiXrXjekwonqGH0DqY84LgXhpCzk&s=
14RWCY24JV5KiH6Y8wOxQbj6ksx4yVcfsQZ8v2xzU_U&e=


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.