Unconfigured Ad Widget

Collapse

TechTip: Create CL Commands from CL Program Source Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • MCWebsite.Staff
    Senior Member
    • Dec 2007
    • 997

    TechTip: Create CL Commands from CL Program Source Code

    ** This thread discusses the article: TechTip: Create CL Commands from CL Program Source Code **
    ** This thread discusses the Content article: TechTip: Create CL Commands from CL Program Source Code **
    0
  • Guest.Visitor

    #2
    TechTip: Create CL Commands from CL Program Source Code

    ** This thread discusses the article: TechTip: Create CL Commands from CL Program Source Code **
    I also don't understand why more don't create commands. I create many at every new job, because I work closely with the operators who are required to do jobs like reset password, without needing security officer authority. What I have found best about commands is the ability to do validation. You can get fancy and have a validation program, but commands allow you to only allow specific responses. For example a Y/N field and only allow them to put in y or n and it is so easy to set up. An expanded article showing this advantage would be good.

    Comment

    • avrahamn@coop.co.il
      Junior Member
      • Jul 2024
      • 44

      #3
      TechTip: Create CL Commands from CL Program Source Code

      ** This thread discusses the article: TechTip: Create CL Commands from CL Program Source Code **
      Commands are one of the best things that exist only on OS400 ISERIEIS an I5. To call a program or procedure that has many parameters without a command interface is very dificult. Imagine if instead of the easy to use command CPYF, we would need to use a call to an API program. But there are some shortcomings to the command interface and if Rochester improves it, it will become more popular. Here are some suggestions: 1. Ability to call OS400 Commands Directly From RPG4 and COBOL Programs without using QCMDEXC, similar to the excution of commands from CL. 2. Automate the design of OS400 commands. Every Program uppon compilation (or option on compilation) becomes automaticaly a COMMAND, and it could be used with keywords. The name of the parameters become the KEYWORD names. additional options on prototypes or PLIST would specify the additional options that are in a command definition. 3. Evey Command should automaticly have a search engine to find keywords, text or options. The search would be both on the command itself and on the HELP of a command

      Comment

      • coteijgeler@chello.nl

        #4
        TechTip: Create CL Commands from CL Program Source Code

        ** This thread discusses the article: TechTip: Create CL Commands from CL Program Source Code **
        (Strange title for an advice to create a CDO for each programme to call or submit) Avrahamn, a lot of strange wishes, in my opinion. There is nothing wrong with a command interface. It uses UIM. This is definitely not limited. 1) why want to call commands from RPG? Write a appropriate CLP, which set the working environment (overwrites) for the RPG PGM, then call the RPG PGM. 2) Is this not a developpers task? Many PGMs run in the background, they do not require a CDO. And how is the system to decide the parameters, the data type, the length, the special values, the conditions (dependencies), etc? 3) This I can not grasp. Search for what? Search in what? A command can have a VCP,POP and COP; each different PGMs. Regards, Carel Teijgeler. PS: VCP=Validity Checking PGM, POP=Prompt Overrride PGM, COP=Choice Override PGM.

        Comment

        • avrahamn@coop.co.il
          Junior Member
          • Jul 2024
          • 44

          #5
          TechTip: Create CL Commands from CL Program Source Code

          ** This thread discusses the article: TechTip: Create CL Commands from CL Program Source Code **
          Therefore: 1. If it is possible to call a simple command like CPYF or RTVSYSVAL from within the Main RPG Program, why use an interin CL program just for one or 2 lines of code. Besides that Command Keywords are eazy to use and self=Documenting. For example: The command CPYF has more than a dozen parameters, If I would need to call it from within an RPG Program, I would need to count the positional parameters. In order to encourage programmers to write and use User Commands, it need to have a way to use the directky from within RPG, Otherwise We do not gain nothing by it. About the working environment - overrites, why no to do it directly from within the RPG Prgram and not need to write a separate program just for one or two lines of code. it will be easier Also if wee need to read the code, no need to open another source to see wat it is doing. 2. I did not understand what did You want to say or You did not understood what i wanted. The repetitive things of the command like parameters could be automaticaly created from within the *entry Plist, it is not needed to define the same thing twce, unless there are additional options. 3. Search The Keywords and prameters within the command. Example: command CPYF has so many options and pramaters, why do not give an engine to search by a pratial name of the keyword, text or options. Same is true abaut RTVSYSVAL. If users would start writing commands, and there would be a command with many parameters, it will have automaticaly a serach engine to find things easier.

          Comment

          Working...
          X