[Following on the last post]
thia_88 wrote:01 MONTH1-LIST.
15 MONTH1-NAME PIC X(150)
VALUE 'Jan13 Feb13 Mar13 Apr13 May13 Jun13 Jul13 Aug13 Sep13 Oct13 Nov13 Dec13 Jan14 Feb14 Mar14 Apr14 May14 Jun14 Jul14 Aug14 Sep14 Oct14 Nov14 Dec14 '.
If that is how you want the months to be displayed; probably the
most beginner level method of doing it (other than what you've already coded in your value clause) is by preparing a layout; here is a sample:
01 MONTH1-NAME.
03 MONTH1 PIC X(05) VALUE 'JAN13'.
03 FILLER PIC X(1) VALUE ' '.
03 MONTH2 PIC X(05) VALUE 'FEB13'.
03 FILLER PIC X(1) VALUE ' '.
03 MONTH3 PIC X(05) VALUE 'MAR13'.
03 FILLER PIC X(1) VALUE ' '.
03 MONTH4 PIC X(05) VALUE 'APR13'.
03 FILLER PIC X(1) VALUE ' '.
03 MONTH5 PIC X(05) VALUE 'MAY13'.
03 FILLER PIC X(1) VALUE ' '.
..............and so on; ending with a FILLER with remaining bits of your total length.
and then display it in the procedure division of your program.
Syntax:
DISPLAY <Variable name>.
Note: This is a downright elementary solution; and yes, there are other ways of achieving the result; look at the COBOL manuals from IBM Manuals link at the top of the page for other ways.
Regards.