SaveToFile – PB Docs 2017

SaveToFile

PowerScript function

Description

Saves the JSON data to the local file.

Applies to

JSONGenerator and JSONPackage objects

Syntax

Argument

Description

objectname

The name of the JSONGenerator or JSONPackage object
whose data you want to save to the file.

FileName

A string whose value is the file full
name.

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, the method returns null.

Examples

This example generates the following JSON string and saves to
d: est.json:

{ “string”: “string”, “long”: 100, “boolean”: true, “datetime”:
“2017-09-21 12:00:00”, “blob”: “dABoAGkAcwAgAGkAcwAgAGIAbABvAGIA”,
“remark”: null }

This example packages the data of the DataWindow, DataStore, and
DataWindowChild control and then saves the data to
D: empjson.txt.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x