View previous topic :: View next topic
|
Author |
Message |
Ganesh K Rajan
New User
Joined: 13 May 2005 Posts: 7
|
|
|
|
Hi,
In mainframe Cobol the array starts with 0 or with 1
Rgs,
Ganesh.K |
|
Back to top |
|
|
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
it starts with 1. |
|
Back to top |
|
|
Ganesh K Rajan
New User
Joined: 13 May 2005 Posts: 7
|
|
|
|
Deepa,
Wont it start with 0???? |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
no it starts with 1. |
|
Back to top |
|
|
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
To my knowledge It starts with 1.
if you try storing some value in Array(0) it will produce erroneous results |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
i thnk it will give OC7 when u try to access array(0)....as i faced once the same. |
|
Back to top |
|
|
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
i don't think you will get a soc7 while accessing it. the data willnot get stored as expected. still u can display them. May be u got SOC7 while doing some manipulations with it. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
i was getting when some how program was moving array(0) to a another working storage varibale, since that area is not defined and u r trying to access it, so in that case won't it give OC7?? Please clarify my doubt... |
|
Back to top |
|
|
avalanches
New User
Joined: 10 May 2005 Posts: 28
|
|
|
|
Hi,
S0C7 can happen due to
1. Numeric operation on Non-numeric data
2. Un-initialized working-storage
3. Coding past the min/max allowed subscript
4. etc.
The move you had mentioned could belong the the 1) category in the above list.
Please correct if I'm wrong.
Cheers,
avalanches. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
hi avalanches,
you are correct.I think that was happening what you had mentioned in 3rd point. well i think now Ganesh K Rajan's doub't is solved.
any comment are always welcome.... |
|
Back to top |
|
|
|