IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Difference between Index variable and normal variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dasan

New User


Joined: 24 Oct 2006
Posts: 10

PostPosted: Sat Nov 11, 2006 4:29 am
Reply with quote

Hi

what is the difference between Index variable and normal variable
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Sat Nov 11, 2006 4:37 am
Reply with quote

An Index variable is a variable defined as a part of u r table index


While a normal variable is a variable used to store data temp..
eg:if u r defining a table(array)

as PLAN-DATA-COUNT OCCURS 10 TIMES indexed bu sub1

so sub1 will keep that count (1 to 10) something like
(sub1=1;sub1<10;sub1++)
Back to top
View user's profile Send private message
dasan

New User


Joined: 24 Oct 2006
Posts: 10

PostPosted: Sat Nov 11, 2006 8:01 am
Reply with quote

Thanks Vm
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Sat Nov 11, 2006 10:23 am
Reply with quote

Hi there,

Few more points...

Index variable can not be use with compute verb.
we can use only
set index-var up by 1
or
set index-var down by 1

Index variable is updated by search.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Cobol file using index COBOL Programming 2
No new posts Timestamp difference and its average ... DB2 11
Search our Forums:

Back to Top