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: 7
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: 1337
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: 1337
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: 7
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 Copy only TEXT or String from a record SYNCSORT 4
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts how to complete the end of a record w... DFSORT/ICETOOL 2
Search our Forums:

Back to Top