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

Move Index To WS-Variable


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

New User


Joined: 28 Nov 2006
Posts: 3
Location: pune

PostPosted: Mon Feb 18, 2008 12:55 pm
Reply with quote

Hi,

I want to move a Table Index to a normal WS-Variable.

E.g.

MOVE TAB-IDX TO WS-IDX.

It might be possible that Index will go up to 13K.
Is it possible to do so?

If yes, Please suggest how.....and if not please provide any other way to do so....

- Jamirahmad.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Feb 18, 2008 1:49 pm
Reply with quote

Quote:
I want to move a Table Index to a normal WS-Variable.

Use SET instead of MOVE.
Back to top
View user's profile Send private message
jamirahmad
Currently Banned

New User


Joined: 28 Nov 2006
Posts: 3
Location: pune

PostPosted: Mon Feb 18, 2008 2:03 pm
Reply with quote

Is it like below specified :

SET TAB-IDX TO WS-IDX.

It will SET value of TAB-IDX to WS-IDX. Is it correct?

If not could you please provide me an Example? That will be Helpful for me.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Feb 18, 2008 2:45 pm
Reply with quote

examples are found in any cobol manual under procedure division, look for 'SET'.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Mon Feb 18, 2008 3:07 pm
Reply with quote

Hi,

Following can be used for this

Code:

01 WS-INDX            USAGE IS INDEX.

   SET       WS-INDX       TO   INDEX.



Variables with USAGE display cannot be used to hold Value of an index.


Cheers! icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Feb 18, 2008 3:52 pm
Reply with quote

star_dhruv2000,

you have provided a very good example of why I told jamirahmad to read the manual.
Back to top
View user's profile Send private message
jamirahmad
Currently Banned

New User


Joined: 28 Nov 2006
Posts: 3
Location: pune

PostPosted: Mon Feb 18, 2008 5:18 pm
Reply with quote

Thanks Dhruv and Dick for a Solution.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Feb 19, 2008 1:36 pm
Reply with quote

Quote:
Thanks Dhruv and Dick for a Solution.

icon_confused.gif icon_confused.gif icon_confused.gif

Quote:
I want to move a Table Index to a normal WS-Variable.

I guess this was the original question. Was it Dhruv2000's solution that worked? I bet it was not what you wanted. In fact that post is completely irrational.
Dick's post after Dhruv2000's post was SARCASTIC.. You should have known that.

We encourage newbie's to look in to the manual because it will help them in solving their problems on their own. Spoon feeding won't do any good.
It is a pity that mainframers like you can not take a look in to a manual.
Jamir and Dhruv,
Please access this link and get your concepts right.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Tue Feb 19, 2008 7:22 pm
Reply with quote

agkshirsagar,

Quote:
Was it Dhruv2000's solution that worked? I bet it was not what you wanted. In fact that post is completely irrational.


Quote:
Dick's post after Dhruv2000's post was SARCASTIC..



Thanks for the update. I am glad to get this information. This is indeed a good link.

But it will be good if you post your answers than commenting someone elses.

Thanks!
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Feb 19, 2008 7:34 pm
Reply with quote

Quote:
But it will be good if you post your answers than commenting someone elses.

I have already answered the question, look at my first post in this thread.
And in my last post I have given the link to fine manual. What else do you expect?
If you didn't see my post, then it's not my problem.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Tue Feb 19, 2008 7:48 pm
Reply with quote

[/quote]If you didn't see my post, then it's not my problem.
Quote:


I know you did and thanks for that. It's really great of you to spare some time for novice users like us.

Cheers! icon_smile.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Feb 19, 2008 7:58 pm
Reply with quote

agkshirsagar wrote:
I have already answered the question, look at my first post in this thread.
And in my last post I have given the link to fine manual. What else do you expect?
Why didn't you just provide the link in the first post?
Use SET instead of MOVE.

And, will you two quit 'snipe'ing at each other.....
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts CA7 count with DATE variable CA Products 0
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 - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
Search our Forums:

Back to Top