Stuff I Neglected to Mention on February 16, 2011
April 20, 2011 Ted Holt
No matter how hard I try, it seems that I often neglect to mention something important in an article. On February 16, Four Hundred Guru included two of my articles–one about commands, the other about output queues and print devices. In each one, I omitted a salient piece of information. Fortunately, readers of this august publication were quick to bring my shortcomings to my attention. Here are some representative comments.
Hey, Ted: Another fan of commands here. I think you missed one of the best advantages of using commands instead of CALL–namely, that of managing change–in your article Commands: Underused and Unappreciated. When you add another parameter to a program, you have to go and find every call to that program, and possibly amend all of those calls. On the other hand, if you’ve gone via a command, then you can pass a default in, and all the callers can be blissfully unaware that the command-processing program (CPP) has changed. By changing a command default, you can also easily change many programs without having to open an editor. For the IBM APIs that I tend to use often, I frequently create a command with the parameter definitions and then specify the API as the CPP. Now I can prompt the parameters from command entry or SEU without referring to the manual. These commands take only a minute or three to knock together, and can easily save that in a day. –Ben Ben, you can add optional parameters to programs without using a command interface. But I do think the command method that you advocate is cleaner. I’ve also written commands over APIs, and you’re exactly right: it works well. Your second idea–changing a default–scares me. But that’s because I’m a conservative person in the same way that Wal-Mart is a discount retailer. –Ted
Hey, Ted: One point missing in the article OUTQ vs. PRTDEV. The only practical reason I have for specifying a print device is in Query/400. If you want to send your spool file to a specific output queue in a query, you must use a printer name. This is true even if you just want the report to go to an outq that does not print. Subsequently, whenever we create remote outq’s, we set up a dummy printer device to go along with it. –Doug RELATED STORIES Commands: Underused and Unappreciated
|