%Handling XML-INTO Problems The %HANDLER BIF associates a user-defined handler procedure with the parser, allowing you to parse the XML document in pieces.
By Jon Paris
In the first article in this series, we looked at the basics of the XML support added to the RPG IV language in V5R4. In this second article, we will continue those explorations and look at some of the additional features of the XML-INTO opcode.
Modify any procedure such that when it's called by a program, it calls another procedure to perform additional logic.
By Jon Paris
Let's look at the technique of call-back processing from the perspective of an RPG programming scenario where the technique might be applied: list processing. Suppose that we have a procedure (or even a called program) that we currently use to build a list of customers based on their name and (optionally) city. Multiple programs use this procedure. One day we get a request from the marketing department that this procedure be modified to also allow selection based on additional criteria, such as state, ZIP code, etc. How should we handle this request? A number of options are open to us, including these:
Ah, another TechTip! Quick update: My last TechTip on getting PTFs on CD worked just fine. I'll follow up shortly with a TechTip on installing those PTFs from an image catalog. And now back to your regularly scheduled tip.
In this tip, I'm going to show you some clever D-spec tricks that will allow you to remove one of those remnants of old-fashioned RPG programming. A D-spec, or definition specification, is the specification we use to define variables in our modern RPG programs. Prior to this, variables were either found in input/output specifications or defined as work fields right in the C-specs (calculation specifications). Read More >>