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



Pete Helgren wrote:
> ...
> What I ended up doing was calling the API with all 6 parameters as follows:
> 
> DCL        &Usr    *CHAR LEN(10)
> DCL        &Pwd    *CHAR LEN(10)
> DCL        &Err    *CHAR LEN(1024)
> DCL        VAR(&PH) TYPE(*CHAR) LEN(12)
> 
> CALL       PGM(QSYGETPH) PARM(&USR &PWD &PH &ERR 10 37)
> 
> We have a 10 character password and use CCSID 37
> 
> Worked like a charm!
> 
> Thanks for your help.
> 

The API expects 4-byte binary numbers for the last two parameters, but
you're passing packed(15,5) numbers (the default type in CL for numeric
literals, your "10" and "37" on the call).  Since the first four bytes
of the packed(15,5) values 10 and 37 is x'00000000', the API is actually
receiving zeros for those values.  

  iiiiiiiiiiddddd    i=integer part, d=decimal part
x'000000003700000'   value 37 in packed 15,5
  12345678           first 8 packed digits, the 4-bytes that the API
looks at

For the CCSID, zero means the job CCSID, so that's ok.  But according to
the documentation, a length of zero is not valid; when I tried this, I
got CPF3C1D saying the length in parameter 5 is invalid.  (Maybe you
didn't post your actual code and you're actually passing the 10 and 37 a
different way.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.