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

Error in Array: Not a uniquely defined name


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Tue Jan 02, 2007 12:13 pm
Reply with quote

I'm getting one simple problem but its pestering me right now? can you give me any conclusion here?

Copy book RB1PARTS


Two times define in working-storage section.


Code:
 /                                   
      05  W-SAVE-RB1PARTS.           
          COPY RB1PARTS.             
 /                                   

Code:
                       
  01  RB1PARTS.         
      COPY RB1PARTS.   
      COPY SB1PARTS.   
 /                     



copybook containes table rb1parts-current.

Code:
 20  RB1PARTS-ANTI-THEFT-LABEL-IND     PIC 9.                 
 20  RB1PARTS-FUNC-MATRIX.                                   
     30  RB1PARTS-CURRENT  OCCURS 6   TIMES.                 
         40  RB1PARTS-PLANT            PIC X(3).             
         40  RB1PARTS-SELLDOWN-IND     PIC 9.                 
     30  RB1PARTS-FUTURE-PLANT  OCCURS 6   TIMES  PIC X(3).   
 20  RB1PARTS-MATRIX-CHNG-DATE         PIC S9(07) COMP-3.     


In program I am varying that variable like below

Code:
                                                   
  IF RB1PARTS-MR-PLANT OF RB1PARTS > SPACES         
        MOVE RB1PARTS-MR-PLANT OF RB1PARTS         
                                   TO W-OUT-LOC     
  ELSE                                             
        PERFORM VARYING W-SUB FROM +1 BY +1         
          UNTIL RB1PARTS-PLANT(W-SUB)               
          OF W-SAVE-RB1PARTS > SPACES               
          AND RB1PARTS-SELLDOWN-IND(W-SUB)         
          OF W-SAVE-RB1PARTS                       
        NOT EQUAL 1 OR C-SUB-MAX                   
        MOVE RB1PARTS-PLANT(W-SUB)                 
          OF W-SAVE-RB1PARTS TO W-OUT-LOC           
        END-PERFORM                                 
                                                   
        IF W-OUT-LOC = SPACES                       
          PERFORM VARYING W-SUB FROM +1 BY +1       
           UNTIL RB1PARTS-FUTURE-PLANT(W-SUB)       
             OF W-SAVE-RB1PARTS > SPACES           
             OR C-SUB-MAX                           
          MOVE RB1PARTS-FUTURE-PLANT(W-SUB)         



But Getting following error. Why?

Code:

                                                                             
         IF RB1PARTS-MR-PLANT OF RB1PARTS > SPACES                           
               MOVE RB1PARTS-MR-PLANT OF RB1PARTS                           
                                          TO W-OUT-LOC                       
         ELSE                                                               
               PERFORM VARYING W-SUB FROM +1 BY +1                           
                 UNTIL RB1PARTS-PLANT(W-SUB)                                 
                                                                             
-S "RB1PARTS-PLANT" was not a uniquely defined name.  The definition to be   
   used could not be determined from the context.  The reference to the name
   was discarded.                                                           
                                                                             
-S Expected a reference-modification specification but found ")".  The       
   "PERFORM" statement was discarded.                                       
                                                                             
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jan 02, 2007 12:51 pm
Reply with quote

Hi There,

You need to specify reference sinc eu r having the copy book declaration two times in ur program so if u want to access RB1PARTS-PLANT then u have to specify RB1PARTS-PLANT(W-SUB) of W-SAVE-RB1PARTS if u want to access that variable or u have to give RB1PARTS-PLANT(W-SUB) of RB1PARTS.

Hope it will helpful.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Jan 02, 2007 2:24 pm
Reply with quote

guptae wrote:
You need to specify reference sinc eu r having the copy book declaration two times in ur program so if u want to access RB1PARTS-PLANT then u have to specify RB1PARTS-PLANT(W-SUB) of W-SAVE-RB1PARTS if u want to access that variable or u have to give RB1PARTS-PLANT(W-SUB) of RB1PARTS.
Close but no cigar... icon_smile.gif
Small code change:
Code:
        PERFORM VARYING W-SUB FROM +1 BY +1         
          UNTIL RB1PARTS-PLANT               
          OF W-SAVE-RB1PARTS (W-SUB) > SPACES               
The subscript needs to be after the name qualification.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Tue Jan 02, 2007 4:23 pm
Reply with quote

Thanks all for the reply;;;;;;;;;

William has done great work....

Thanks 1ce again.....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Jan 02, 2007 4:46 pm
Reply with quote

Actually, a "no brainer"...
Code:
         ELSE                                                               
               PERFORM VARYING W-SUB FROM +1 BY +1                           
                 UNTIL RB1PARTS-PLANT(W-SUB)                                 
                                                                             
-S "RB1PARTS-PLANT" was not a uniquely defined name.  The definition to be   
   used could not be determined from the context.  The reference to the name
   was discarded.
.. if you pick up on the clues, the error was listed even before the compiler bothered to read past the subscript to the reference.... icon_lol.gif
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Tue Jan 02, 2007 6:12 pm
Reply with quote

Yes; you r absolutely right......

But again now subitting run jcl , its giving IMS code AC....

now searching on this....
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 02, 2007 7:03 pm
Reply with quote

creator.abhishek wrote:
Yes; you r absolutely right......

But again now subitting run jcl , its giving IMS code AC....

now searching on this....


FYI, there is an IMS frorum too which is the right one to post IMS problems icon_wink.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 02, 2007 7:07 pm
Reply with quote

