View previous topic :: View next topic
|
Author |
Message |
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
Thanks for your reply. But SCAN is not working...
It is not asking for replace..... |
|
Back to top |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
Iam asking for it in mainframes and not in Windows |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
The title of the window that opens when i type SCAN is
Scan/Find/Ref Value: |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
silentarya
New User
Joined: 11 Mar 2007 Posts: 35 Location: Chennai
|
|
|
|
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 |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
Scan/Find/Ref Value:
__________________________________
Absolute N (Y/N)
This is the screen that i get when i give sc[/img] |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I'm asking again: Are you sure you are within program editor??? (as opposed to data area/map/DDM editor).
O. |
|
Back to top |
|
|
RamyaStephan
New User
Joined: 23 Mar 2009 Posts: 7 Location: Chennai
|
|
|
|
Yup!!! I am in the program editor only |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Can you tell your Natural version? (Try SYSPROD)
O. |
|
Back to top |
|
|
|