writeToFile
Puts the content of the data item associated with a JSONStream object into a file.
General format
void writeToFile ( Json-Destination )
Syntax rules
1. Json-Destination can be either a Data Item or a Nonnumeric Literal.
General rules
1. Json-Destination refers to a regular disk file.
2. When the write method is invoked, the whole content of the data item associated with the JSONStream object is put into Json-Destination.
 
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:>writeToFile("Sample.json")
...