The link in my signature might be of help: search for 'status code' over there.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Wed Jan 03, 2007 7:39 pm
Reply with quote

This problem is related to previous problem. compile listing done successfully fo rarray problem but, in testing phase i am getting problem like given below....


I did the coding in endevor element as per TDD(test version).

in testing of it, i am running into abends u0000 and AC.

I think,

U00 is found when table is empty or deleted.

In pgm, data is been retrieved from input file based on some criteria, to feed the output file ....

The error found where is GU call for database in program i.e. SSA's values are varying for it.



Code:
 
JOBNAME: XXXXXTT  USER ABEND: 0000             AHIN      2007/01/03  06:16:11

   At Address. . . . . . . . : 0001A648                                         

   PCB Name. . . . . . . . . : n/a                                             

   Relative PCB Number . . . : 2                                               

   PCB Type. . . . . . . . . : Data Base or Online                             

   Data Base Name. . . . . . : TDBDPB11                                         

   Segment Level . . . . . . : 01                                               

   Status Code . . . . . . . : AC                                               

   Processing Options. . . . : GOP                                             

   Segment Name. . . . . . . : RB1PARTS                                         

   Number of Segments. . . . : 2                                               

   Key Feedback Length . . . : 8                                               

   Key Feedback Data . . . . : 40404040 40404040   *        *                   

                                                                               

   JCB DL/I Call Trace (Most recent call first):                               

       Call                    Status                                           

     # Code Description        Code    Description                             

     1 01   GHU or GU          AC      Hierarchic error in SSAs.               

     2 90   PURGE              X'..85' n/a   
 
 
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Jan 04, 2007 2:33 am
Reply with quote

No relation to your array problem at all imho. You've made an error in the G(H)U-call you made. It has to do with the SSA's you use. The DL/I Call Trace you posted proved that. In order to find out decently, and let other people learn too, please post in the IMS DB/DC forum including the DBD, PSB and DLI-call at stake.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Jan 04, 2007 4:41 am
Reply with quote

Second thought: may be the content of the SSA you supplied to IMS is not what you think it was. Could indeed be an array error caused by unprotected borders of your table. This can happen if your subscript decreases 1 ( zero or less) or is higher than your upper border. In both cases the SSA-declaration may be overwritten in memory. The real SSA-value you offered IMS may be found in the dump. We will need the real value to solve your problem.
Back to top
View user's profile Send private message
creator.abhishek

New User


Joined: 07 May 2006
Posts: 32
Location: Pune

PostPosted: Thu Jan 04, 2007 12:33 pm
Reply with quote

Hi Bitneuker

i will update it there soon!!!!!!!!!!!

Can you elaborate more your second thought.

You mean to say i am varring subscript with condition 1 or c-sub-max, is that problem?

I gave c-sub-max = 6,,,

I tried by removing it.. then also same error is getting.........

also i changed copybook from w-save-rb1parts to rb1parts in coding then also that abend is behaind me........


whereas some more thing abt this :

IMS CHECKPOINT output

Code:
                                                                       
 UPDATE SUCCESSFUL! NEW VALUES ARE:                                     
 CONTROL NUMBER = 1999        CHANGE INDICATOR         = CLI             
 PSB NAME       = FREE        CHANGE/RUN DATE (YYMMDD) = 070104         
 CHKPT LIMIT    = 0000010     PREVIOUS CHKPT LIMIT     = 0000000         
 CHKPT PREFIX   = BML         CHKPT PREFIX ACTUAL      = BML             
 RUN NUMBER     = 6           PREVIOUS RUN NUMBER      = 5               
 CHKPT NUMBER   = 0000        PREVIOUS CHKPT NUMBER    = 0001           
 CHECKPOINT ID  = BML60000    LIMIT CHANGED (YYMMDD)   = 070102         
 CHNG ID = XXXX   







Spool Output

Code:

**************** PGM NAME ****************                                     
 DMRPD84  ABENDED IN SECTION  S0600-01                                         
 STATUS CODE:  AC                                                               
                                                                               
 ************ DATA BASE/TP STATISTICS ***********                               
 TDBDPB1101ACGOP   w RB1PARTS                                                   
 CEE3250C The system or user abend U 000 R=NULL     was issued.                 
          From compile unit DMRPD84 at entry point DLITCBL at compile unit offse
          at address 1C8070EA.             



Error is here in program, that code is from production itself, i am not doing any change here.
Code:

    IF W-DEALER-ORG-CODE                               
        MOVE RB1PARTS-PART-NBR-KEY                     
           OF W-SAVE-RB1PARTS TO RB1PARTSSSA-KEYVALU   
        MOVE C-DEALER         TO RB1CPRICSSA-KEYVALU   
                                                       
    DISPLAY 'ABHI W-SAVE-RB1PARTS: ' W-SAVE-RB1PARTS   
                                                       
        MOVE 'S0600-01'       TO W-DUMP-ID             
        PERFORM S7400-GU-RB1CPRIC                     

Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Jan 04, 2007 3:09 pm
Reply with quote

Please extend the display with the complete SSA's to find out if some working storage has been screwed up. In addition post the DLI-call, DBD and PSB to find out if the call fits the structure of your DB..

and please.......switch to the IMS DB/DC forum; we will proceed there.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 09, 2007 7:42 pm
Reply with quote

Hi Abhishek? Sharma,

Would you be so kind as to inform us about the status of your problem?
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top