pjs.putDataArea()
This API retrieves writes data to an IBM i data area. Data is written starting at position 1.Â
Parameters
name -Â A string containing the data area name, in LIBRARY/OBJECT_NAME notation. If the library is omitted the job's library list will be used to resolve the data area. The special values "*LDA", "*GDA", and "*PDA" can also be used.
data - A Buffer instance containing the data to write to the data area, or a Number value to write to the data area.
unlock (optional) - If Boolean true is passed the data area will be unlocked, if necessary, after the data is written.
Return Value
None.
Exception Handling
If there is a problem retrieving the data, an Error will be thrown with the following properties:
message - The IBM i message text.
error - The message id.
help - The message help text.
Examples
Write decimal data to the local data area
try {
Â
var buffer = new Buffer([0xF1, 0xF2, 0xF3, 0xF4, 0xF5]); // 12345
pjs.putDataArea("*LDA", buffer);
}
catch (error) {
// Problem! Data not written.
}
RPG Equivalent
OUT
Requirements
This API requires the Profound.js Connector module.
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!