Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
venosol
Warnings : 1

New User

Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

 Posted: Thu Apr 05, 2007 3:21 pm    Post subject: how to find and replace specific words in a program In WORKING-STORAGE SECTION I want to find the the data items that are having with 'WS' and must be replaced by 'WK' for ten lines only. Is there any comand for that ? I know that we can use C for finding and replacing all. How to replace in some lines only.

vkphani

New User

Joined: 29 Oct 2003
Posts: 29

 Posted: Thu Apr 05, 2007 3:32 pm    Post subject: I don't think that is possible.
kgumraj

Active User

Joined: 01 May 2006
Posts: 151

Posted: Thu Apr 05, 2007 3:34 pm    Post subject:

Hi,

Mark a label so the you can use as
 Code: C ALL FIRST SECOND .A .B

Where .A and .B are lables.
agkshirsagar

Active Member

Joined: 27 Feb 2007
Posts: 691
Location: Earth

Posted: Thu Apr 05, 2007 3:51 pm    Post subject:

Use,
 Code: C 'WS' 'WK'

Press enter.
then press F6 9 times. (this is for repeating same change command)

See, you need to take care while replacing the variables so that you do not wrongly replcace 'other' words than you wanted.
By doing C ALL you have this risk.
When using C ALL .A .B as Kiran suggested use as many chars as possible for example
C ALL 'WS-' 'WK-'. This will replace only variable names starting with 'WS-' not just WS which may be part of other verb/comment/code.
ofer71

Global Moderator

Joined: 27 Dec 2005
Posts: 2360
Location: Israel

 Posted: Fri Apr 06, 2007 2:20 am    Post subject: Another option is to exclude the ten lines (using XX XX), then use 'C X ALL ...'. O.
William Thompson

Global Moderator

Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

 Posted: Fri Apr 06, 2007 3:50 am    Post subject: Dang, so much to learn, so little time to play around with it.....
shreevamsi

Active User

Joined: 23 Feb 2006
Posts: 305

 Posted: Fri Apr 06, 2007 4:17 am    Post subject: Re: how to find and replace specific words in a program another way is to set boundries using the command BNDS. ~Vamsi
venosol
Warnings : 1

New User

Joined: 16 Nov 2006
Posts: 43
Location: Bangalore

Posted: Fri Apr 06, 2007 8:29 am    Post subject: Re: how to find and replace specific words in a program

 shreevamsi wrote: another way is to set boundries using the command BNDS. ~Vamsi

what is the syntax for using BNDS?
shreevamsi

Active User

Joined: 23 Feb 2006
Posts: 305

 Posted: Fri Apr 06, 2007 9:10 am    Post subject: Re: how to find and replace specific words in a program Hi, Type BNDS or BND in the line command area of any line and press ENTER. The bounds line will then be displayed as follows. 000300 =BNDS> < > 000400 The bounds may then be changed by overtyping with < to define the left bound and > to define the right bound. To remove the bounds line from the display, use the D line command or the RESET primary command. Bounds are used with scrolling, shift line commands ( ">", "<", ")", "(" ), text line commands ( "TS", "TF", "TE" ) and FIND , CHANGE , EXCLUDE , and SORT commands.
Phrzby Phil

Active Member

Joined: 31 Oct 2006
Posts: 981
Location: Richmond, Virginia

 Posted: Fri Apr 06, 2007 5:33 pm    Post subject: General Suggestion for exploring new (to you) TSO features: There is a wealth of help in the HELP (F1) screens. Whereas you might not know about the existence of a command or feature (happens to me all the time), once you do, reading up in HELP and then experimenting will enable you with respect to that feature much more than just being told by someone else.
mainframe_96

New User

Joined: 18 Dec 2006
Posts: 13
Location: usa

 Posted: Fri Apr 06, 2007 6:10 pm    Post subject: Re: how to find and replace specific words in a program Most of the time i Use x all, f 'WS-' all c 'xx' 'yy' x all or c 'xx' 'yy' nx all Nx all changes in not excluded lines X all changes in excluded lines what ofer71 said will work for you in this case, However if you had to change except for those 10 lines you excluded then use NX.
jasorn
Warnings : 1

Active User

Joined: 12 Jul 2006
Posts: 184
Location: USA

Posted: Sat Apr 07, 2007 3:26 am    Post subject: Re: how to find and replace specific words in a program

 shreevamsi wrote: another way is to set boundries using the command BNDS. ~Vamsi

You can set bounds for lines? Thought you could only set bounds for columns.
GlobalGyan

New User

Joined: 31 Jan 2006
Posts: 28

 Posted: Tue Apr 10, 2007 11:09 am    Post subject: for 10 lines you can change manually :=) -
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Verify WITH UR present inside program... priyankakir CLIST & REXX 23 Wed Jun 12, 2019 3:37 pm S0C7 abend while running a Cobol Program amitc23 COBOL Programming 2 Tue May 07, 2019 4:06 pm How to copy\replace the members in pr... abdulrafi JCL & VSAM 6 Fri Mar 22, 2019 7:02 pm z/VM z/VSE Get CPU-time of a COBOL Ba... Andi1982 COBOL Programming 3 Mon Mar 11, 2019 3:36 pm How to delete a VSAM dataset from ins... Mike.Fulton JCL & VSAM 6 Fri Feb 15, 2019 5:58 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us