Tag Archives: Data Structures

Java and External Data Structures on IBM i

One of my favorite techniques for passing structured bulk data around is using datas queue’s with the format of the data defined in an external data structure.

In RPG this is very easy … you defined a data structure using the EXTNAME keyword.

dcl-ds stuct1 extname('EXTDS1') end-ds;  Code language: JavaScript (javascript)

Then you just use the data structure name when calling the QRCVDTAQ or QSNDDTAQ api’s and the data will be nicely mapped into the appropriate structure field.

But what if you wanted to allow a Java application to consume or populate the data queue?

Continue reading