View previous topic :: View next topic
|
Author |
Message |
royalchm
New User
Joined: 15 Nov 2007 Posts: 29 Location: Bangalore
|
|
|
|
can we use subscript for an index array???
02 array1 occurs 10 times index by index1.
03 element1 pic x(1)
can we use sub1 for element1????
means element1(sub1) is valid??? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
royalchm wrote: |
can we use subscript for an index array???
02 array1 occurs 10 times index by index1.
03 element1 pic x(1)
can we use sub1 for element1????
means element1(sub1) is valid??? |
That would depend on the definition of sub1!!! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
So so so so so so so so so so so ...
EASY TO TEST.
How lazy can you possibly be? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
DB2 ? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Yeah - I saw the DB2 also, but just picked my favorite rant to leave some low hanging fruit for everyone else. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Quote: |
02 array1 occurs 10 times index by index1. |
This won't even compile. You're missing the DEPENDING ON clause.
Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Actually, the
Quote: |
02 array1 occurs 10 times index by index1. |
won't compile, but it's because INDEX is a reserved word and the statement should be
Code: |
02 array1 occurs 10 times indexed by index1. |
DEPENDING ON is optional. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Read it too fast. Thought it said OCCURS 1 TO 10 TIMES....
Bill |
|
Back to top |
|
|
|