Now I want first to OMIT all Records starting with 'LST00,'
And second to remove the Coma's on one hand and on the other I want the Value 'LST00T,' on the remaining Record beeing removed too so the ...
.... Result should look like this:
100022472 95387886 26683680
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Please use the Code tags to preserve spacing for what you post.
Pandora-Box is correct, unless you have a possible leading character for LST00T.
The FINDREP can be specified on INREC, OUTREC or OUTFIL, as well as in an IFTHEN. But you only need one FINDREP in your case, as you are only doing one thing, and all the commas on a record will be replaced by space with the FINDREP.
FINDREP can be limited by start-position, end-position and the number of replacements to make. Check the DFSORT manual for full details of FINDREP any anything else when you need to know it.
********************************* TOP OF DATA **********************************
100022472 95387886 26683680
******************************** BOTTOM OF DATA ********************************
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Andy, of the quick edit, if you change your SS to CH that bit'll be fine. Everyone 'cept Sai forgot that you wanted to drop the field after you'd found it.
Sai, did you mean to put the OUTREC on the OUTFIL? There is no need for changes in two places, they can both be on INREC or OUTREC or OUTFIL.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Interesting idea, Pandora-Box, however, since the replacement of "LST00T, " is in a fixed position, the FINDREP should reflect that, which would require two FINDREPs, so then need two of INREC/OUTREC/OUTFIL or using IFTHEN.
Danger with not doing that would be the unfortunate circumsance of finding "LST00T, " somewhere else in the record. Might be fine for a given file, but then copy the code for another file, and hand the primed grenade to Support... It would also do a lot of unneeded processing if you let FINDREP rip across the entire record when it doesn't need to.