Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need to capture he value of index of a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
paresh-vartak

New User


Joined: 05 Jan 2007
Posts: 2
Location: mumbai

PostPosted: Fri Mar 23, 2007 12:28 am    Post subject: Need to capture he value of index of a table
Reply with quote

Hi,
I need to know the value of the index which I have used to define in the table.
The table defination is
01 PAYMENT-TABLE.
05 PAYMENT-ENTRY OCCURS 999 TIMES
INDEXED BY
PAYT-NDX.

To knoe the value of index I am moving it in dummy variable like this.
MOVE PAYT-NDX TO WS-DUMMY.

For this I am getting the following compilation error:
"PAYT-NDX" was defined as a type that was invalid in this context.

Let me know how I can check the value in the index.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 23, 2007 12:59 am    Post subject:
Reply with quote

Hello,

To "move" an array index, use SET instead of MOVE.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Mar 23, 2007 1:46 am    Post subject:
Reply with quote

What was the trick? Redefine a usage is index with a pic s9(9) comp or just set to the pic s9(9) comp?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 23, 2007 2:12 am    Post subject:
Reply with quote

Hello,

My guess is that the index in question is not defined as a field.

Usng the SET to a 9(9) COMP field should work as needed. . . . Haven't actually done it today, but seem to reacll doing it before icon_smile.gif
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 Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Incorrect output after build alternat... sandeep kumar302 JCL & VSAM 10 Wed May 02, 2018 2:35 pm
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 12 Tue Apr 17, 2018 10:42 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us