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
 

 

Copy Replacing error IGYDS1089-S
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Thu Jul 07, 2011 8:04 pm    Post subject: Copy Replacing error IGYDS1089-S
Reply with quote

Hi,

I am trying to use the COPY REPLACING in my program. But, it is throwing some error. I guess this is because of the compiler which I am using.. Could anyone pls confirm and guide me what the compiler version needs to be used to support Relacing.

000108 01 WS-PONRCREF-LINKAGE.
000109 COPY PONRCREF REPLACING ==icon_razz.gif:== BY ==WS==.

It gave the error as

01 WS-PONRCREF-LINKAGE.
05 icon_razz.gif:-PONEFC-ENTRY.

==000109==> IGYDS1089-S "05" WAS INVALID. SCANNING WAS RESUMED AT THE NEXT AREA "A" ITEM, LEVEL-NUMBER, OR THE START OF THE NEXT CLAUSE.

Why the icon_razz.gif: is not replaced with WS. Please guide me.

Cobol Version: IBM ENTERPRISE COBOL FOR Z/OS 3.4.1
Compiler Version: I am not sure, how to find the compiler version.

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

Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 8:21 pm    Post subject:
Reply with quote

COPY REPLACING has been around for many, many years so if you're using Enterprise COBOL, COPY REPLACING is part of it.

Be aware that COPY REPLACING does not do text replacement like a word processor. It does token replacement: variable names, things surrounded by a colon (or other special character), but not part of a variable name.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Thu Jul 07, 2011 8:29 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Yes Rob,

I used it for Token Replacement. I just trying to replace the icon_razz.gif: to WS. Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 8:39 pm    Post subject:
Reply with quote

If you used it for token replacement, what was the starting character for the token? The starting and ending characters for the token MUST be the same -- colon, for example. Your original post is NOT using token replacement but string replacement, which does not work with COPY REPLACING.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 8:41 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

And by the way,
Quote:
Cobol Version: IBM ENTERPRISE COBOL FOR Z/OS 3.4.1
Compiler Version: I am not sure, how to find the compiler version.
tells you the compiler version -- 3.4.1
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Thu Jul 07, 2011 8:52 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

The token is showing as a symbol after my post.
My Token is : and without spaces P and : and I am trying to replace it as WS..

01 WS-PONRCREF-LINKAGE.
COPY PONRCREF REPLACING ==(without space):(without space)P(without space):(without space)== BY ==WS==.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 9:10 pm    Post subject:
Reply with quote

Copybook:
Code:
       01  WS-TEST-VARIABLE.
           05  :P:-DETAIL-01           PIC X(08).

Code:
Code:
       WORKING-STORAGE SECTION.
       COPY TEST1
            REPLACING ==:P:== BY ==WS==.
       PROCEDURE DIVISION                  .
results in
Code:
1PP 5655-G53 IBM Enterprise COBOL for z/OS  3.4.1               MF0189    Date 0
   LineID  PL SL  ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6--
0  000001                IDENTIFICATION DIVISION.
   000002                PROGRAM-ID.                     MF0189.
   000003                ENVIRONMENT DIVISION.
   000004                CONFIGURATION SECTION.
   000005                SOURCE-COMPUTER.                IBM-370
   000006               *                                WITH DEBUGGING MODE
   000007                                                                   .
   000008                INPUT-OUTPUT  SECTION.
   000009                FILE-CONTROL.
   000010                DATA DIVISION.
   000011                FILE SECTION.
   000012                WORKING-STORAGE SECTION.
   000013                COPY TEST1
   000014                     REPLACING ==:P:== BY ==WS==.
   000015C               01  WS-TEST-VARIABLE.
   000016C                   05  WS-DETAIL-01           PIC X(08).
   000017C
   000018                PROCEDURE DIVISION                  .
so what you CLAIM you are doing works fine under Enterprise COBOL 3.4.1 - hence you are not giving us the entire picture.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 07, 2011 9:14 pm    Post subject:
Reply with quote

use code tags and the bbcode will not replace the :char with an icon.

