This discussion is now locked
Posted by Mr. John Yeung on 20 October 2016 at 15:56
There are a number of errors in the Python code in example 8-15. The last couple of lines on page 336 are syntax errors (looks like the v should be a comma) and at the end of the function, null is not defined. Should be None. I strongly recommend just pasting actual, live, working code directly into the document. There may be other errors as well, throughout that section of the book. Off the top of my head, the Python isn't idiomatic, the Python community style guide is not followed...
Posted by Mr. John Yeung on 20 October 2016 at 16:03
...it's never explained that the code in 8-14 should be saved as a module named listobjects.py and that 8-15 should be saved as module ilistobjects.py, to be used in the script in 8-16.
(Incidentally, the Python community style guide is known as PEP 8. Unless you have a very compelling reason not to, the first thing to start with is indenting 4 spaces.)
Posted by Justin Taylor on 22 October 2016 at 12:13
References to "OS/400" should probably be replaced.
Bottom of page 178, SQL statements end with a semi colon, not a comma.
Posted by Justin Taylor on 24 October 2016 at 8:31
I just finished the Externalizing I/O section, and I'm not really sure it helps with the "hack the DB one more time" mentioned at the start.
The sample app exposes (via EXPORT/IMPORT) data structures defined off PF record formats. How does that help with DB changes? If you change the table and service program, the service program will be exposing a different layout of the DS than calling programs expect which will cause errors.
Posted by BENOIT MAROLLEAU on 25 October 2016 at 5:04
Hi,very good document!! A remark: In chapter 8, the RPG IV Calling java is very interesting (socket level wuth protocol design) looks very powerful & scalable. Nevertheless, It could be interesting to add a "How to call Web service (REST to keep it simple) from RPG' i.e. interfacing based on standards & HTTP. Consuming REST is key (hybrid), languages in 5733OPS support it, illustrating an example with RPG could help in Chap 5 or 8, IMHO. Am I missing something? Keep up the good work!!
Posted by Jon Paris on 8 December 2016 at 12:35
Justin - although I did not write that section, I believe the intent of this approach is to allow the underlying tables to be replaced while _retaining_ the current tables purely for the purposes of supplying the expected data layout to existing programs. The actual I/O can then be changed to SQL or whatever hitting multiple tables to supply the data required. I haven't read the piece in full so perhaps this does not come across as it should.
Posted by Mr. Tim Hawkins on 6 February 2017 at 18:52
@Authors -- n-i-c-e job! This book has been needing updating for a while now, and you've created a very nice document. Thank you very much. I'll be reading it for a while I suspect...