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
 

 

difference between occurs declaration

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

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Tue Sep 05, 2006 12:55 pm    Post subject: difference between occurs declaration
Reply with quote

Hi all

I want to know the difference between below declaration of arrays.


01 WS-ARRAY.
10 WS-OFR-ID-AY-HST OCCURS 3 TIMES .
15 WS-OFFER-ID-ARRAY PIC x(10).
15 WS-BK-ID-ARRAY PIC X(5).
15 WS-LNK-ID-ARRAY PIC X(20).

AND

01 WS-ARRAY.
10 WS-OFFER-ID-ARRAY PIC x(10) OCCURS 3 TIMES
10 WS-BK-ID-ARRAY PIC x(5) OCCURS 3 TIMES
10 WS-LNK-ID-ARRAY PIC x(20) OCCURS 3 TIMES


IS the total memory required same?
any performance issue ?

thanks
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Sep 05, 2006 1:02 pm    Post subject:
Reply with quote

Toal memory required by both the declaration willbe the same...
BUt u have advantage of the first declaration ...
- In this u can relatiavely access the variable like... if WS-BK-ID-ARRAY = 1223 then u can access relative value of WS-LNK-ID-ARRAY ...
It is usefule if both r relative....
means... if we have two variable like empid & empname...


Correction r welcome
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 Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm
No new posts Difference between -180 and -181 with... deepak_shrivastava DB2 4 Wed Jan 06, 2016 10:00 am


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