Posted: Thu Oct 06, 2016 12:58 pm Post subject: Remove all entries except first
hello , i have FB 80 file with thousands of records.
Would like to know, using icetool how can i remove all entries based on certain condition leaving the first entry. Any help is welcome.
Code:
My "TOOLIN *" DD has
COPY FROM(IN) TO(OUT) USING(CTL1)
My suggestion would be to copy that one record you want to a temporary file. delete the original file, then rename the 1-record temp file to the original name.
You already have the INCLUDE doing what you want for selection? Have a look at OPTION STOPAFT (have a look at things like STARTREC and ENDREC at the same time, just so you know what type of stuff is in... the manual, where everything is...).
There also the later "filter" of INCLUDE=/OMIT= on OUTFIL, plus further options there for limiting things.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum