In the previous twoarticles that I have written for this column, we took at look at what PHP is and does, and how to get started on the road to PHP expertise. Hopefully by now you've had a chance to start getting familiar with PHP syntax and how to create and test simple PHP scripts. And maybe you've even taken your first steps in object orientation by experimenting with creating and using PHP classes. If not, well, don't be too hard on yourself. Just think, today could be the first day of the rest of your life. Never too late to start, you know.
For the last two months, in the articles "In Search of System Values" and "Accessing System Values," we've been using the subprocedure ConvertBuffer() to convert the UTF-8 (CCSID 1208) encoded XML output of the Retrieve Command Definition (QCDRCMDD) API to the CCSID of the running job. In those articles, any discussion of the ConvertBuffer() subprocedure was deferred to a later article. This is that "later" article. The source for the subprocedure we'll be discussing is shown below.