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

FIND one and REPLACE another


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dinesh_deadman
Warnings : 1

New User


Joined: 10 Aug 2007
Posts: 32
Location: Chicago

PostPosted: Thu Oct 22, 2009 9:24 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


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