sponsored links

Collapse

Announcement

Collapse
No announcement yet.

What are the benefits of CL over RPG?

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

  • What are the benefits of CL over RPG?

    I am fairly new to development in RPG and using the IBM i in general. I have not done much work with CL or CLLE and am wondering what the benefit for using this language is. To me it seems like anything that can be done in CL can be done in RPG, so why use CL?

  • #2
    We typically use CLLE programs to orchestrate series of SQLRPGLE programs.

    Comment


    • #3
      CL is intended to be a control language... the idea is that it controls the flow of an application by calling multiple programs, maybe with some other steps like moving a file around between programs or transfering data from a network/tape/dvd before/after the programs run, etc.

      You wouldn't typically write the actual application that reads/writes the database, etc, in CL. You'd just use it to control the flow of multiple steps.

      It's similar to a .BAT file on Windows, or a Shell Script on Unix.

      Comment


      • #4
        and, you're right, you can pretty much do anything in RPG (or C, C++, Cobol, PHP, Java, Node.js, Ruby, REXX, and a dozen other languages) but some things are easier to do in CL. For example, you can type a CL command and press F4 and it'll tell you all the details for the command. You can run CL commands from the other languages, but you can't press F4 for the details -- so coding them in CL is easier. Likewise dealing with stuff like escaping strings and special values when calling a CL command from RPG can be extra work, but its dead simple in CL.

        Having said that, I know a lot of people who don't write new CL programs, prefering RPG as a more powerul alternative.

        A lot depends on what type of work you do.

        Comment

        Working...
        X