Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ABOUT COPYBOOKS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics
Author Message
diwakarparthasarathy

New User


Joined: 29 May 2005
Posts: 10

PostPosted: Sat Jul 09, 2005 6:17 am    Post subject: ABOUT COPYBOOKS
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
References
kvivek

Active User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 6:25 am    Post subject:
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    Post subject:
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

Active User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 3:35 pm    Post subject:
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

Active User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Sat Jul 09, 2005 3:40 pm    Post subject:
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    Post subject:
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: 279
Location: India

PostPosted: Sun Jul 10, 2005 2:16 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1