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

Comments

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

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 20 guests online.
Dr. Radut | page