and had you used the preview button
(sorta like desk checking and referring to manuals)
you would have seen the icon replacement.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Thu Jul 07, 2011 9:25 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Cpy CHRRCREF:

Code:
000001            05  :P:-PWREFC-ENTRY.                             
000002                10 :P:-PWREFC-TRANS-FIELD            PIC X(25).
000003                10 :P:-PWREFC-TYPE                   PIC X(1).
000004                10 :P:-PWREFC-STATE-CD               PIC X(2).
000005                10 :P:-PWREFC-LOB-CD                 PIC X(3).
000006                10 :P:-PWREFC-PLS-FIELDS.                     
000007                   15 :P:-PWREFC-PLS-FIELD1          PIC X(25).
000008                   15 :P:-PWREFC-PLS-DESC1           PIC X(25).
000009                   15 FILLER                         PIC X(76).
.
.
.


Pgm:

Code:
000032        WORKING-STORAGE SECTION.
000108        01  WS-CHRRCREF-LINKAGE.                                       
000109            COPY CHRRCREF REPLACING ==:P:== BY ==WS==.


Error:
Code:
  000108                01  WS-CHRRCREF-LINKAGE.                               
  000109                    05  :P:-PWREFC-ENTRY.                               
                                                                               
==000109==> IGYDS1089-S "05" WAS INVALID.  SCANNING WAS RESUMED AT THE NEXT AREA "A" ITEM, LEVEL-NUMBER, OR THE START OF THE NEXT CLAUSE.         
==000109==> IGYDS0001-W A BLANK WAS MISSING BEFORE CHARACTER "P" IN COLUMN 20.   A BLANK WAS ASSUMED.

Is it help to figure it out?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 10:37 pm    Post subject:
Reply with quote

Your copybook works for me:
Code:
5-G53 IBM Enterprise COBOL for z/OS  3.4.1               MF0189    Date 07/07/20
ID  PL SL  ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+----
01                IDENTIFICATION DIVISION.
02                PROGRAM-ID.                     MF0189.
03                ENVIRONMENT DIVISION.
04                CONFIGURATION SECTION.
05                SOURCE-COMPUTER.                IBM-370
06               *                                WITH DEBUGGING MODE
07                                                                   .
08                INPUT-OUTPUT  SECTION.
09                FILE-CONTROL.
10                DATA DIVISION.
11                FILE SECTION.
12                WORKING-STORAGE SECTION.
13                COPY TEST1
14                     REPLACING ==:P:== BY ==WS==.
15C               01  WS-TEST-VARIABLE.
16C                   05  WS-DETAIL-01           PIC X(08).
17C
18                     COPY CHRRCREF REPLACING ==:P:== BY ==WS==.
19C        000001            05  WS-PWREFC-ENTRY.
20C        000002                10 WS-PWREFC-TRANS-FIELD            PIC X(25).
21C        000003                10 WS-PWREFC-TYPE                   PIC X(1).
22C        000004                10 WS-PWREFC-STATE-CD               PIC X(2).
23C        000005                10 WS-PWREFC-LOB-CD                 PIC X(3).
24C        000006                10 WS-PWREFC-PLS-FIELDS.
25C        000007                   15 WS-PWREFC-PLS-FIELD1          PIC X(25).
26C        000008                   15 WS-PWREFC-PLS-DESC1           PIC X(25).
27C        000009                   15 FILLER                         PIC X(76).
28                PROCEDURE DIVISION                  .
What compile options are set -- you can find them at the start of the compiler listing?
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Thu Jul 07, 2011 11:26 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Below are enebled in my compiler

