Custom Search

In Cobol, Is it possible to right justify alphanumeric variable?,alphanumeric data under this cobol system,alphanumeric working-storage variable

Using an alphanumeric variable.
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLO02.
000300 ENVIRONMENT DIVISION.
000400 DATA DIVISION.
000500
000600 WORKING-STORAGE SECTION.
000700
000800 01 THE-NAME PICTURE IS XXXXXXXXXX.
000900
001000 PROCEDURE DIVISION.
001100
001200 PROGRAM-BEGIN.
001300
001400 DISPLAY "Enter someone's name.".
001500
001600 ACCEPT THE-NAME.
001700
001800 DISPLAY "Hello " THE-NAME.
001900
002000 PROGRAM-DONE.
002100 STOP RUN.
The following is an example of the output from hello02.cbl, using Erica as the name entered at the keyboard:
OUTPUT:
C>pcobrun hello02

Enter someone's name.
Erica
Hello Erica

C>
ANALYSIS: At line 001400, the user is asked to enter a name. At line 001600, the ACCEPT verb will cause the computer to accept input from the keyboard until the user presses Enter. Whatever is typed (up to 10 characters) will be stored in THE-NAME. THE-NAME then is displayed in a hello message.