pjs.moveLeft()
The pjs.moveLeft() API allows you to move values from one variable to another, left adjusted, without any type checking. It has the same functionality as pjs.move(), but with the 'left-adjusted' paremeter always true.
The pjs.moveLeft() API moves and left adjusts a values from one field to another, without any type checking.
Parameters
Sourc - where you are taking data from
Target name - where you are moving data into
Date/Time/Timestamp format (optional)
Pad (optional) - if passed in as true, the Target field is first cleared.
Examples
pjs.define("Name", { type: 'char', length: 3, initValue: 'MR.' });
pjs.define("First", { type: 'char', length: 6, initValue: ' SMITH' });
pjs.define("Result", { type: 'char', length: 9 });
pjs.moveLeft(Name + First, Result);
pjs.define("source1", { type: 'char', length: 5, initValue: 'ABCDE' });
pjs.define("target1", { type: 'char', length: 10, initValue: 'abcdefghij' });
Â
pjs.moveLeft(source1, target1);
// target1 = 'ABCDEfghij'
pjs.define("source1", { type: 'decimal', length: 5, decimals: 0, initValue: 12345 });
pjs.define("target1", { type: 'char', length: 10, initValue: 'abcdefghij' });
Â
pjs.moveLeft(source1, target1);
// target1 = '12345fghij'
RPG EquivalentÂ
MOVEL