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

Facing Error IGYPS2072-S


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
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 7:12 pm
Reply with quote

Hi,

Can anyone help with this

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

01 Sales-Data-County occurs 10 times
05 Amount PIC 9(09)
05 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

Not sure why its not working for an internal table element.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 01, 2016 7:29 pm
Reply with quote

Sigh. You have the same 01 level names -- how can you uniquely identify anything in either 01 level? And if you change one of the names to make them unique, how do you identify which of the 10 occurrences of the 01 level variable you are referring to?

Are you even bothering to test this code before you post? Enterprise COBOL does not support OCCURS on the 01 level, nor does it allow use of DATE as a variable name.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2572
Location: NYC,USA

PostPosted: Wed Jun 01, 2016 10:54 pm
Reply with quote

Duplicate of this
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Secondary index error while loading d... IMS DB/DC 2
No new posts Error 0C1 Reason Code 1 with branch i... PL/I & Assembler 3
No new posts Getting error while xped JCL & VSAM 10
No new posts can someone please help me in finding... IBM Tools 9
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10
Search our Forums:

Back to Top