Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Yesterday for the first time, my client had all of its systems on v5r4 or later so I tried the "New CL Enhancements" for the first time. The DOFOR, DOWHILE were used along with *INT data-types, *DEFINED and the ITERATE command.
This made processing lists of data passed to the CL program from its Command Definition much, much easier.
While I basically responded with a "we could have used these 20 years ago" when I was asked how I liked them, it wasn't really until a critical mass of end-user shops were actually on v5r4 or later that any update to any language is really put to test. So... now I like them.
The bad news is that IBM broke the CL Command Prompter in v5r4 and later (We'll, at least on v7r1 its broke I still checking which pieces were broke at an earlier release.)
Bug 1: When you prompt, and use the & to extend the prompted parameter's input field, the prompter used to extend the parameter input length. Today it simply ends the prompter.
Bug 2: When you prompt inside of CDO (Command Definition Object) source, and specify the SPCVAL or SNGVAL (special or single values) keywords, the prompter inserts an *N into the 2nd component instead of "nothing". Meaning that your CDO source now looks like this:
PARM KWD(LIBNAME) TYPE(*NAME) MIN(1) EXPR(*YES) SPCVAL(*LIBL *N) (*CURLIB *N))
Instead of how it should look, which is like this:
PARM KWD(LIBNAME) TYPE(*NAME) MIN(1) EXPR(*YES) SPCVAL(*LIBL) (*CURLIB))
Now when I'm writing CL or creating Commands, I have to release my aggravation by insulting IBM, after all these years. Sad.
How about the next new thing to V7R1... RUNSQL?!
I don't see RUNSQL on my system except for the version I wrote back in 1989 which still works to this day.
[edit] But you did give me an idea of another command to include the COZTOOLS. I can dig out and update my old RUNSQL command and get it working on v7r1 (the old RPGIII version still works just like it did 23 years ago).
[update] Oh my! The things I had to do before RPG IV with VARYING fields or CL with *DEFINED variables!
RUNSQL is a soon to be released PTF update.
Using the & to extend a parameter input length works for me (7.1) as long as I key a space after it if the parameter is already filled in with something else.
I'm seeing the same behavior from the prompter (filling in default values from list parameters where one of the list values was entered) from every command, not just the comand definition commands.
Neil,
Can you post a link to that announcement (RUNSQL in PTF v7.1)? Thanks.
I guess a RUNSQL command could be useful, but we already have ways to run SQL from CL, so this is more of a convenience than anything. For starters, QSH 'db2 xxx' comes to mind. (Who doesn't have QShell installed nowadays?) On the other hand, real, monitorable, error messages would be a plus.
I read the article. The "new" RUNSQL command looks like little more than what I published 24 years ago--in fact it looks like it might be a bit more difficult to use for the SELECT statement. Everything else can be EASILY mapped to a user-written CL Command using the EXECUTE IMMEDIATE. Not sure why IBM is soliciting sympathy about "working long hours" to provide a RUNSQL command. I did it in 2 weeks time back in 1988/89 using nothing more than RPGIII and CL; and I'm not a $200 Billion company.