write
Format 1
void write( )
Format 2
void write( encoding )
Syntax Rules
1. encoding is a string literal or data item that specifies the character set to be used while writing the JSON stream. It accepts the same values as the iscobol.encoding * configuration property.
General rules
1. When the write method is invoked, the whole content of the data item associated with the JSONStream object is sent to the PrintWriter object associated by the method setPrintWriter. If no PrintWriter has been associated, the stream is printed on the system output.
 
NOTE - If the number of occurrences of a JSON fields is not known at the time the program is written, specifying the DYNAMIC phrase of the OCCURS clause is recommended.
Code example
...
configuration section.
repository
    class jsonStream  as "com.iscobol.rts.JSONStream"
    .
...
working-storage section.
...
77 objJsonStream object reference jsonStream.
...
procedure division.
...
objJsonStream:>write()
...