| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
sri ranganath
Joined: 10 Nov 2004
Posts: 2
Location: pune
|
| Posted: Wed Nov 10, 2004 1:46 pm Post subject: regarding the copybook with replace syntax |
|
|
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
Joined: 30 May 2003
Posts: 1508
|
| Posted: Thu Nov 11, 2004 12:30 am Post subject: |
|
|
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
Joined: 10 Nov 2004
Posts: 2
Location: pune
|
| Posted: Thu Nov 11, 2004 11:10 am Post subject: related to copybook |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|