Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Find and Replace

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Find and Replace
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: 2360
Location: Israel

PostPosted: Mon Mar 23, 2009 6:11 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 12:36 pm    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 12:50 pm    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Mar 24, 2009 1:03 pm    Post subject:
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    Post subject: Reply to: Find and Replace
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    Post subject: Re: Reply to: Find and Replace
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: 2360
Location: Israel

PostPosted: Tue Mar 31, 2009 1:41 pm    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Mar 31, 2009 3:26 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us