View previous topic :: View next topic
|
Author |
Message |
bhgh Warnings : 1 New User
Joined: 18 Mar 2006 Posts: 21 Location: Hyderabad
|
|
|
|
hi,
what is use of Replace option in Call stmt what will happen if not mention Replace.
thanks in advance
rgds |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
hi kala,
i've not seen or used replace option in call stmt. i've used it in COPY stmt
can you give the syntax you use?
gowtham |
|
Back to top |
|
|
bhgh Warnings : 1 New User
Joined: 18 Mar 2006 Posts: 21 Location: Hyderabad
|
|
|
|
ok my query was wrong?it is copy statement only |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
kALA,
Supoose we have a copy book named copybok1 declared as
01 VARA.
05 WS-VAR1 PIC X(5).
05 WS-VAR2 PIC 9(4) COMP-3.
05 WS-VAR3 PIC A(2).
05 WS-VAR4 PIC 9(4).
And if we write following code in r pgm
COPY COPYBOK1
REPLACING VARA BY VARB.
Then in program that particular copybook will be expand
01 VARB.
05 WS-VAR1 PIC X(5).
05 WS-VAR2 PIC 9(4) COMP-3.
05 WS-VAR3 PIC A(2).
05 WS-VAR4 PIC 9(4).
Like that
Generally we give replace option in copy statement if we want to reuse the same copy book again means we want to use samecopy book in pgm more than once in that case in order to distinguish each occourance
Hope it will helpful |
|
Back to top |
|
|
|