MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question:Use the replace by

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vice_versa
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 10

PostPosted: Wed Aug 23, 2006 12:45 pm    Post subject: Question:Use the replace by Reply with quote

Hi everybody,
I want to replace
01 R111111-F.
10 R111111-F1 PIC X(07).
10 R111111-F2 PIC 9(05).
10 R111111-F3 PIC 9(05).
10 R111111-F4 PIC X(08).
10 R111111-F5 PIC X(05).
10 R111111-F6 PIC X(05).
10 R111111-F7 PIC X(20).
10 R111111-F8 PIC X(30).

By
01 R222222-F.
10 R222222-F1 PIC X(07).
10 R222222-F2 PIC 9(05).
10 R222222-F3 PIC 9(05).
10 R222222-F4 PIC X(08).
10 R222222-F5 PIC X(05).
10 R222222-F6 PIC X(05).
10 R222222-F7 PIC X(20).
10 R222222-F8 PIC X(30).
I use
REPLACE ==R111111== BY ==R222222==.
COPY RXXXXXX.
REPLACE OFF.

In fact, they didn't be replaced.
why.
thanks in advance.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 23, 2006 1:14 pm    Post subject: Reply with quote

vice_versa,

Check this link which answers your question

http://www.mvsforums.com/helpboards/viewtopic.php?t=6513&highlight=replace

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Wed Aug 23, 2006 3:04 pm    Post subject: Reply with quote

vice_versa,

In your case you need to define your copybook contents as :
Code:
   
   01 :R111111:-F.                 
           10 :R111111:-F1 PIC X(07).   
           10 :R111111:-F2 PIC 9(05).   
           10 :R111111:-F3 PIC 9(05).   
           10 :R111111:-F4 PIC X(08).   
           10 :R111111:-F5 PIC X(05).   
           10 :R111111:-F6 PIC X(05).   
           10 :R111111:-F7 PIC X(20).   
           10 :R111111:-F8 PIC X(30).   

PROGRAM
Code:

COPY R REPLACING ==:R111111:== BY ==R222222==.

COMPILED OUTPUT
Code:

COPY R REPLACING ==:R111111:== BY ==R222222==.         
01  R222222-F.                                         
    10 R222222-F1 PIC X(07).                           
    10 R222222-F2 PIC 9(05).                           
    10 R222222-F3 PIC 9(05).                           
    10 R222222-F4 PIC X(08).                           
    10 R222222-F5 PIC X(05).                           
    10 R222222-F6 PIC X(05).                           
    10 R222222-F7 PIC X(20).                           
    10 R222222-F8 PIC X(30).                           

_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
vice_versa
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 10

PostPosted: Thu Aug 24, 2006 8:21 am    Post subject: Reply with quote

Thanks
My question is the original copybook have no sign :.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Aug 24, 2006 8:24 am    Post subject: Reply with quote

Quote:

My question is the original copybook have no sign :.

vice_versa,

You canNOT use replace command without changing the copybook.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group