Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Get field 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

...

Code Block
languagejavascript
  pjs.define("data", { type: 'char', length: 50, varying: true });
 
pjs.define("char1024", { type: 'char', length: 1024 });

 pjs.define("myChar", { type: 'char', length: 1024 });

  char1024 = 'ProfoundJSProfound.js';
 
myChar = char1024;



// Check if the length of myChar is correct
 
if (pjs.getLength(myChar) === 1024) {
 
  data = myChar;
 
}


RPG Equivalent
 

%LEN()