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

ABOUT COPYBOOKS


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
diwakarparthasarathy

New User


Joined: 29 May 2005
Posts: 10

PostPosted: Sat Jul 09, 2005 6:17 am
Reply with quote

HI FRIENDS,
I WAS ASKED IN AN INTERVIEW IF IAM USING A COPYBOOK WITH SOME
VARIABLES AND THE NAME OF THE COPYBOOK IS SAY X IN ONE PROGRAM.CAN I USE THE SAME COPYBOOK NAME WITH DIFFERENT
VARIABLES IN ANOTHER PROGRAM?
THANKS
DIWAKARPARTHASARATHY
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 6:25 am
Reply with quote

Yes, Using Replacing option this is possible.
Quote:
COPY <copybookname> REPLACING ==<fromvariable>== BY ==<tovariable>==


Regards,
Vivek
Back to top
View user's profile Send private message
diwakarparthasarathy

New User


Joined: 29 May 2005
Posts: 10

PostPosted: Sat Jul 09, 2005 3:10 pm
Reply with quote

HI VIVEK,
THANKS FOR YOUR REPLY BUT CAN U GIVE ME DATAILED INFORMATION?
THANKS
DIWAKARPARTHASARATHY
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 3:35 pm
Reply with quote

Let's say you have a copybook COPYBOOK and you have following statement
Quote:
MOVE VAR1 TO VAR2

If you include this copy book using the following statement you will be using the same variables written in the copybook
Quote:
COPY COPYBOOK

If you want to use VAR3 instead of VAR1 you have to use the following stmt to include the copybook
Quote:
COPY COPYBOOK REPLACING VAR1 BY VAR3

Hope this solves your query.

Regards,
Vivek
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 3:40 pm
Reply with quote

In my previous mail please change the statement from
Quote:
COPY COPYBOOK REPLACING VAR1 BY VAR3

TO
Quote:
COPY COPYBOOK REPLACING ==VAR1== BY ==VAR3==


Regards,
Vivek
Back to top
View user's profile Send private message
diwakarparthasarathy

New User


Joined: 29 May 2005
Posts: 10

PostPosted: Sat Jul 09, 2005 7:39 pm
Reply with quote

HI VIVEK,
THANK U SO MUCH FOR YOUR REPLY ,IT HAS CLEARED MY DOUBT.
REGARDS,
DIWAKARPARTHASARATHY icon_lol.gif
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Sun Jul 10, 2005 2:16 am
Reply with quote

HI,
MAINFRAME GUY CAN BE EASILY IDENTIFIED BY HIS POSTS
IN CAPITAL LETTERS.

aS jAva gUy can be Identified by hungerianNOtation.

Well, there are 10 type of people in the world,
one who understand binary and one who doesn't
icon_smile.gif
Was just Kidding,

Well, Vivek, it was a nice piece of information on Copy Books.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... CLIST & REXX 2
No new posts how to use RDZ for converting cobol c... CICS 1
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... COBOL Programming 8
No new posts REXX-Undo Expanded copybooks statemen... TSO/ISPF 12
No new posts Expand COBOL copybooks and DCLGEN COBOL Programming 17
Search our Forums:

Back to Top