Blog

A Simple JSON Generator in RPGLE

A Simple JSON Generator in RPGLE

I wrote this service program to generate JSON from an external data structure. The way to use it is to read a file that has an external data structure associated with it and convert the record into JSON. Below is the service program prototype, implementation, and a sample program that uses the service program. This version supports data types of numeric, character, and boolean. Since DB2/400 doesn’t have a native “bit” type I’ve implemented it in DDS as a 1-byte…

Read More Read More

Break the *PRTF 378 Character Limit with a Custom *WSCST

Break the *PRTF 378 Character Limit with a Custom *WSCST

I had a situation where I was printing a PDF417 barcode to a SATO printer. The data for the barcode contained a name, an address, and other information and together it was longer than 378 characters. 378 is the maximum record length for a printer file. OS/400 printing services will insert a carriage return/linefeed (x’0D’/x’0A’) when 378 is reached. This x’0D’/x’0A’ skewed the PDF417 data. What I needed was a continuous stream of data. Changing the behavior of a printer…

Read More Read More

It’s Friday and there’s 17 new JS frameworks out there

It’s Friday and there’s 17 new JS frameworks out there

If you’re like me you’re tired of hearing that there’s a new JavaScript framework for client-side web development that’s better than everything that ever came before it. It seems that once you have decided on a library and think to yourself “Ok, it has some things I don’t like but I’m going with Angular”, or “React”, or whatever, a newer framework is announced that looks promising. You bite your lip and vow not to look at it; you’ve already made…

Read More Read More

*CALLER and System i Stored Procedures

*CALLER and System i Stored Procedures

Activation groups may be the most important concept to understand when creating *PGM and *SRVPGM objects on the System i (AS/400). Get this wrong and you will be chasing your tail for hours trying to figure out why data being returned to you is not what you were expecting.