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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm


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