ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to XLATE in CLLE?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to XLATE in CLLE?

    Hi All,

    How to achieve in CLLE that XLATE or %XLATE does?
    My aim is to check if *ALL is coming as parameter in CLLE program, however user can pass either following ways during a call to CLLE
    *ALL, *All, *aLL, *AlL or *all etc

    It will not work if I check like this in CLLE, if parameter is coming like *all
    IF COND(&OBJECT *EQ '*ALL') THEN(DO)
    Cheers...
    Nil

  • #2
    Re: How to XLATE in CLLE?

    Read this : http://search400.techtarget.com/tip/...884317,00.html
    But the best way for me is to create a SQLRPGLE program who receive a string and return a string too with this code :

    Exec SQL Set :OutValue = Upper(:InValue)
    Patrick

    Comment


    • #3
      Re: How to XLATE in CLLE?

      Hey thanks............K2r400
      Cheers...
      Nil

      Comment


      • #4
        Re: How to XLATE in CLLE?

        You can also use the QDCXLATE function to convert the value to upper case instead.
        PHP Code:
             dcl &MyValLen *dec (5 04                    
             dcl 
        &MyVal *char 4                            
             call QDCXLATE 
        (&MyValLen &MyVal 'QCASE256'
        Need only 3 parms :
        1. the length of the string
        2. the string to be converted
        3. the name of the translation table
        Last edited by Mercury; July 11, 2010, 08:55 AM.
        Philippe

        Comment


        • #5
          Re: How to XLATE in CLLE?

          Thanks............Mercury.
          It will solve my problem what I was looking for.



          Originally posted by Mercury View Post
          You can also use the QDCXLATE function to convert the value to upper case instead.
          PHP Code:
               dcl &MyValLen *dec (5 04                    
               dcl 
          &MyVal *char 4                            
               call QDCXLATE 
          (&MyValLen &MyVal 'QCASE256'
          Need only 3 parms :
          1. the length of the string
          2. the string to be converted
          3. the name of the translation table
          Cheers...
          Nil

          Comment

          Working...
          X