Page 1 of 1

justify right

PostPosted: Mon Jun 07, 2010 12:13 am
by Vikrant Survase
what exactly does justify right clause do would anybody explain with example?

Re: justify right

PostPosted: Mon Jun 07, 2010 12:18 am
by Robert Sample
From the COBOL Language Reference manual:
5.3.9 JUSTIFIED clause

The JUSTIFIED clause overrides standard positioning rules for receiving items of category alphabetic, alphanumeric, DBCS, or national.
These variables are left justified by default (unlike numeric variables, which are justified to the decimal point either actually specified in the PIC or implied). If you have variable X defined as PIC X(5) and move 'AB' to it, the actual value in X is AB<B><B><B> where <B> represents a blank (space) character. With PIC X(5) JUST RIGHT, the value would be stored as <B><B><B>AB.

Re: justify right

PostPosted: Mon Jun 07, 2010 12:30 am
by Vikrant Survase
Robert Sample, thank u i got it