Skip to Content
Custom Search

COBOL JUST RIGHT CLAUSE

 

COBOL JUST RIGHT CLAUSE
 
The following simple program depicts the use of JUSTIFIED RIGHT clause
in COBOL.
 
 
       IDENTIFICATION DIVISION.
       PROGRAM-ID. PGM009.
       AUTHOR. MAINFRAMEWIZARD.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 VAR1  PIC X(50) VALUE SPACES.
       01 VAR2  PIC X(50) JUSTIFIED RIGHT VALUE SPACES.
       PROCEDURE DIVISION.
       10000-MAIN-PARA.
           MOVE 'JUSTIFIED RIGHT DEPICTED BY MAINFRAMEWIZARD.COM'
            TO  VAR1
                VAR2
           DISPLAY VAR1
           DISPLAY VAR2.
           STOP RUN.
 
 
Output of the above program is as below
 
 
JUSTIFIED RIGHT DEPICTED BY MAINFRAMEWIZARD.COM                                                                          
   JUSTIFIED RIGHT DEPICTED BY MAINFRAMEWIZARD.COM

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 29 guests online.
Dr. Radut | page