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



Barbara,

This is the whole CLLE tamale and it is running without a hitch...

 PGM        PARM(&Usr &Pwd &Error)
                                                  */
 DCL        &Usr    *CHAR LEN(10)
 DCL        &Pwd    *CHAR LEN(10)
 DCL        &Err    *CHAR LEN(1024)
 DCL        VAR(&ERROR) TYPE(*CHAR) LEN(5)
 DCL        VAR(&PH) TYPE(*CHAR) LEN(12)
 CHGVAR     VAR(&ERROR) VALUE('     ')
                                                  */
 CALL       PGM(QSYGETPH) PARM(&USR &PWD &PH &ERR 10 37)
 MONMSG     MSGID(CPF22E2 CPF22E3 CPF22E4 CPF22E5 +
              CPF2203 CPF2204) EXEC(DO)
 CHGVAR     VAR(&ERROR) VALUE('Error')
 ENDDO
                                                   */
 RETURN
 ENDPGM

(Don't confuse &Error and &Err....I did at first)

I can't explain why it works then (but I am glad it does because I look like
a genius!), but what changes would you recommend to prevent a future
surprise when this "feature" is fixed? (Its V5R3M0 - TL04153  Temporarily
applied)

Pete

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Barbara Morris
Sent: Tuesday, July 27, 2004 3:08 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: The QSYGETPH API


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

--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.