Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Not enough subscripts or indices were specified

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
swathiravichandran

New User


Joined: 21 Jul 2008
Posts: 19
Location: Mumbai

PostPosted: Fri Sep 26, 2008 5:52 pm    Post subject: Not enough subscripts or indices were specified
Reply with quote

I am getting this following error while compiling my cobol pgm.'Not enough subscripts or indices were specified for "var-1"
1 was assumed for each missing subscript or index'.Plz help me out.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Sep 26, 2008 5:59 pm    Post subject:
Reply with quote

Can you paste your WS section declaration and
code snipet where you are accessing that table?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Sep 26, 2008 6:01 pm    Post subject:
Reply with quote

you are referencing a element var-1 which is part of an internal cobol table definition. depending upon the number of demensions involved, you need 1, 2 or ? subscripts, indicies to properly reference var-1.

this is wrong for a 1 demensional table:
move 'a' to var-1
correct is:
move 'a' to var-1(subscript) or var-1(index)


this is wrong when var-1 is part of a declared second 1 demensional:
move 'a' to var-1(1) or var-1(ws-sub) or var-1(idx-1)
correct is:
move 'a' to var-1(subscript-1, subscript2) or var-1(index1, index2)
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 V9 - Expression indices vadim vashchenko DB2 2 Fri Aug 05, 2011 4:04 am
No new posts Use of subscripts in Easytrieve tables. bijumon CA Products 1 Thu Jul 26, 2007 7:03 pm
No new posts Two dimensional array error as 'Not e... venosol COBOL Programming 1 Mon Mar 26, 2007 10:52 am
No new posts Maximum number of alternate indices karthick sivakumar JCL & VSAM 2 Thu Dec 07, 2006 9:56 am
No new posts Difference between subscripts and ind... ashikrim Mainframe Interview Questions 1 Thu Aug 31, 2006 5:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us