**FREE // This program is utilizing FREE-FORMAT RPG
ctl-opt DFTACTGRP(*NO);
dcl-f COLORSD WorkStn
// Use the Universal Handler as the handler in this program.
Handler('UNIVERSAL(HANDLER)');
dcl-f COLORSP Keyed;
Write Header; // Write the Header from the Universal Display File to the JSON object.
Read COLORS; // Read a record from the database file COLORSP.
Dow Not %Eof(); // While not at the end of COLORSP
Write Body; // Write the record to the JSON object
Read COLORS; // Read the next record of COLORSP
EndDo;
Write Footer; // Write the Footer from tehthe Universal Display File to the JSON object.
// End program
*InLr = *On;
RETURN; |