Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1188
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 ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us