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

FINDREP - Only first record from given dataset


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

New User


Joined: 06 Feb 2014
Posts: 4
Location: India

PostPosted: Tue Jan 23, 2024 6:14 pm
Reply with quote

Hi Sir,

I am using SORT FIELDS=COPY, OUTREC FINDREP=(IN=C'True',OUT=C'False') but I want to do this find and replace only for the first "TRUE" found and rest to be skipped or FINDREP should not replace rest of the records having "TRUE" except first record. I tried STOPAFT=01, but that is to copy only single records from whole dataset.

Please let me know in case any more description is needed.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Tue Jan 23, 2024 6:47 pm
Reply with quote

Add DO=1, and please remember to use Code Tags when displaying code or data to the forum.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Wed Jan 24, 2024 2:33 am
Reply with quote

While I was reviewing my answer, and you wish to apply the condition to the first record only, you must add a temporary sequence number. Use that number with what I have already written, discard at a later stage.
Back to top
View user's profile Send private message
Piyush Jadhav

New User


Joined: 06 Feb 2014
Posts: 4
Location: India

PostPosted: Fri Mar 01, 2024 8:43 pm
Reply with quote

Thanks for your input, it got sorted with DO=1.
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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top