Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need a declaration on Two Dimensional Array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Tue Nov 25, 2008 12:12 pm    Post subject: Need a declaration on Two Dimensional Array
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: 686
Location: Earth

PostPosted: Tue Nov 25, 2008 12:24 pm    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Tue Nov 25, 2008 2:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts Declaration of varchar in cobol s.saranya srinivasan COBOL Programming 6 Fri Sep 25, 2015 11:43 am
No new posts COBOL Program to Read Array data raj4neo COBOL Programming 8 Sat Aug 15, 2015 12:28 am
No new posts Checking for High-Values in an array amitc23 COBOL Programming 10 Wed Aug 05, 2015 4:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us