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
 

 

Move Index To WS-Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Move Index To WS-Variable
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: 686
Location: Earth

PostPosted: Mon Feb 18, 2008 1:49 pm    Post subject:
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    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Mon Feb 18, 2008 2:45 pm    Post subject:
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    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Mon Feb 18, 2008 3:52 pm    Post subject:
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    Post subject:
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: 686
Location: Earth

PostPosted: Tue Feb 19, 2008 1:36 pm    Post subject:
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    Post subject:
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: 686
Location: Earth

PostPosted: Tue Feb 19, 2008 7:34 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Feb 19, 2008 7:58 pm    Post subject:
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    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 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
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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