How to right justify text in P/I Output Enhancement

print

 
  1. Create a storetype array with a finite length: [STORETYPE_ARRAY32] STORETYPE ARRAY LEN 32;
  2. Create a variable that uses the array: [VARIABLE_FIRSTLINE] VARIABLE [STORETYPE_ARRAY32] EQ "I like tacos";
  3. Use FORMATARRAY to right justify the text: [FORMATARRAY_FIRSTLINE] FORMATARRAY [VARIABLE_FIRSTLINE] RIGHTJUSTIFY;
  4. Use ADD TEXT to add the variable text to the page.
[ADD_FIRSTLINE] ADD TEXT [VARIABLE_FIRSTLINE]
    SIDE RELATIVE 0
    COPIES 0
    CURSORX ABSOLUTE 12960
    CURSORY ABSOLUTE 110000
    FONT "P0612$" ROTATION0;

The RIGHTJUSTIFY in the FORMATARRAY places the "s" in tacos in the 32nd byte of the array and works backward from there.  The "I" is in byte 21, so there are 20 spaces placed at the beginning of the array.

When the ADD TEXT function places the variable on the page, it is still placed left to right.  The CURSORX and CURSORY parameters indicate where the first byte of the array is placed, not where the end of the array is placed.

User-added image
 

Question

Subject: PIOE ADD TEXT - Right to Left

Initial Details: Does Output enhancement allow the ability to place text from Right to Left? I would like to place the variable text string starting at X and then building to the left rather than to the right. In this situation, I never want it to go past X. Example of what it does: I hate tacos I like peaches and grapes Example of what I want: ______________________I hate tacos ___________I like peaches and grapes

UPDATED: April 21, 2017

Contact Us