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

System defined picture clause for an index in an Array


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

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Thu Sep 10, 2009 10:02 pm
Reply with quote

Hi all,

I have a small query regarding index in an array.

I just want to know how the system will allocates the picture clause for index in an array.

scenario 1.

01 group-item.

05 temparature occurs 50 times pic 9(2) indexed by x1.

scenario 2

01 group-item.

05 temparature occurs 350 times pic 9(2) indexed by x2.


In Scenario 1 and Scenario 2 we don't define the pic clause for x1 & x2.
the system will allocate the memory.

but how the system will define the pic clause for x1 and x2 as per the above senarios.

thanks & Regards,
sreenivasulu G.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Sep 10, 2009 10:14 pm
Reply with quote

They are implicitly defined as aligned binary fullwords (COMP SYNC) and are used primarily in register notation calculations.

If you generate the Assembler expansion of a COBOL program which contains INDICES you'll find their usage.

But again, they don't have an explicit PICTURE clause.

Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 10, 2009 10:35 pm
Reply with quote

Quote:
but how the system will define the pic clause for x1 and x2 as per the above senarios.
The system (i.e., COBOL) will not define any picture for them -- it knows what an index is and allocates 4 bytes (one full word) for the index value.
Back to top
View user's profile Send private message
sreenigacc

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Thu Sep 10, 2009 11:55 pm
Reply with quote

Bill and Robert,

Thank you very much for your response.

Thanks
sreenivasulu
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 Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Cobol file using index COBOL Programming 2
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
Search our Forums:

Back to Top