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

Finding record and replacing with value with in a file


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

New User


Joined: 21 Apr 2022
Posts: 3
Location: India

PostPosted: Thu Apr 21, 2022 11:48 pm
Reply with quote

Hi Everyone, GE.. I’m new to this forum.
I’m looking solutions/suggestion for my query.
I have a sequential file having record like

08:00 ABC12ABCDEF (NAME1)
10:30 GHI32ABC (NAME2)
18:15 MLM67ABCDEFGHI (NAME3)


My expectation is to get output
ABC12ABCDEF (NAME108:00)
GHI32ABC (NAME210:30)
MLM67ABCDEFGHI (NAME318:15)
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 908
Location: Bamberg, Germany

PostPosted: Fri Apr 22, 2022 1:07 am
Reply with quote

Use Code Tags when presenting Code/Data. It's that little button named code (works as a toggle). icon_exclaim.gif

You can try this:
Code:
OPTION COPY                                                   
INREC IFTHEN=(WHEN=INIT,                                       
  BUILD=(7,67,JFY=(SHIFT=RIGHT,PREBLANK=C')',LENGTH=60),1,5)),
  IFTHEN=(WHEN=INIT,                                           
    BUILD=(1,65,JFY=(SHIFT=LEFT,TRAIL=C')',LENGTH=80)))


PS: z/OS knows Datasets, not Files.
Back to top
View user's profile Send private message
Bhupender

New User


Joined: 21 Apr 2022
Posts: 3
Location: India

PostPosted: Fri Apr 22, 2022 5:57 pm
Reply with quote

Thanks Joerg. It’s working fine.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1615

PostPosted: Fri Apr 22, 2022 6:06 pm
Reply with quote

Bhupender wrote:
Thanks Joerg. It’s working fine.

Now you must pay to Joerg at least for one hour of his work done for you in full, from start to finish.
Please, ask him about his hourly rate?
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 Selecting the max value from a file. DFSORT/ICETOOL 3
This topic is locked: you cannot edit posts or make replies. Construct new record using specific f... DFSORT/ICETOOL 6
No new posts Change history of vsam file. JCL & VSAM 3
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
Search our Forums:

Back to Top