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

Regarding Index Variable


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

New User


Joined: 20 Jun 2005
Posts: 26
Location: Hyderabad

PostPosted: Sat Oct 01, 2005 12:15 pm
Reply with quote

Hi ,

Regarding INDEX variable used in occurs clause

05 Var1 occurs 5 times indexed by N
06 var2 pic x(2) ----------> First


05 Var3 occurs 5 times
06 Var4 pic x(2) ----------->Second


Can the INDEX variable declared In First can be used in the Second Declaration
can it be used if picture clause is Different ????

Can some one help me out regarding this
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Sat Oct 01, 2005 12:44 pm
Reply with quote

Hi,
An index name (N,in your code) need not be declared separately.Also PICTURE clause is not specified when an index data item is declared ie when the USAGE is index.
Regards,
Sridevi.
Back to top
View user's profile Send private message
nal_satish

New User


Joined: 20 Jun 2005
Posts: 26
Location: Hyderabad

PostPosted: Sat Oct 01, 2005 12:47 pm
Reply with quote

Hi Sridevi,

U Didnot get my Question.
I am not asking regarding the declaration of Index

I am asking that the index in first which is pointing to the first can be used for the second occurs clause


Thanks & Regards,

Satish.N
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Sat Oct 01, 2005 1:07 pm
Reply with quote

Hi,
Even now your question is NOT that clear.But still...assuming you spoke about index names.Yep,index name of one table can be used in another table.

Regards,
Sridevi.
Back to top
View user's profile Send private message
nal_satish

New User


Joined: 20 Jun 2005
Posts: 26
Location: Hyderabad

PostPosted: Sat Oct 01, 2005 1:12 pm
Reply with quote

Hi,

Suppose using index-1 i have searched till some 5 th occurence
the same index can i use parallely in another search also .


Still not clear can u call me at 9885377332

Satish.
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Tue Oct 04, 2005 10:42 am
Reply with quote

Another table's index name can be used in search's VARYING option.So ,I guess,you can use index name from one search to another.
Sorry,I wish/prefer to communicate only through this website.
Regards,
Sridevi.
Back to top
View user's profile Send private message
naga821

New User


Joined: 16 Mar 2005
Posts: 5

PostPosted: Tue Oct 04, 2005 11:11 am
Reply with quote

Hi
could u let me for this wht is Diff between cobol and vscobol11 query
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Mon Oct 10, 2005 8:51 pm
Reply with quote

hi satish

in your case you can do it

only that the index variable can be used for another table means

if both table description have same number of element,and the element tables have same length.



thank's
thanooz
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 Variable Output file name DFSORT/ICETOOL 8
No new posts Cobol file using index COBOL Programming 2
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top