pjs.kds()



This method returns a data structure's sub-field values in an array, which is suitable for use as the search argument for the file.positionTo()file.positionAfter()file.getRecord()file.fetchNextEqual()file.fetchPreviousEqual(), and file.delete() APIs. 

Parameters

1. Data structure - A reference to a data structure defined with pjs.define(), or a String containing the name of a data structure.

Return Value

An array of sub-field values.

Example

Position to record using key data structure
pjs.define("keyDS", { type: "data structure", qualified: true, elements: { "key1": { type: "packed decimal", length: 3, decimals: 0 }, "key2": { type: "packed decimal", length: 3, decimals: 0 } }}); keyDS.key1 = 100; keyDS.key2 = 200; pjs.defineTable("mytable", { keyed: true, read: true }); mytable.positionTo(pjs.kds(keyDS));

RPG Equivalent 

%KDS()

Requirements

This API requires the Profound.js Connector module.