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
 

 

Compiling Problem with the Index field in Table

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

New User


Joined: 04 Aug 2008
Posts: 26
Location: Hyderabad

PostPosted: Thu Nov 20, 2008 7:41 pm    Post subject: Compiling Problem with the Index field in Table
Reply with quote

Hi,

Using CCCA Tool I have converted my Cobol -II prog to Cobol 390.
When I am compiling this converted 390 Prog I am facing the compilation problem with the Index field. Please find the table declaration.

Code:

15 SVCR-SUBL-OF-CORP-TBL-R     REDEFINES 
                    SVCR-SUBL-OF-CORP-TBL
                         OCCURS 6 TIMES   
                         INDEXED BY SOCX.


The error which I am getting is below:
Code:
82800     PERFORM 4210-LOAD-CORP THRU 4210-EXIT                               
82900             VARYING SOCX OF SAVE-ALC-MASTER                             
                                                                               
180-S An index-name was qualified in "SOCX OF SAVE-ALC-MASTER".  The statement
      was discarded.                                                           
                                                                               
83000                          FROM 1 BY 1                                     
83100             UNTIL SOCX OF SAVE-ALC-MASTER > 6.




The compilation went free with COBOL-II but for Cobol -390 we are getting errors.

Please let me know how to resolve this .
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Thu Nov 20, 2008 7:58 pm    Post subject:
Reply with quote

what is SAVE-ALC-MASTER?
Index is not declared in the program, so It should not need qualifier.
TRY coding
Code:
PERFORM 4210-LOAD-CORP THRU 4210-EXIT                               
82900             VARYING SOCX
83000                          FROM 1 BY 1                                     
83100             UNTIL SOCX OF SAVE-ALC-MASTER > 6.
Back to top
View user's profile Send private message
rakeshnaredlla

New User


Joined: 04 Aug 2008
Posts: 26
Location: Hyderabad

PostPosted: Fri Nov 21, 2008 11:35 am    Post subject: Reply to: Compiling Problem with the Index field in Table
Reply with quote

Hi,

SAVE-ALC-MASTER is a group variable which is at 01 level. The same table with SOCX is declared under another group variable ALC-MASTER.
Back to top
View user's profile Send private message
rakeshnaredlla

New User


Joined: 04 Aug 2008
Posts: 26
Location: Hyderabad

PostPosted: Thu Nov 27, 2008 3:47 pm    Post subject: Reply to: Compiling Problem with the Index field in Table
Reply with quote

My requirement is to use the SOCX field of SAVE-ALC-MASTER. Please tell me the way to use this index field. Also the SAVE-ALC-MASTER and ALC-MASTER are copy book fields....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8004
Location: Bellevue, IA

PostPosted: Thu Nov 27, 2008 4:44 pm    Post subject:
Reply with quote

Quote:
My requirement is to use the SOCX field of SAVE-ALC-MASTER.
Let's try this again ... the error message is telling you that SOCX as an index field cannot be qualified .. that is, you cannot say SOCX OF SAVE-ALC-MASTER. COBOL is quite clear on this. Either use SOCX as an unqualified field, or change your code to use some other field instead. But do not keep insisting you have to use that one qualified field -- COBOL isn't going to let you do so.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Nov 27, 2008 5:54 pm    Post subject:
Reply with quote

SOCX is an index data item. it is not a field..... As Robert has attempted to tell you, you can not qualify an index data item.

Also:
This code will not compile under COBOL II either:
Code:

PERFORM 4210-LOAD-CORP THRU 4210-EXIT                               
           VARYING SOCX OF SAVE-ALC-MASTER                             
                          FROM 1 BY 1                                     
             UNTIL SOCX OF SAVE-ALC-MASTER > 6.
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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 4 Thu Mar 30, 2017 10:34 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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