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


  • Subject: Convert Upper case to lower case in a CL
  • From: bvining@xxxxxxxxxxxx
  • Date: Mon, 31 Aug 98 12:11:50 CDT

Ravi,

Here is a sample of converting one paramter to lowercase using the
current CCSID of the requesting job.  The one value that would need
changing is &DATASIZE and the LEN() of &PARM1 -- these two must match
and represent the size of the variable to lowercase.

To handle three input parameters simply vary the second and fourth
parameters being passed to QLGCNVCS (Convert Case).

             PGM        PARM(&PARM1)
             DCL        VAR(&PARM1) TYPE(*CHAR) LEN(10)
             DCL        VAR(&REQCTLBLK) TYPE(*CHAR) LEN(22) +
                          VALUE(X'00000001000000000000000100000000000+
                          000000000') /* Use Job CCSID to convert +
                          input data to lowercase */
             DCL        VAR(&DATASIZE) TYPE(*DEC) LEN(2 0) VALUE(10)
             DCL        VAR(&DATALEN) TYPE(*CHAR) LEN(4)
             CHGVAR     %BINARY(&DATALEN) VALUE(&DATASIZE)
             CALL       PGM(QLGCNVCS) PARM(&REQCTLBLK &PARM1 +
                          &PARM1 &DATALEN 0)
             ENDPGM

If you are interested in the specifics of this API call, see the
National Language Support APIs in the System API Reference.

Bruce Vining

>
>An existing  CL program gets 3 input parms in upper case.I have a
>requirement where I need to convert these parms into lower case in the
>CL. I do not want to call an external RPG just to do the conversion nor
>can the CL be converted to ILE. Any suggestions?
>
>Thanks in advance.
>
>Ravi
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.