|
|
| Author |
Message |
nelson.pandian
New User
Joined: 09 Apr 2008 Posts: 6 Location: Chennai
|
|
|
|
I have a copybook "HELLO"
Which has 01 bcd
05 bcx pic 9(4)
05 bcr pic x(4)
.etc
But I want the copy book to expand as shown when I compile it
..
01 bcd-X
05 bcx-X pic 9(4)
05 bcr-X pic x(4)
.etc
i.e it should be suffixed with -X
Can anyone help me in this...
Nelson |
|
| Back to top |
|
 |
References
|
Posted: Fri Apr 25, 2008 9:24 am Post subject: Re: Overriding copy book variables |
 |
|
|
 |
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 138 Location: At my Desk
|
|
|
|
| nelson.pandian wrote: |
I have a copy book say HELLO
Which has 01 bcd
05 bcx pic 9(4)
05 bcr pic x(4)
.etc
But I want the copy book to expand as shown when I compile it
..
01 bcd-X
05 bcx-X pic 9(4)
05 bcr-X pic x(4)
.etc
i.e it shud be suffixed with -X
Can any one help me in this...
Thanks in advance,
Nelson |
| Code: |
If ur copy book is like this ie having common qualifier.
01 copy1-bcd
05 copy1-bcx pic 9(4)
05 copy1-bcr pic x(4)
.etc
Then u can replace copy1 with copy1-x in ur program.Then u can see
01 copy1-x-bcd
05 copy1-x-bcx pic 9(4)
05 copy1-x-bcr pic x(4)
.etc in ur compiler listings
|
|
|
| Back to top |
|
 |
nelson.pandian
New User
Joined: 09 Apr 2008 Posts: 6 Location: Chennai
|
|
|
|
I think you didn't get me.
Say for Example:
In ADSO we can Prefix or Suffix a variable which is present a record in IDDM, and we can use those prefixed or suffixed variable in the dialog.
IDDM structure:
Prefix variable: WS01-
01 REF
02 REC1 PIC X(02)
02 REC2 PIC X(02)
While using in a dialog we use to use as WS01-REC1 and WS01-REC2.
In the same way can we use the variables with a prefix or Suffix which is in the Copybook used by a Cobol Program. |
|
| Back to top |
|
 |
nelson.pandian
New User
Joined: 09 Apr 2008 Posts: 6 Location: Chennai
|
|
|
|
| Is there anyothere way of using the Prefix or Suffix with Replace or Redefine or Renames, something like. |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1088 Location: At my desk
|
|
|
|
| nelson.pandian wrote: |
| Is there anyothere way of using the Prefix or Suffix with Replace or Redefine or Renames, something like. |
No, whole woeds only.... |
|
| Back to top |
|
 |
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1470
|
|
|
|
Hi Nelson,
This should work.
In copybook:
01 bcd:suf:.
05 bcx:suf: pic 9(4).
05 bcr:suf: pic x(4).
In pgm:
copy hello replacing ==:suf:== by ==-x==.
If you don't want the -x, code:
copy hello replacing ==:suf:== by ====. |
|
| Back to top |
|
 |
|
|