Diving Deeper Into Web Services with DATA-INTO and DATA-GEN
Technical editors Jon Paris and Susan Gantner continue their series on DATA-INTO
In part 1 of this series we discussed the basic usage of RPG’s DATA-INTO and DATA-GEN opcodes as a means of generating a JSON web service request and processing the response. In cases where your code is actually supplying the web service you would of course simply reverse these functions and use DATA-INTO to process the incoming request and DATA-GEN to prepare the response.
This time we want to probe a little deeper into some of the additional processing options available for these opcodes and discuss when you might need to use them. Note that some of these options apply only to the YAJLINTO parser and YAJLDTAGEN generator – and so will be specified as part of the %PARSER and %GEN BIFs; others apply to either the DATA-INTO or DATA-GEN opcodes themselves and will be specified as part of the %DATA BIF.