IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replace option in Call stmt


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhgh
Warnings : 1

New User


Joined: 18 Mar 2006
Posts: 21
Location: Hyderabad

PostPosted: Fri Apr 07, 2006 12:47 pm
Reply with quote

hi,
what is use of Replace option in Call stmt what will happen if not mention Replace.
thanks in advance
rgds
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Fri Apr 07, 2006 3:00 pm
Reply with quote

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
View user's profile Send private message
bhgh
Warnings : 1

New User


Joined: 18 Mar 2006
Posts: 21
Location: Hyderabad

PostPosted: Fri Apr 07, 2006 3:04 pm
Reply with quote

ok my query was wrong?it is copy statement only
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Apr 07, 2006 4:13 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
Search our Forums:

Back to Top