Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use LDAPSRCH with REXX & Umlaute

Status
Not open for further replies.

Adam5

Programmer
Oct 13, 2005
18
DE
Hello,

in thread277-1421324 I've described how zu trap the ouput from LDAPSRCH-tool.

A few weeks ago, I had to change the coding, because I was not able to read LDAP-entries with umlaute ("ä", "ö") and other diacritic letters ("á", "é"). I got "Not printable" - Attributes.

I had to use the "-C"-option from LDAPSRCH to convert the result of the query to the local codepage. Default was LANG=C - de facto IBM-1047 = default codepage in USS. To set the correct local codepage I used the environment variable "LANG=De_DE.IBM-1141" and put that into the ENVIR-variable of the CEEOPTS (language environment variables).

So I have now o file 'TXXXXXA.CEEOPTS.LANG.IBM-1141.TXT' with following content:
Code:
ENVAR("LANG=De_DE.IBM-1141")
And here is how I'm calling LDAPSRCH:
Code:
'FREE F(CEEOPTS)'                                               
"ALLOC F(CEEOPTS) DSN('TXXXXXA.CEEOPTS.LANG.IBM-1141.TXT') SHR" 
call LDAPSRCH '-h '!!ldaphost!!' ',                                     
 '-C ',                                                                 
 '-D CN='!!remuser!!',OU=Benutzerkonten,DC=bk,DC=YYYYY,DC=de -w '!!rempwd!!' ',
 '-b CN='!!user!!',OU=Benutzerkonten,DC=bk,DC=YYYYY,DC=de objectclass=user',
 'sn givenName displayName telephoneNumber displayName department ',    
 'extensionAttribute1 extensionAttribute2 ',                            
 '1>DD:DSOUT 2>DD:DSERR'

Hope this is usefull for some people :)

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top