Generating Code with HostBridge
Scott finished the object (“Finally!! What took so long it was just a simple link!”) and passed it to me for testing. I used my massive COBOL programming skills to call John Bachiochi (I find it interesting that auto-correct suggests Hibachi for John’s last name, I will suggest that he change it) and ask him to create me a COBOL program that I could invoke from HB.js. I wanted a program that would test all of the common COBOL data formats our customers would be likely to encounter, I mean DISPLAY (character) and COMP-3 (packed decimal), right? John wrote the program and sent me the copybook. John being John, the copybook was very very long. When I asked John why it was so long he said that these were the formats we needed to support. Beside DISPLAY and COMP-3 there was COMP (I guess that is COMP-1), COMP-2, COMP-5 (huh??), ZONED (wait what happened to COMP-4, never mind I don’t want to know). There were dozens of different of tests for each data type. Differences in length, scale and precision (I didn’t know the difference either, didn’t want to look stupid so I just nodded my head and googled it later), signed and unsigned, etc.
Editor’s Note: As I am sure you have noticed James likes to use parenthesis to an excess. We have edited and remove them from his blog posts on multiple occasions, but as he is the administrator of the system and has threaten to revoke all of our access, we have decided to compromise and let him use all of the parenthesis he chooses (and I choose to add some right here), but we take no responsibility for the content of James’ blog.
James’ Note: Ha! or (Ha! Nerd victory.)
Now I had a HB.js Java API and a working CB2XML program. The rest would be easy . . . or not.
To be continued in my next post. . .