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
 

 

Facing error IGYPS0037-S

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

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Wed Jun 01, 2016 4:36 pm    Post subject: Facing error IGYPS0037-S
Reply with quote

Hi, Could someone help me in resolving the below error

I am referring the sales data item in the following way in program but facing the error 'Sales' was not a uniquely defined name

Move ws-sales to sales of Dept.
Move ws-sales to sales of Area.


Code:
01 Company PIC X(10).
01 State PIC X(10).
01 Dept.
   05 DeptId  PIC X(02).
   05 Sales   PIC X(10).
   05 County.
      10 Division.
         15 DivisionCode PIC X(04).
         15 Sales           PIC X(10).
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 01, 2016 5:59 pm    Post subject: Reply to: Facing error IGYPS0037-S
Reply with quote

To differentiate one from another, try this qualification -
Code:

SALES OF DIVISION OF COUNTY
SALES OF DEPT

HTH....
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Wed Jun 01, 2016 6:12 pm    Post subject:
Reply with quote

Have tried as per you suggestion

Facing error 'Sales' was not a uniquely defined name on the statement

Move ws-sales to sales of Dept

But there is no error highlighted for the statement

Move ws-sales to sales of Division of County
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Jun 01, 2016 6:24 pm    Post subject:
Reply with quote

SALES OF DEPT is not enough to uniquely qualify the variable -- there are two SALES variables under DEPT. You are either going to (1) HAVE to change one of the SALES variable names, or (2) add a unique group name and place the 05-level SALES under that group name so you can uniquely reference it. SALES OF DIVISION OF COUNTY is a uniquely qualified variable name -- there is only one SALES variable under DIVISION and COUNTY, hence no error. SALES OF DIVISION or SALES OF COUNTY would also work to uniquely qualify the variable.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Wed Jun 01, 2016 6:54 pm    Post subject: Reply to: Facing error IGYPS0037-S
Reply with quote

Defining 05 Sales as 05 DeptSales and 15 Sales as 15 DivisionSales would eliminate having to qualify Sales.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Wed Jun 01, 2016 7:02 pm    Post subject:
Reply with quote

Thanks all!! In my scenario, the data names cannot be changed hence I will add a unique group name to overcome the issue
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed Jun 01, 2016 10:47 pm    Post subject:
Reply with quote

Quote:
the data names cannot be changed
Why ? that's the corrective action than changing the whole program. Also Division looks a reserved word.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Thu Jun 02, 2016 10:40 am    Post subject:
Reply with quote

Apologies. It was my mistake not providing the code correctly. This is the code snippet

Code:
05 Sales-Data-County occurs 10 times.
 10 Amount PIC 9(09)
 10 Date PIC X(10)

05 Sales-Data-Area occurs 10 times
 10 Amount PIC 9(09)
 10 Date PIC X(10)


Now, when I am moving values to the field I am facing the following error IGYPS2072-S "OF" was invalid

Move ws-amount to Amount(ws-sub1) of Sales-Data-County
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Jun 02, 2016 11:13 am    Post subject: Reply to: Facing error IGYPS0037-S
Reply with quote

I suggest you consult the manual to see how to correctly qualify an item that is subscripted.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Thu Jun 02, 2016 3:18 pm    Post subject:
Reply with quote

It worked fine when I modified it as
Move ws-amount to Amount of Sales-Data-County(ws-sub1). Thanks All
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


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