|
We are trying to use the QSYGETPH API and keep getting the CPF22E2 error (Password not correct for user profile) even though we're using a valid logon and password. I've posted our code below. Does anyone see anything obvious we might be doing wrong ? D GetProfile Pr ExtPgm('QSYGETPH') D UserID 10A D Password * D Handle 12A D ErrorCode 256A Options(*Varsize : *NoPass) D PswLength 10I 0 Options(*NoPass) D CCSIDCode 10I 0 Options(*NoPass) D ErrDs Ds D BytesPrv 1 4I 0 Inz(256) D BytesAvl 5 8I 0 Inz(0) D ErrMsgID 9 15 D Reserved 16 16 D ErrMsgDta 17 256 P RtvProfile B D RtvProfile PI 10I 0 D userid 10a Value D password 10a Value * D pswlength S 10I 0 D CCSIDCode S 10I 0 D Passwordin S * D* /Free //?Translate User ID and Password to Upper Case; UserId = %Xlate(LC:UC:UserID); // User Id; Passwordin = %addr(Password); // Password; pswlength = %len(Password); CCSIDCode = 37; //?Retrieve user Profile; CallP GetProfile (UserID : passwordin: handle : ERRDS: pswlength:CCSIDCode); If BytesAvl > 0; Return 0; Else; Return 1; Endif; /End-Free Greg Fleming Programmer/Analyst Everglades Direct, Inc.
As an Amazon Associate we earn from qualifying purchases.
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.