Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regarding Index Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Regarding Index Variable
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Re: Regarding Index Variable
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    Post subject: wht is Diff between cobol and vscobol11
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    Post subject:
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    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 SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us