IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need a declaration on Two Dimensional Array


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: USA

PostPosted: Tue Nov 25, 2008 12:12 pm
Reply with quote

Hi,

I need to achieve the following table through Two Dimensional array,


Code:

Datas     Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec

Data1     AAA  BBB  AZZ  CCC  SSS  OOO  KKK  III  LLL  ABC  BCD  XXX
Data2     SSS  BCC  AZA  CDC  SSR  OMO  KKJ  LII  LLO  ABD  BGG  ZZX
Data3     AXX  DDD  ZZZ  CCD  SSF  OON  KYK  ILL  LII  AFG  BDD  XZX


Can anyone help me to achieve this through Two Dimensional Array
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Nov 25, 2008 12:24 pm
Reply with quote

I don't know if this is what you want but, I would arrange this as -

Code:
01 DATA-GROUP.
    05 MONTHLY-DATA OCCURS 12 TIMES.
        10 DATA-FIELD OCCURS 3 TIMES PIC X(03).

    05 MONTH PIC 99.
         88 JAN VALUE 1.
         88 FEB VALUE 2.
----- and so on
    05 DATA-FIELD-SUB PIC 9.

Access with MONTH and DATA-FIELD-SUB subscript. To access data for a particular month, set corresponding condition name to true.
DATA-FIELD-SUB should be 1 - 3.
   
Back to top
View user's profile Send private message
ameenansari

New User


Joined: 18 Sep 2006
Posts: 11
Location: chennai

PostPosted: Tue Nov 25, 2008 1:06 pm
Reply with quote

fdg
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 25, 2008 2:32 pm
Reply with quote

What does this mean ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
No new posts How to move values from single dimens... COBOL Programming 1
No new posts array indexing PL/I & Assembler 4
No new posts COBOL batch program using large size ... COBOL Programming 3
Search our Forums:

Back to Top