Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Replace option in Call stmt

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
bhgh
Warnings : 1

New User


Joined: 18 Mar 2006
Posts: 21
Location: delhi

PostPosted: Fri Apr 07, 2006 12:47 pm    Post subject: Replace option in Call stmt
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    Post subject: Re: Replace option in Call stmt
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: delhi

PostPosted: Fri Apr 07, 2006 3:04 pm    Post subject: Re: Replace option in copy stmt
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: 1187
Location: Bangalore,India

PostPosted: Fri Apr 07, 2006 4:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us