View previous topic :: View next topic
|
Author |
Message |
sri ranganath
New User
Joined: 10 Nov 2004 Posts: 2 Location: pune
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
sri ranganath
New User
Joined: 10 Nov 2004 Posts: 2 Location: pune
|
|
|
|
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 |
|
|
|