NOADATA
NOADV
APOST
ARITH(COMPAT)
AWO
BUFSIZE(4096)
NOCICS
CODEPAGE(1140)
NOCOMPILE(S)
NOCURRENCY
DATA(31)
NODATEPROC
DBCS
NODECK
NODIAGTRUNC
NODLL
NODUMP
NODYNAM
NOEXIT
NOEXPORTALL
FASTSRT
FLAG(I,I)
NOFLAGSTD
INTDATE(ANSI)
LANGUAGE(UE)
LIB
LINECOUNT(60)
NOLIST
MAP
NOMDECK
NONAME
NSYMBOL(NATIONAL)
NONUMBER
NUMPROC(MIG)
OBJECT
OFFSET
NOOPTIMIZE
OUTDD(SYSOUT)
PGMNAME(COMPAT)
RENT
RMODE(AUTO)
NOSEQUENCE
SIZE(MAX)
SOURCE
SPACE(1)
NOSQL
SQLCCSID
NOSSRANGE
NOTERM
NOTEST
NOTHREAD
TRUNC(BIN)
NOVBREF
NOWORD
XREF(SHORT)
YEARWINDOW(1900)
ZWB
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Jul 07, 2011 11:47 pm    Post subject:
Reply with quote

Are you running one of IBM's standard compile procedures (such as IGYWCL)? If not, you may need to contact your site support group and work with them since there is something unusual going on.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Fri Jul 08, 2011 4:50 am    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Pons,

Can you post the whole program please, the compile listing (from the start of the source to the end of the procedure, and any remaining diagnostics at the end) would be best?

Check for any diagnostic messages at the start of the output listing. Check for any diagnostic messages before the WORKING-STORAGE SECTION.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Fri Jul 08, 2011 7:09 am    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Thanks for all your help. You know I fixed this issue. I dont know how is it working. I just coded some thing differently by seeing some of the post in one of the site.

Code:
000032        WORKING-STORAGE SECTION.
000108        01  WS-CHRRCREF-LINKAGE.                                       
000109            COPY CHRRCREF REPLACING ==:P:== BY ==WS==.


Instead of above statement i gave it as

Code:
000032        WORKING-STORAGE SECTION.
000108        01  WS-CHRRCREF-LINKAGE.                                       
000109            COPY CHRRCREF REPLACING :P: BY WS.


It is working. I guess the delimitters made some twist. Thanks again!!!
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Fri Jul 08, 2011 2:23 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

If that is all you changed, I'd suggest you raise a fault with the compiler.

How Robert's code works and yours doesn't is a mystery. If you can produce the source here, perhaps it can be tossed through a comiler (same and different) to try to recreate the error.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jul 08, 2011 6:07 pm    Post subject:
Reply with quote

I agree with Bill. There is something which is not yet told, look at these previous topics, talks about the similar issues, but they don't get resolved the way you say:

http://www.ibmmainframes.com/viewtopic.php?t=41418&highlight=replacing
http://www.ibmmainframes.com/viewtopic.php?t=33725&highlight=replacing
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Fri Jul 08, 2011 6:56 pm    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

Due to some security reason. I can;t post my source here. Even I am working on it to find, why the actual statement is not working and how the modified statement is working...

Will update you once I find the answer. Thanks...
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Fri Jul 08, 2011 7:30 pm    Post subject:
Reply with quote

Pons,

Can you briefly outline what the program does? Does it use DB2, CICS, (or go through some other pre-processor) VSAM files, QSAM, that sort of stuff.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Sat Jul 09, 2011 2:57 am    Post subject: Reply to: Copy Replacing in Cobol
Reply with quote

No Bill, It is just a batch cobol program which is called by the main program by passing some linkage sections. (No DB2 & No VSAM ...)

Even I deleted all my stuff and having only upto working storage section to check the COPY Replacing fuction, But even it didn;t work for me. Gave the same error.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Sat Jul 09, 2011 12:28 pm    Post subject:
Reply with quote

Pons,

Can you try to compile the program Robert produced earlier?

Also, can you put in an 01-level with a PIC before the COPY, anything will do

Code:
01  W-SOME-NAME-JUST-TO-DEFINE-SOME-STORAGE PIC X.


so, follow that with the code for your COPY.

Do you think your organisation would be OK with you posting the completely stripped-down version of your program?
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
Goto page 1, 2  Next
Page 1 of 2

 

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 syncsort: copy lines after the keyword shreya19 SYNCSORT 6 Fri Dec 02, 2016 9:47 am
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


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