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

Senior Member


Joined: 15 Aug 2015
Posts: 1245
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: 2018
Location: USA

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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top