View previous topic :: View next topic |
Author |
Message |
edkir98 Beginner

Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Wed Oct 10, 2007 7:19 am Post subject: Cobol Internal Table |
|
|
Code: | 05 WS-CRIT-TABLE OCCURS 2000 TIMES
ASCENDING KEY WS-CRIT-JOB-NAME
INDEXED BY CRIT-IX.
10 WS-CRIT-JOB-NAME PIC X(8) VALUE SPACES. |
I'm using this code to create an internal table with 2000 occurences of WS-CRIT-JOB-NAME. SEARCH, SEARCH ALL and all the table functions are working fine. I am able to read from the table, update and do everything.
But the problem is it creates only 1000 occurences. I tried increasing it to OCCURS 4000 TIMES, even then it is creating only 1000 occurences. I did a trace on this program and even there in the working storage section it has allocated only upto WS-CRIT-JOB-NAME[1000]. When I try to move beyond 1000, it says "Subscript out of Range". I am using
WS-CRIT-JOB-NAME(WS-I) to access this table and ws-i is defined with 9(08). _________________ Thanks |
|
Back to top |
|
 |
edkir98 Beginner

Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Wed Oct 10, 2007 7:23 am Post subject: |
|
|
contd..
WS-CRIT-JOB-NAME(WS-I) to access this table and ws-i is defined with
9(8) _________________ Thanks |
|
Back to top |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Wed Oct 10, 2007 7:34 am Post subject: |
|
|
edkir98 wrote: | contd..
WS-CRIT-JOB-NAME(WS-I) to access this table and ws-i is defined with
9(8) | Preview then disable smiles.... |
|
Back to top |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Wed Oct 10, 2007 7:37 am Post subject: |
|
|
Exactally who is saying"Subscript out of Range"?
Runtime error? Message number? Abend?
Compile time error? Message number?
Any message number? |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Wed Oct 10, 2007 7:42 am Post subject: |
|
|
edkir98,
Try creating the same table as variable length table using DEPENDING ON clause. _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
edkir98 Beginner

Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Wed Oct 10, 2007 8:14 am Post subject: |
|
|
CICS Guy,
Trace Master is showing up this "Subscript Out of Range" error when WS-I becomes more than 1000. But the job is not abending
vivek,
Your suggestion is working.. Thanks.. But what difference would it have made? I dont understand. Can u explain _________________ Thanks |
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Wed Oct 10, 2007 2:43 pm Post subject: |
|
|
Why are you defining this table with an index but accessing it with a subscript? Which one are you using to load the table? _________________ ....Terry |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Sat Nov 10, 2007 9:51 am Post subject: |
|
|
Hi Ed,
Are you sure the table was loaded in WS-CRIT-JOB-NAME order? _________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sat Nov 10, 2007 5:01 pm Post subject: |
|
|
are you not getting somekind of warning? about the value clause: Code: | 10 WS-CRIT-JOB-NAME PIC X(8) VALUE SPACES. |
_________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|