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
 
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 VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
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 WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am

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