On Mon, 28 Jan 2008 08:16:09 -0600, Mark Zelden wrote: >On Mon, 28 Jan 2008 09:10:01 +0100, Miklos Szigetvari > wrote: > >> Searching for a method to keep/access only the tail of a dataset. >> An application writes internal traces , several million lines. I would >>like to keep only the last part of the trace. >>Any simple method to achive this ? >>(Currently I can think to pipe under USS , and write a small program to >>wrap around ) >>-- > >If you know how many records, you can use IDCAMS REPRO with SKIP(nnn). >If you don't know how many records, you would have to determine that first >and could generate the JCL with REXX for example. There are many ways >to find the number of records but the quickest may be to use the ICETOOL >or SYNCTOOL "COUNT" function. > Is this a good application for a GDG?
If this is a long-running application, is there a way to roll the generation in midstream? Can this be done without losing trace records during the switch? Would UNIX files be an alternative? There is a well-established UNIX convention for rolling daemon logs: o An external process renames the logfile. The daemon continues to write to the renamed logfile as long as it holds it open. o Either periodically or in response to an exteral signal (customarily SIGHUP) the daemon closes and reopens the logfile, now writing to a fresh logfile under the old name. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

