pjs.getLength()



This API retrieves a field's length.

Parameters
  1. Field

  2. '*MAX' string, which returns the max length for a varying length field (optional)

Return value

This API returns the length of a field

Example
pjs.define("data", { type: 'char', length: 50, varying: true }); pjs.define("char1024", { type: 'char', length: 1024 }); pjs.define("myChar", { type: 'char', length: 1024 }); char1024 = 'Profound.js'; myChar = char1024; // Check if the length of myChar is correct if (pjs.getLength(myChar) === 1024) { data = myChar; }


RPG Equivalent 

%LEN()