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

Find and Replace


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Mon Mar 23, 2009 5:49 pm
Reply with quote

Please let me know how to 'find' a word in natural language and 'replace' the occurances of the same word with other word through out the program.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Mar 23, 2009 6:11 pm
Reply with quote

When you are in a Natural editor (Program Editor or Data-Area Editor) enter SCAN in the command line. The SCAN window will open with fields you can supply, as "SCAN VALUE", "REPLACE VALUE" etc.

If you want to scan/replace within multiple modules, enter SCAN in the command line (NEXT prompt) when you are out of any editor. This will open the SCAN/REPLACE utility (this is also the only way to search within MAPs).

Be careful when replacing. Read the manuals first, as some replace operations are not reversible.


O.
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 24, 2009 10:58 am
Reply with quote

Thanks for your reply. But SCAN is not working... icon_sad.gif
It is not asking for replace.....
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 24, 2009 11:04 am
Reply with quote

Iam asking for it in mainframes and not in Windows
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 24, 2009 12:36 pm
Reply with quote

I am talking about Natural for mainframe product. SCAN is a System command, and thus available to all users.

What do you mean when you say "SCAN is not working"? Do you get any message? Did you try it from within editor?

O.
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 24, 2009 12:46 pm
Reply with quote

When I type SCAN in command prompt, there is a window that opens. if u enter a word say 'ANY' it finds the occrances of the word. But how do I replace it? There is no option that is asking for replace.

Moreover SCAN accepts only 1 value. So I am not permitted to give 2 values. Can u pls guide me on this?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 24, 2009 12:50 pm
Reply with quote

OK, first - you statement that "SCAN is not working" is not correct. You just don't know how to operate it.

What is the title of the window that opened when you type "SCAN"? The title should be in the center of the upper frame of the window. Alternatively, can you copy and paste the screen? (use code tags)

O.
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 24, 2009 12:59 pm
Reply with quote

The title of the window that opens when i type SCAN is

Scan/Find/Ref Value:
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 24, 2009 1:03 pm
Reply with quote

That's not what I see. In my machine it looks like this:
Code:
                      SCAN/REPLACE                     
                                                       
                                                       
  Scan value ...... ________________________________   
  Replace value ... ________________________________   
                                                       
  Replace with null value .... _                       
  Absolute scan .............. X                       
  X - Y  range ............... _                       
                                                       
                                Press PF3 for Exit     
                                                       
                                                       


Are you sure you are within a program editor?


O.
Back to top
View user's profile Send private message
silentarya

New User


Joined: 11 Mar 2007
Posts: 35
Location: Chennai

PostPosted: Mon Mar 30, 2009 6:08 pm
Reply with quote

One you are inside the program. Go to the top.
And type the command SC.
It displays a dialing box as follows. Fill in the box and press enter.

SCAN/REPLACE


Scan value ...... ________________________________
Replace value ... ________________________________

Replace with null value .... _
Absolute scan .............. _
X - Y range ............... _

Press PF3 for Exit
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 31, 2009 1:24 pm
Reply with quote

Scan/Find/Ref Value:
__________________________________
Absolute N (Y/N)



This is the screen that i get when i give sc[/img]
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 31, 2009 1:41 pm
Reply with quote

I'm asking again: Are you sure you are within program editor??? (as opposed to data area/map/DDM editor).

O.
Back to top
View user's profile Send private message
RamyaStephan

New User


Joined: 23 Mar 2009
Posts: 7
Location: Chennai

PostPosted: Tue Mar 31, 2009 2:50 pm
Reply with quote

Yup!!! I am in the program editor only
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 31, 2009 3:26 pm
Reply with quote

Can you tell your Natural version? (Try SYSPROD)

O.
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top