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
 

 

regarding the copybook with replace syntax

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

New User


Joined: 10 Nov 2004
Posts: 2
Location: pune

PostPosted: Wed Nov 10, 2004 1:46 pm    Post subject: regarding the copybook with replace syntax
Reply with quote

01 CARPICK-RECORD.
05 LOCATION-KEY PIC X(3).
05 DATE-KEY PIC X(6).
05 ORDER-NBR-KEY PIC X(20).
05 ITEM-DUPE-KEY PIC X(3).
* 05 COPY IDMS RECORD ICSDNLOD.
copy ICSDNLOD

here i want to put the copybook ICSDNLOD and comment that COPY IDMS RECORD ICSDNLOD.
but the copybook variables are starting like this.
01 ICSDNLOD.
05 LOC-CD PIC X(03) VALUE SPACES.
05 DNLOAD-DT PIC 9(06).
05 CARSEL-ORD-NBR PIC X(20).

I tried with the replace option?.
COPY ICSDNLOD REPLACING ==01 ICSDNLOD == BY ==05 ICSDNLOD ==
==05 ICSDNLOD == BY ==10 ICSDNLOD == .

but this is replacing all the pic x(05) with pic x(10).

Please let me know any other way of this replace syntax or any other way to do.
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Nov 11, 2004 12:30 am    Post subject:
Reply with quote

Hi Sri,

Give this a try:
Code:
 
COPY ICSDNLOD REPLACING  ==01 ICSDNLOD.==  BY  ====.

If that doesn't work, try:
Code:
 
COPY ICSDNLOD REPLACING  ==01 ICSDNLOD.==  BY  == ==.

In either case make sure you use the correct number of spaces in the 01 stmt you're attempting to change, JIC.

If it works, this will nullify the 01 stmt ("01 ICSDNLOD."), therefore the following 05s, etc. will be appended to 01 CARPICK-RECORD and become part of it. I think this is what you're looking for.
Back to top
View user's profile Send private message
sri ranganath

New User


Joined: 10 Nov 2004
Posts: 2
Location: pune

PostPosted: Thu Nov 11, 2004 11:10 am    Post subject: related to copybook
Reply with quote

Thanks very much for posting....

This syntax is working fine....

COPY ICSRGKYC REPLACING == 01 == BY == 05 ==
==(01)== BY ==(01)==
== 05 == BY == 10 ==
==(05)== BY ==(05)==
== 10 == BY == 15 ==
==(10)== BY ==(10)==
== 15 == BY == 20 ==
==(15)== BY ==(15)==
== 20 == BY == 25 ==
==(20)== BY ==(20)==.
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm


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