Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
FIND one and REPLACE another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dinesh_deadman
Warnings : 1

New User


Joined: 10 Aug 2007
Posts: 38
Location: Chicago

PostPosted: Thu Oct 22, 2009 9:24 pm    Post subject: FIND one and REPLACE another
Reply with quote

Hello:

I want to find one value in position 1:3, if it is BBB, then I want to replace the value in position 69 from 'whatever' to a blank. Example file is attached.

I tried to look up for a similar thread in the forum, may be there is one, but I failed to find it. Could someone help me on this?

RECL: 116
Record Format: VB

Please let me know if you need any more information.

Dinesh
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 22, 2009 10:07 pm    Post subject: Reply to: FIND one and REPLACE another
Reply with quote

dinesh_deadman,

It can be done with a simple IFTHEN statement. Since your input is a VB file, the actual positions are 5 and 73 as the first 4 bytes is the RDW. use the following control cards

Code:

//SYSIN    DD *                                         
  SORT FIELDS=COPY                                     
  INREC IFTHEN=(WHEN=(5,3,CH,EQ,C'BBB'),OVERLAY=(73:X))
//*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us