ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CL Data Structures

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

  • CL Data Structures

    I haven't seen this posted anywhere on this site. I had no clue this could be done until I came across this article by chance. Basically in cl you can define a variable as being based on part of another variable.

    DCL VAR(&CustData) TYPE(*CHAR) LEN(77)
    DCL VAR(&AmtDue) TYPE(*DEC) LEN(9 2) STG(*DEFINED) DEFVAR(&CustData 1)

    In this sample &AMTDUE basically will have the value from position 1-9 of &CUSTDATA.
    The key to this is the STG parameter and the DEFVAR parameter when defining &AMTDUE.


    Article in the link can explain it in more detail.


  • #2
    Re: CL Data Structures

    Jamie is going to blow this thread up in 3......2......1.....
    Michael Catalani
    IS Director, eCommerce & Web Development
    Acceptance Insurance Corporation
    www.AcceptanceInsurance.com
    www.ProvatoSys.com

    Comment


    • #3
      Re: CL Data Structures

      CL are you outta your friggen Mind!
      Did I ever mention that CL is for small children and farm critters?

      jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment

      Working...
      X