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
 

 

Error "IGYPS2121-S" with COPY REPLACING verb

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

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Tue Feb 13, 2007 8:01 pm    Post subject: Error "IGYPS2121-S" with COPY REPLACING verb
Reply with quote

Hi,

I am receiving the following error "IGYPS2121-S" while trying to use the COPY REPLACING ... BY ... statement. I am trying to replace a part of the string in all the members of the group of an existing COPY BOOK.

Can you help me with it.


Thanks,
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Tue Feb 13, 2007 8:08 pm    Post subject:
Reply with quote

It would help if you posted the statement in error and a bit of the copybook.....
Back to top
View user's profile Send private message
kitts

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Tue Feb 13, 2007 8:24 pm    Post subject:
Reply with quote

Hi William,

Here is the copy book i am using

COPY RXYZESS REPLACING == RXYZ == BY == RXYA ==.

01 RXYZESS.
04 RXYZ-ABCD PIC X(4).
04 RXYZ-SEP PIC X.
04 RXYZ-KOP.
08 RXYZ-KIR PIC 99.

Below is the message received

IGYPS2121-S "RXYA-SEP" was not defined as a data-name. The statement was discarded.

Thanks,
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Feb 13, 2007 8:54 pm    Post subject:
Reply with quote

A procedure division error, what does the generated copybook look like in the compile listing?
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Tue Feb 13, 2007 9:06 pm    Post subject:
Reply with quote

Does this help?


Message Format: IGYPP2121-S "XXXX" WAS NOT DEFINED AS A DATA-NAME. THE STATEMENT WAS DISCARDED.

Description: The format and syntax requirements of the indicated
statement require that a data-name appear where the item
indicated by the XXXX's in the message text was found.
The indicated item is not a data-name. The indicated
statement was ignored.

User Action: Respecify the indicated statement so that a data-name
is coded where the indicated item now appears.
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: Tue Feb 13, 2007 10:25 pm    Post subject:
Reply with quote

Hello,

Please post the actual COPY/REPLACING statements in addition to the copybook . The example posted shows what is intended but is not "real" code.

My guess is that the COPY syntax needs to be looked at.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Feb 13, 2007 10:48 pm    Post subject:
Reply with quote

If there is any accuracy in what you entered:
COPY RXYZESS REPLACING == RXYZ == BY == RXYA ==.
there is no " RXYZ " in:
04 RXYZ-ABCD (for instance)
but there is "RXYZ-" so maybe:
COPY RXYZESS REPLACING ==RXYZ-== BY ==RXYA-==.
might wortk better. icon_smile.gif
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: Tue Feb 13, 2007 11:38 pm    Post subject:
Reply with quote

Hi Bill,

Must be wearing my "duuhh" eyes today.
Quote:
there is no " RXYZ " in:
04 RXYZ-ABCD (for instance)
but there is "RXYZ-" so maybe:

Hmmm. . . I know i'm missing something. Looks like there is an RXYZ . .?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Feb 13, 2007 11:44 pm    Post subject:
Reply with quote

Only if his typing was accurate.....BTW, do you know if the leading blank could have been left in to "tighten" the selection process? I wasn't sure so I excluded it from my example. icon_confused.gif
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: Wed Feb 14, 2007 12:46 am    Post subject:
Reply with quote

Hi Bill,

In my Fine Manual, i see these examples:
Code:

COPY PAYLIB REPLACING ==:TAG:== BY ==Payroll==.

and
Code:

COPY xxxx REPLACING ==(01)== BY ==(01)==
                    == 01 == BY == 05 ==.


It looks like alpha fields should not have a space between the == and the value, but "pure" numbers should.

If Kitts will post the actual code, we can probably be more help. . .
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: Wed Feb 14, 2007 1:05 am    Post subject:
Reply with quote

Ooops,

In my previous post, this
Quote:
It looks like alpha fields. . .

should read

"It looks like alpha values. . . ."

Apologies for the bad wording.
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 Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts replacing junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


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