justify right



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

justify right

Postby Vikrant Survase » Mon Jun 07, 2010 12:13 am

what exactly does justify right clause do would anybody explain with example?
Vikrant Survase
 
Posts: 19
Joined: Fri Jun 04, 2010 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: justify right

 

Re: justify right

Postby Robert Sample » Mon Jun 07, 2010 12:18 am

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: justify right

Postby Vikrant Survase » Mon Jun 07, 2010 12:30 am

Robert Sample, thank u i got it
Vikrant Survase
 
Posts: 19
Joined: Fri Jun 04, 2010 9:08 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post