Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem in Copybook with Replacing option

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

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Tue Apr 29, 2008 11:50 am    Post subject: Problem in Copybook with Replacing option
Reply with quote

I'm getting compilation error, when i try using
COPY Copybook1 REPLACING ==WS-TRIAL== BY ==WS-TRIALS==.

Copybook1
01 WS-TRIAL PIC X(5).

Actually the copybook named copybook1 is not getting expanded when i used Replacing option. i'm getting complilation errors for all other varibles used inside the copybook.

Any tips/suggestions would be of great help.....
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Tue Apr 29, 2008 1:10 pm    Post subject:
Reply with quote

Hi !

There are certain rules you need to take care of.

Example in Programm:

COPY TBBK206R
REPLACING ==PRE:==
BY ==G6B-==.

Example CopyBook:

01 PRE:GKTO-AZ6-BTAG.
10 PRE:INR PIC S9(4) COMP.
10 PRE:KONTO-ID PIC X(26).


Regards, UmeySan
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Apr 29, 2008 1:14 pm    Post subject:
Reply with quote

Hi,

Which product (CHGMAN or ENDEVOUR) do you use to compile program ?
Back to top
View user's profile Send private message
obulisankar

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Tue Apr 29, 2008 3:25 pm    Post subject: RE:Problem in Copybook with Replacing option
Reply with quote

Thanks for ur comments...


I'm using CHGMAN for compiling program, COBOL370 is the version i'm using.

Copybook is getting expanded for COPY Copybookname.

If i use COPY Copybookname REPLACING ==TESTA== BY ==TESTB==.
or, COPY Copybookname REPLACING TESTA BY TESTB.
It is not getting expanded, this is the problem i'm facing.
Back to top
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 29, 2008 3:40 pm    Post subject:
Reply with quote

Is the copybook is available in the package or it is in any production libraries?
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Tue Apr 29, 2008 4:01 pm    Post subject:
Reply with quote

Please refer to this link: Replacement and comparison rules
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Apr 29, 2008 6:27 pm    Post subject:
Reply with quote

Hi obuli,

I used "REPLACING WS-TRIAL BY WS-TRIALS" and == ==
and it works OK.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Apr 29, 2008 11:48 pm    Post subject:
Reply with quote

Hi,
Quote:
Copybook is getting expanded

Where do You "look" for expended copybook, in compile listing or do you expend it in program itself using some macro/tool?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 30, 2008 12:59 am    Post subject:
Reply with quote

Quote:
I used "REPLACING WS-TRIAL BY WS-TRIALS" and == ==
and it works OK.
It's good for ECOBOL, but maybe not for his level...
Example: enhancing XML output is a good example of full word replacing.......
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Apr 30, 2008 8:06 pm    Post subject:
Reply with quote

Replacing words in a copybook has been around for a looong time. Unless he's not using an IBM compiler.

Obuli,

Why don't you give us the environmental info and msg texts, etc.?
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts replacing junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us