ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Changing Hex Codes

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

  • #16
    Re: Changing Hex Codes

    Yep, both are CLLE. How do you prevent the garbling?
    Suppose Jamie will tell me Cl is evil and I should do it in RPG now ...

    Created a temp data area, wrote the 320 char message field to the DA in Pgm1, Read it in again in Pgm2, removed the parm from being passed. All works now .... but I am interested in how/why it garbles it when passed as a parm - ?
    Last edited by gcraill; July 8, 2011, 01:43 AM.
    Greg Craill: "Life's hard - Get a helmet !!"

    Comment


    • #17
      Re: Changing Hex Codes

      Character string constants of 32 bytes or less are always passed with a length of 32 bytes (padded on the right with blanks). If a character constant is longer than 32 bytes, the entire length of the constant is passed. If the parameter is defined to contain more than 32 bytes, the CALL command must pass a constant containing exactly that number of bytes. Constants longer than 32 characters are not padded to the length expected by the receiving program. An option to prevent this is to pass the parameter one byte longer than is being expected and put a nonblank character in the last byte. The recommended option is however to create a command interface and use it in the CL instead.
      Philippe

      Comment


      • #18
        Re: Changing Hex Codes

        yep...this is one of the most FAQ's i've seen in several forums & mailing lists....
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment

        Working...
        X