JUSTIFIED RIGHT

 2 Replies
 1 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
klkemp100
Basic Member Send Private Message
Posts: 14
Basic Member

Is there a way in Lawson COBOL to make a character field right-justified?

In the past, other COBOL's, i've been able to define something like...

WS-CHARACTER-FIELD     PIC X(15) JUSTFIED RIGHT.

and the data would then be "           12345" etc.

Tried this in Lawson and it barfs when compiled.

Thoughts, ideas?

Thanks!

Ragu Raghavan
Veteran Member Send Private Message
Posts: 477
Veteran Member

Ap90 uses code below to Right Justify a 14 character field - IF (AP90F4-API-PO-NUMBER NOT = SPACES)     MOVE AP90F4-API-PO-NUMBER TO JSTWS-STR     MOVE 14 TO JSTWS-STR-LEN     SET JSTWS-RIGHT TO TRUE     SET JSTWS-NO-REMOVE-0 TO TRUE     PERFORM 2000-JUSTIFY-OBJECT     MOVE JSTWS-STR-OUT TO AP90F4-API-PO-NUMBER                                                    DB-PO-NUMBER ELSE     INITIALIZE DB-PO-NUMBER.

klkemp100
Basic Member Send Private Message
Posts: 14
Basic Member

Thanks!