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
 

 

System defined picture clause for an index in an Array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: System defined picture clause for an index in an Array
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Sep 10, 2009 10:14 pm    Post subject: Reply to: System defined picture clause for an index in an A
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Sep 10, 2009 10:35 pm    Post subject:
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    Post subject: Reply to: System defined picture clause for an index in an A
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    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 How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am


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