View previous topic :: View next topic
|
Author |
Message |
kkxlnc
New User
Joined: 12 Jun 2005 Posts: 44 Location: Boston
|
|
|
|
Hi All,
I have query with the indexed variable in COBOL with OCCURS clause.
How does system take care of the variable used for INDEXING in OCCURS clause? I want to know where it is defined in the system and what is it PIC clause?
eg: 01 TAB-NAME OCCURS 5 TIMES INDEXED BY I.
So, here where is I defined exactly when we are not declaring it in the COBOL program and what is its PIC clause? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi KKM,
Similar to RETURN-CODE, an INDEX is not explicitly defined. It's implicit definition is PIC S9(009) COMP. But I don't think it defines the table size limit, I think that is 8Meg. |
|
Back to top |
|
|
harinatha
New User
Joined: 24 Jul 2005 Posts: 28
|
|
|
|
Hi Jack,
Then what is PIC Clause for RETURN-CODE?
Thanks & Regards,
Hari. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Hari,
From the eCOBOL pgmg ref manual:
S9(4) USAGE BINARY VALUE ZERO |
|
Back to top |
|
|
prasanth_thavva
New User
Joined: 28 Jul 2005 Posts: 86 Location: Chennai
|
|
|
|
hi ,
internally index register is maintained for each occurs --- indexed by i...
so we dont need to declare it...
note down ur syntax is wrong
O1 ...OCCURS INDEXED BY I
IN 01 a pic x(10) it is wrong to code occurs in 01 level plz correct it...
ok ,, |
|
Back to top |
|
|
harinatha
New User
Joined: 24 Jul 2005 Posts: 28
|
|
|
|
Hi Jack,
In the following line, Which u posted
S9(4) USAGE BINARY VALUE ZERO
only two types of usage
1)Computationly(COMP,COMP-1,COMP-2,COMP-3)
2)Display (Which is default)
Usage Binary is not there(according to my knowledge).
Correct me if Iam wrong. |
|
Back to top |
|
|
|