Re: Keep only the tail of the dataset

2008-01-29 Thread Mark Zelden
On Mon, 28 Jan 2008 17:04:26 -0600, Luis Miguel Martinez
[EMAIL PROTECTED] wrote:

Have you tried  with the USS command:

  tail -n //'my.dataset.to.read'

  where n would be the number of lines

  Please let me know if you could do it.


That should work.   But why -n without a value?   It would be
tail -n nnn //'my.dataset.to.read' where nnn is the number of 
lines wouldn't it?  With BPXBATCH and z/OS 1.8 (or 1.5-1.7 with
the proper maintenance) STDOUT can point to a MVS data set.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Mark Zelden
On Tue, 29 Jan 2008 15:49:54 -, Van Dalsen, Herbie
[EMAIL PROTECTED] wrote:

Sorry, I am still on z/OS 1.6...

If you have the PTF for OA11699 (UA23196) then you can direct STDOUT to 
SYSOUT or a MVS data set.  It's old at this point... it has been available
since December 2005.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html






-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Zelden
Sent: 29 Januarie 2008 02:48 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Mon, 28 Jan 2008 17:04:26 -0600, Luis Miguel Martinez
[EMAIL PROTECTED] wrote:

Have you tried  with the USS command:

  tail -n //'my.dataset.to.read'

  where n would be the number of lines

  Please let me know if you could do it.


That should work.   But why -n without a value?   It would be
tail -n nnn //'my.dataset.to.read' where nnn is the number of
lines wouldn't it?  With BPXBATCH and z/OS 1.8 (or 1.5-1.7 with
the proper maintenance) STDOUT can point to a MVS data set.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park,
Loughlinstown, Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the
Financial Regulator

--
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

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Van Dalsen, Herbie
Thanks.


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Zelden
Sent: 29 Januarie 2008 03:56 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Tue, 29 Jan 2008 15:49:54 -, Van Dalsen, Herbie
[EMAIL PROTECTED] wrote:

Sorry, I am still on z/OS 1.6...

If you have the PTF for OA11699 (UA23196) then you can direct STDOUT to 
SYSOUT or a MVS data set.  It's old at this point... it has been
available
since December 2005.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html






-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Zelden
Sent: 29 Januarie 2008 02:48 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Mon, 28 Jan 2008 17:04:26 -0600, Luis Miguel Martinez
[EMAIL PROTECTED] wrote:

Have you tried  with the USS command:

  tail -n //'my.dataset.to.read'

  where n would be the number of lines

  Please let me know if you could do it.


That should work.   But why -n without a value?   It would be
tail -n nnn //'my.dataset.to.read' where nnn is the number of
lines wouldn't it?  With BPXBATCH and z/OS 1.8 (or 1.5-1.7 with
the proper maintenance) STDOUT can point to a MVS data set.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park,
Loughlinstown, Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),
Pamela
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by
the
Financial Regulator

--
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

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Van Dalsen, Herbie
Sorry, I am still on z/OS 1.6...


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Zelden
Sent: 29 Januarie 2008 02:48 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Mon, 28 Jan 2008 17:04:26 -0600, Luis Miguel Martinez
[EMAIL PROTECTED] wrote:

Have you tried  with the USS command:

  tail -n //'my.dataset.to.read'

  where n would be the number of lines

  Please let me know if you could do it.


That should work.   But why -n without a value?   It would be
tail -n nnn //'my.dataset.to.read' where nnn is the number of 
lines wouldn't it?  With BPXBATCH and z/OS 1.8 (or 1.5-1.7 with
the proper maintenance) STDOUT can point to a MVS data set.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Van Dalsen, Herbie
No, I am not...

Paul Gilmartin wrote the following in this thread...
Why not? I have successfully ftp'ed raw (binary) SMF data, including the
RDWs from z/OS to Linux. I can then read the file using Java, decoding
the RDWs. UNIX itself does not care what data is being written to a
file. It is just a byte stream. Of course, if the creating program
itself does not have some way to delimit an end-of-record, then it
__might__ not be possible to reliably read the data. E.g. undefined
records which don't have an RDW, nor an end-of-record indicator (like
program objects).

Regards

Herbie
-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Gilmartin
Sent: 29 Januarie 2008 01:50
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Mon, 28 Jan 2008 18:51:47 -, Van Dalsen, Herbie wrote:

Hang on, I must be missing something...

This is my output from the tail command in OMVS in tso, which I am sure
can be used in BPXbatch. So If you mount your dataset in OMVS / USS as
/var/tailin OMVS.TAILIN and a second one as /var/tailout
OMVS.TAILOUT(empty) and issue the command tail /var/tailin 
/var/tailout, won't you get the best results ? No messing around with
other unix systems etc and code that someone needs to rewrite in 2
year's time?

You're the first person who has mentioned other unix systems;
I believe the rest of us had assumed from the beginning z/OS
Unix System Services.  This still leaves unanswered my concerns
about binary data in RECFM=V(B) and John M.'s about short
generations.

-- 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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Kirk Wolf
This might have been mentioned, but using our free Dataset Pipes
tool, this is pretty easy if your file is text, since tail would
work:

// EXEC DTLSPAWN
//LOG DD DISP=OLD,DSN=...
//STDIN DD *
   fromdsn //DD:LOG \
 | tail -2000 \
 | todsn //DD:LOG
//

If the dataset has fixed length, binary records (say length=100), then
you can do this:

// EXEC DTLSPAWN
//LOG DD DISP=OLD,DSN=...
//STDIN DD *
   fromdsn -b //DD:LOG \
 | tail -c -20 \
 | todsn -b //DD:LOG
//

But, if the data is variable AND binary, then you can't use newlines
to terminate the stream (the default for fromdsn and todsn).
You could write a program like tail that uses ibm rdws as record prefixes.
The program would read all of the records from stdin into a
wrap-around table of the limiting size and then write the table
out to stdout.   Then you could have this:

// EXEC DTLSPAWN
//LOG DD DISP=OLD,DSN=...
//STDIN DD *
   fromdsn -l ibmrdw //DD:LOG \
 | rdw-tail -2000 \
 | todsn -l ibmrdw //DD:LOG
//

(Of course, if you are going to write a program like this, you could
have it just update the dataset rather than piping).




On Jan 29, 2008 10:13 AM, Van Dalsen, Herbie
[EMAIL PROTECTED] wrote:
 Thanks.


 -Original Message-
 From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
 Behalf Of Mark Zelden

 Sent: 29 Januarie 2008 03:56 nm
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset

 On Tue, 29 Jan 2008 15:49:54 -, Van Dalsen, Herbie
 [EMAIL PROTECTED] wrote:

 Sorry, I am still on z/OS 1.6...

 If you have the PTF for OA11699 (UA23196) then you can direct STDOUT to
 SYSOUT or a MVS data set.  It's old at this point... it has been
 available
 since December 2005.

 Mark
 --
 Mark Zelden
 Sr. Software and Systems Architect - z/OS Team Lead
 Zurich North America / Farmers Insurance Group - ZFUS G-ITO
 mailto:[EMAIL PROTECTED]
 z/OS Systems Programming expert at
 http://expertanswercenter.techtarget.com/
 Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html




 
 
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
 Behalf Of Mark Zelden
 Sent: 29 Januarie 2008 02:48 nm
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 
 On Mon, 28 Jan 2008 17:04:26 -0600, Luis Miguel Martinez
 [EMAIL PROTECTED] wrote:
 
 Have you tried  with the USS command:
 
   tail -n //'my.dataset.to.read'
 
   where n would be the number of lines
 
   Please let me know if you could do it.
 
 
 That should work.   But why -n without a value?   It would be
 tail -n nnn //'my.dataset.to.read' where nnn is the number of
 lines wouldn't it?  With BPXBATCH and z/OS 1.8 (or 1.5-1.7 with
 the proper maintenance) STDOUT can point to a MVS data set.
 
 Mark
 --
 Mark Zelden
 Sr. Software and Systems Architect - z/OS Team Lead
 Zurich North America / Farmers Insurance Group - ZFUS G-ITO
 mailto:[EMAIL PROTECTED]
 z/OS Systems Programming expert at
 http://expertanswercenter.techtarget.com/
 Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
 
 --
 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
 Elavon Financial Services Limited
 Registered in Ireland: Number 418442
 Registered Office: Block E, 1st Floor, Cherrywood Business Park,
 Loughlinstown, Co. Dublin, Ireland
 Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),
 Pamela
 Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
 Elavon Financial Services Limited, trading as Elavon, is regulated by
 the
 Financial Regulator
 
 --
 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

 --
 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
 Elavon Financial Services Limited
 Registered in Ireland: Number 418442
 Registered Office: Block E, 1st Floor, Cherrywood Business Park, 
 Loughlinstown, Co. Dublin, Ireland
 Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
 Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
 Elavon Financial Services Limited, trading as Elavon, is regulated by the 
 Financial Regulator

 --
 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

Re: Keep only the tail of the dataset

2008-01-29 Thread McKown, John
And none of these relate to the original post. The OP wanted a automatic
way to have a file wrap around after n writes. He did not want a way
to write n entries to the file and then later only see the last n
entries in the file. He wanted the n+1 write to be written as the
first record on the file, n+2 to be the second, and so on. There is
basically no way to get what the OP wanted without changing his program,
which he indicated is not an option.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Zelden
 Sent: Tuesday, January 29, 2008 4:17 PM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 
 
 On Tue, 29 Jan 2008 15:35:09 -0600, McKown, John
 [EMAIL PROTECTED] wrote:
 
 And none of these relate to the original post. The OP wanted 
 a automatic
 way to have a file wrap around after n writes. 
 
 snip
 
 I'm not so sure of that.  Re-read it.  To me is sounded like 
 the OP had this
 large file, but was only interested in the last n records.   
 Perhaps they
 will clarify.
 
 Mark

Yes, after rereading the OP, I can see that now. So, the simple way is
to put the data to a temporary file, then write another small program
which buffers the last n records in memory. When that program gets
EOF, then write the buffered records. Or use the tail command as so
many others have indicated.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Kirk Wolf
John,

Sorry, I read the original question to mean how can I truncate a
dataset to the last n lines.

In any case, I agree with your earlier post - if you really want it to
only *ever* keep the last n lines,
then an wrap-around RRDS is the way to go (if you can change the program).

Kirk

On Jan 29, 2008 3:35 PM, McKown, John [EMAIL PROTECTED] wrote:
 And none of these relate to the original post. The OP wanted a automatic
 way to have a file wrap around after n writes. He did not want a way
 to write n entries to the file and then later only see the last n
 entries in the file. He wanted the n+1 write to be written as the
 first record on the file, n+2 to be the second, and so on. There is
 basically no way to get what the OP wanted without changing his program,
 which he indicated is not an option.

 --
 John McKown
 Senior Systems Programmer
 HealthMarkets
 Keeping the Promise of Affordable Coverage
 Administrative Services Group
 Information Technology

 The information contained in this e-mail message may be privileged
 and/or confidential.  It is for intended addressee(s) only.  If you are
 not the intended recipient, you are hereby notified that any disclosure,
 reproduction, distribution or other use of this communication is
 strictly prohibited and could, in certain circumstances, be a criminal
 offense.  If you have received this e-mail in error, please notify the
 sender by reply and delete this message without copying or disclosing
 it.

 --

 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


--
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


Re: Keep only the tail of the dataset

2008-01-29 Thread Mark Zelden
On Tue, 29 Jan 2008 15:35:09 -0600, McKown, John
[EMAIL PROTECTED] wrote:

And none of these relate to the original post. The OP wanted a automatic
way to have a file wrap around after n writes. 

snip

I'm not so sure of that.  Re-read it.  To me is sounded like the OP had this
large file, but was only interested in the last n records.   Perhaps they
will clarify.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Miklos Szigetvari
 Sent: Monday, January 28, 2008 2:10 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Keep only the tail of the dataset
 
 
 Hi
 
 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 )
 
 -- 
 Miklos Szigetvari

If you want a wrap around type log, then I think that the easiest way
to do so would be to have a preformatted BDAM or VSAM RRDS dataset. I'd
personally go with the RRDS. Have the first record be dedicated to
keeping the next record number to write. Also, have the maximum record
number in there. Now have your subroutine simply increment the record
number and wrap around from the max to 1 (skipping 0). You could either
update record 0 upon every write (high overhead) or only periodically. I
would also keep a timestamp in every record so that you could use SORT
to put the records in order. This is about as simple as I can think of
off-hand.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Mark Zelden
On Mon, 28 Jan 2008 09:10:01 +0100, Miklos Szigetvari
[EMAIL PROTECTED] wrote:

Hi

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.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Bill Wilkie
If you only want the last 2,000 records or so, why not just close the file and 
reopen it every 3,000 or so records?  
 
Bill
 
 Date: Mon, 28 Jan 2008 15:41:03 +0100 From: [EMAIL PROTECTED] Subject: Re: 
 Keep only the tail of the dataset To: IBM-MAIN@BAMA.UA.EDU  Hi  I mean 
 the program is ready and working , so no program  modification, and it shoud 
 happen in flight For example keep only the last part of the trace.  
 McKown, John wrote:  -Original Message- From: IBM Mainframe 
 Discussion List  [mailto:[EMAIL PROTECTED] On Behalf Of Miklos Szigetvari 
 Sent: Monday, January 28, 2008 2:10 AM To: IBM-MAIN@BAMA.UA.EDU 
 Subject: Keep only the tail of the datasetHi   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 )  --  Miklos Szigetvari If you want a 
 wrap around type log, then I think that the easiest way to do so would be 
 to have a preformatted BDAM or VSAM RRDS dataset. I'd personally go with 
 the RRDS. Have the first record be dedicated to keeping the next record 
 number to write. Also, have the maximum record number in there. Now have 
 your subroutine simply increment the record number and wrap around from the 
 max to 1 (skipping 0). You could either update record 0 upon every write 
 (high overhead) or only periodically. I would also keep a timestamp in 
 every record so that you could use SORT to put the records in order. This 
 is about as simple as I can think of off-hand.  -- John McKown 
 Senior Systems Programmer HealthMarkets Keeping the Promise of 
 Affordable Coverage Administrative Services Group Information Technology 
  The information contained in this e-mail message may be privileged 
 and/or confidential. It is for intended addressee(s) only. If you are not 
 the intended recipient, you are hereby notified that any disclosure, 
 reproduction, distribution or other use of this communication is strictly 
 prohibited and could, in certain circumstances, be a criminal offense. If 
 you have received this e-mail in error, please notify the sender by reply 
 and delete this message without copying or disclosing it.   
 -- 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   --  Miklos 
 Szigetvari  Development Team ISIS Information Systems Gmbh  tel: (+43) 
 2236 27551 570 Fax: (+43) 2236 21081   E-mail: [EMAIL PROTECTED]   Info: 
 [EMAIL PROTECTED]  Hotline: +43-2236-27551-111   Visit our Website: 
 http://www.isis-papyrus.com  
 --- This e-mail 
 is only intended for the recipient and not legally binding. Unauthorised 
 use, publication, reproduction or disclosure of the content of this e-mail 
 is not permitted. This email has been checked for known viruses, but ISIS 
 accepts no responsibility for malicious or inappropriate content. 
 ---   
 -- 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
--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Paul Gilmartin
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Miklos Szigetvari

Hi

   I mean the program is ready and working , so no program 
modification, and it shoud happen in flight

For example keep only the last  part of the trace.

McKown, John wrote:


-Original Message-
From: IBM Mainframe Discussion List 
[mailto:[EMAIL PROTECTED] On Behalf Of Miklos Szigetvari

Sent: Monday, January 28, 2008 2:10 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Keep only the tail of the dataset


   Hi

   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 )


--
Miklos Szigetvari
   



If you want a wrap around type log, then I think that the easiest way
to do so would be to have a preformatted BDAM or VSAM RRDS dataset. I'd
personally go with the RRDS. Have the first record be dedicated to
keeping the next record number to write. Also, have the maximum record
number in there. Now have your subroutine simply increment the record
number and wrap around from the max to 1 (skipping 0). You could either
update record 0 upon every write (high overhead) or only periodically. I
would also keep a timestamp in every record so that you could use SORT
to put the records in order. This is about as simple as I can think of
off-hand.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 


--
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


 



--
Miklos Szigetvari

Development Team
ISIS Information Systems Gmbh 
tel: (+43) 2236 27551 570
Fax: (+43) 2236 21081 

E-mail: [EMAIL PROTECTED] 

Info: [EMAIL PROTECTED] 
Hotline: +43-2236-27551-111 

Visit our Website: http://www.isis-papyrus.com 
---

This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS accepts
no responsibility for malicious or inappropriate content.
--- 


--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
 Sent: Monday, January 28, 2008 9:43 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 

[snip]

 Ah, but FTP has the (LOC)SITE RDW command.  Alas, DD PATH=...
 supports no analogous FILEDATA=RDW option.  With FILEDATA=BINARY,
 RDWs are entirely disregarded and the data are streamed; with
 FILEDATA=TEXT, the RDWs are replaced by 0x15, which might be
 spoofed by binary data.
 
 -- gil

That is WEIRD! The BSAM interface actually modifies the binary byte
stream with FILEDATA=DATA and RECFM=V by removing the RDW? That is,
like, totally gross! What wippo thought __that__ up?!?

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Bill Wilkie
 Sent: Monday, January 28, 2008 9:16 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 
 
 If you only want the last 2,000 records or so, why not just 
 close the file and reopen it every 3,000 or so records?  
  
 Bill

1) The OP has stated that the program is written and may no longer be
modified.

2) Since the program does not know when it may terminate, it is possible
that the last OPEN would be just before the program is to terminate,
thereby making the trace file have 0 records.

Another possibility, which I am not suggesting, but only mentioning, is
to use GPSAM from the CBT. This function uses subsystems to redirect
Q/BSAM output to another program, similar to a pipe.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
 Sent: Monday, January 28, 2008 9:10 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset

[snip]

 Might yet be done allocating the trace file in JCL to a named
 pipe (FIFO) to be read by a chopping daemon.  The FIFO could
 be allocated and the daemon started in a prior job step.  Two
 likely problems:
 
 o If the trace records are variable length containing binary
   information, that can not be preserved in a Unix file.

Why not? I have successfully ftp'ed raw (binary) SMF data, including the
RDWs from z/OS to Linux. I can then read the file using Java, decoding
the RDWs. UNIX itself does not care what data is being written to a
file. It is just a byte stream. Of course, if the creating program
itself does not have some way to delimit an end-of-record, then it
__might__ not be possible to reliably read the data. E.g. undefined
records which don't have an RDW, nor an end-of-record indicator (like
program objects).

 
 o If the daemon crashes, it soon takes the application down
   with it.

Hum, I haven't tried, but I was under the impression that if the
reader went down, the writer would soon stop due to the buffer being
full. The writer would then wait until a reader started up again.
Oh, wait, yeah, a S522 on the writer might occur if it took too long
to restart the reader.

 
 -- gil



--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Miklos Szigetvari
 Sent: Monday, January 28, 2008 8:41 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 
 
 Hi
 
 I mean the program is ready and working , so no program 
 modification, and it shoud happen in flight
 For example keep only the last  part of the trace.

Ah! My bad. In that case, I guess you would need to pipe the output to
another process which would actually implement the wrap around logic
to a file. I don't know of any such program, off hand. Does the Batch
PIPES product still exist? That might be easier to implement than doing
it yourself using UNIX facilities. The main problem that I see is
starting the UNIX receiver process when your program starts. Unless your
program is a UNIX program, then it is rather simple to start up the
receiver using shell piping.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Paul Gilmartin
On Mon, 28 Jan 2008 08:54:45 -0600, McKown, John wrote:

 -Original Message-
 [mailto:[EMAIL PROTECTED] On Behalf Of Miklos Szigetvari
 Sent: Monday, January 28, 2008 8:41 AM

 I mean the program is ready and working , so no program
 modification, and it shoud happen in flight
 For example keep only the last  part of the trace.

Ah! My bad. In that case, I guess you would need to pipe the output to
another process which would actually implement the wrap around logic
to a file. I don't know of any such program, off hand. Does the Batch
PIPES product still exist? That might be easier to implement than doing
it yourself using UNIX facilities. The main problem that I see is
starting the UNIX receiver process when your program starts. Unless your
program is a UNIX program, then it is rather simple to start up the
receiver using shell piping.

Might yet be done allocating the trace file in JCL to a named
pipe (FIFO) to be read by a chopping daemon.  The FIFO could
be allocated and the daemon started in a prior job step.  Two
likely problems:

o If the trace records are variable length containing binary
  information, that can not be preserved in a Unix file.

o If the daemon crashes, it soon takes the application down
  with it.

-- 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


Re: Keep only the tail of the dataset

2008-01-28 Thread Van Dalsen, Herbie
I take it IDCAMS have not been modified for the last 20 years... It
would be nice if it could do what the tail command does in
unix/uss/OMVS... Just a thought, maybe read thru the file or use some or
other record counter, and only leave you with the last few records on
display.

Just my wish-list for the day...

Herbie


-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Zelden
Sent: 28 Januarie 2008 02:16 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

On Mon, 28 Jan 2008 09:10:01 +0100, Miklos Szigetvari
[EMAIL PROTECTED] wrote:

Hi

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.

Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[EMAIL PROTECTED]
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Paul Gilmartin
On Mon, 28 Jan 2008 09:18:21 -0600, McKown, John wrote:

 Might yet be done allocating the trace file in JCL to a named
 pipe (FIFO) to be read by a chopping daemon.  The FIFO could
 be allocated and the daemon started in a prior job step.  Two
 likely problems:

 o If the trace records are variable length containing binary
   information, that can not be preserved in a Unix file.

Why not? I have successfully ftp'ed raw (binary) SMF data, including the
RDWs from z/OS to Linux. I can then read the file using Java, decoding
the RDWs. UNIX itself does not care what data is being written to a
file. It is just a byte stream. Of course, if the creating program
itself does not have some way to delimit an end-of-record, then it
__might__ not be possible to reliably read the data. E.g. undefined
records which don't have an RDW, nor an end-of-record indicator (like
program objects).

Ah, but FTP has the (LOC)SITE RDW command.  Alas, DD PATH=...
supports no analogous FILEDATA=RDW option.  With FILEDATA=BINARY,
RDWs are entirely disregarded and the data are streamed; with
FILEDATA=TEXT, the RDWs are replaced by 0x15, which might be
spoofed by binary data.

-- 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


Re: Keep only the tail of the dataset

2008-01-28 Thread Van Dalsen, Herbie
Hang on, I must be missing something...


This is my output from the tail command in OMVS in tso, which I am sure can be 
used in BPXbatch. So If you mount your dataset in OMVS / USS as /var/tailin 
OMVS.TAILIN and a second one as /var/tailout OMVS.TAILOUT(empty) and issue the 
command tail /var/tailin  /var/tailout, won't you get the best results ? No 
messing around with other unix systems etc and code that someone needs to 
rewrite in 2 year's time?

Regards

Herbie


--
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

-tailtest-(EOF)

# tail tailtest
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

--
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

#
 ===
RUNNING
ESC=¢   1=Help  2=SubCmd3=HlpRetrn  4=Top   5=Bottom6=TSO
7=BackScr   8=Scroll9=NextSess 10=Refresh  11=FwdRetr  12=Retrieve



-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of 
McKown, John
Sent: 28 Januarie 2008 04:59 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
 Sent: Monday, January 28, 2008 10:49 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 

[snip]

 On Mon, 28 Jan 2008 09:34:19 -0600, McKown, John wrote:
 
 2) Since the program does not know when it may terminate, it 
 is possible
 that the last OPEN would be just before the program is to terminate,
 thereby making the trace file have 0 records.
 
 Have you a problem with that?  What?

Well, if I were expecting to see the last n records output, then I'd
be pretty upset to get 0 when I knew that some were indeed output.

 

[snip]

 This is identical to the behavior of FTP with the BINARY and ASCII
 options respectively, and absent SITE RDW, both of which have their
 uses.  The wippo merely failed to perceive the need for an RDW option.
 (is ASCII compatible with RDW?)
 
 -- gil

Well, I consider it to be weird. Personal opinion, I guess. The
Dovetailed Technologies' fromdsn has an option to retain IBM
compatable RDWs in the output, or not, as an option. Of course, that
doesn't help if I want to output via JCL. So, somebody thought that
keeping RDWs might be important. Of course, I don't know how that option
would be architected in JCL.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins,  Terrance Dolan (USA),  Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
 Sent: Monday, January 28, 2008 10:49 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 

[snip]

 On Mon, 28 Jan 2008 09:34:19 -0600, McKown, John wrote:
 
 2) Since the program does not know when it may terminate, it 
 is possible
 that the last OPEN would be just before the program is to terminate,
 thereby making the trace file have 0 records.
 
 Have you a problem with that?  What?

Well, if I were expecting to see the last n records output, then I'd
be pretty upset to get 0 when I knew that some were indeed output.

 

[snip]

 This is identical to the behavior of FTP with the BINARY and ASCII
 options respectively, and absent SITE RDW, both of which have their
 uses.  The wippo merely failed to perceive the need for an RDW option.
 (is ASCII compatible with RDW?)
 
 -- gil

Well, I consider it to be weird. Personal opinion, I guess. The
Dovetailed Technologies' fromdsn has an option to retain IBM
compatable RDWs in the output, or not, as an option. Of course, that
doesn't help if I want to output via JCL. So, somebody thought that
keeping RDWs might be important. Of course, I don't know how that option
would be architected in JCL.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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


Re: Keep only the tail of the dataset

2008-01-28 Thread Paul Gilmartin
On Mon, 28 Jan 2008 09:18:21 -0600, McKown, John wrote:

 o If the daemon crashes, it soon takes the application down
   with it.

Hum, I haven't tried, but I was under the impression that if the
reader went down, the writer would soon stop due to the buffer being
full. The writer would then wait until a reader started up again.
Oh, wait, yeah, a S522 on the writer might occur if it took too long
to restart the reader.

I tried.  That's how z/OS behaves.  However on both OS X and Solaris,
with the following program:

535 $ cat breakfifo
#! /bin/sh

mkfifo foofifo

while ( set -x;  date ) do sleep 1; done foofifo 

while ( set -x; head -3 foofifo); do sleep 2; done
536 $ 

... I get:

536 $ ./breakfifo
mkfifo: foofifo: File exists
./breakfifo 7 +head -3 foofifo
./breakfifo 5 +date
Mon Jan 28 09:26:24 MST 2008
./breakfifo 5 +date
Mon Jan 28 09:26:25 MST 2008
./breakfifo 5 +date
Mon Jan 28 09:26:26 MST 2008
./breakfifo 5 +date
./breakfifo: line 5: 10385 Broken pipe date
./breakfifo 7 +head -3 foofifo
^C

... I'm inclined to distrust any construct where z/OS deviates
from the majority of UNIX systems I try; IBM might actually fix
it one day.  (I haven't consulted POSIX.)


On Mon, 28 Jan 2008 09:34:19 -0600, McKown, John wrote:

2) Since the program does not know when it may terminate, it is possible
that the last OPEN would be just before the program is to terminate,
thereby making the trace file have 0 records.

Have you a problem with that?  What?


On Mon, 28 Jan 2008 09:50:46 -0600, McKown, John wrote:

 Ah, but FTP has the (LOC)SITE RDW command.  Alas, DD PATH=...
 supports no analogous FILEDATA=RDW option.  With FILEDATA=BINARY,
 RDWs are entirely disregarded and the data are streamed; with
 FILEDATA=TEXT, the RDWs are replaced by 0x15, which might be
 spoofed by binary data.

That is WEIRD! The BSAM interface actually modifies the binary byte
stream with FILEDATA=DATA and RECFM=V by removing the RDW? That is,
like, totally gross! What wippo thought __that__ up?!?

This is identical to the behavior of FTP with the BINARY and ASCII
options respectively, and absent SITE RDW, both of which have their
uses.  The wippo merely failed to perceive the need for an RDW option.
(is ASCII compatible with RDW?)

-- 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


Re: Keep only the tail of the dataset

2008-01-28 Thread Luis Miguel Martinez
Have you tried  with the USS command:
   
  tail -n //'my.dataset.to.read' 
   
  where n would be the number of lines
   
  Please let me know if you could do it.
   


Van Dalsen, Herbie [EMAIL PROTECTED] escribió:
  Hang on, I must be missing something...


This is my output from the tail command in OMVS in tso, which I am sure can be 
used in BPXbatch. So If you mount your dataset in OMVS / USS as /var/tailin 
OMVS.TAILIN and a second one as /var/tailout OMVS.TAILOUT(empty) and issue the 
command tail /var/tailin  /var/tailout, won't you get the best results ? No 
messing around with other unix systems etc and code that someone needs to 
rewrite in 2 year's time?

Regards

Herbie


--
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

-tailtest-(EOF)

# tail tailtest
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

--
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

#
===
RUNNING
ESC=¢ 1=Help 2=SubCmd 3=HlpRetrn 4=Top 5=Bottom 6=TSO
7=BackScr 8=Scroll 9=NextSess 10=Refresh 11=FwdRetr 12=Retrieve



-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of 
McKown, John
Sent: 28 Januarie 2008 04:59 nm
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Keep only the tail of the dataset

 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
 Sent: Monday, January 28, 2008 10:49 AM
 To: IBM-MAIN@BAMA.UA.EDU
 Subject: Re: Keep only the tail of the dataset
 

[snip]

 On Mon, 28 Jan 2008 09:34:19 -0600, McKown, John wrote:
 
 2) Since the program does not know when it may terminate, it 
 is possible
 that the last OPEN would be just before the program is to terminate,
 thereby making the trace file have 0 records.
 
 Have you a problem with that? What?

Well, if I were expecting to see the last n records output, then I'd
be pretty upset to get 0 when I knew that some were indeed output.

 

[snip]

 This is identical to the behavior of FTP with the BINARY and ASCII
 options respectively, and absent SITE RDW, both of which have their
 uses. The wippo merely failed to perceive the need for an RDW option.
 (is ASCII compatible with RDW?)
 
 -- gil

Well, I consider it to be weird. Personal opinion, I guess. The
Dovetailed Technologies' fromdsn has an option to retain IBM
compatable RDWs in the output, or not, as an option. Of course, that
doesn't help if I want to output via JCL. So, somebody thought that
keeping RDWs might be important. Of course, I don't know how that option
would be architected in JCL.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
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
Elavon Financial Services Limited
Registered in Ireland: Number 418442
Registered Office: Block E, 1st Floor, Cherrywood Business Park, Loughlinstown, 
Co. Dublin, Ireland
Directors: Robert Abele (USA), John Collins, Terrance Dolan (USA), Pamela 
Joseph (USA), Declan Lynch, John McNally, Malcolm Towlson
Elavon Financial Services Limited, trading as Elavon, is regulated by the 
Financial Regulator

--
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



Luis Miguel Martinez Chavez
IT Specialist
DB2 ZOS/LUW
Solaris/Linux/AIX
   
-

¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
http://correo.yahoo.com.mx

Re: Keep only the tail of the dataset

2008-01-28 Thread Paul Gilmartin
On Mon, 28 Jan 2008 18:51:47 -, Van Dalsen, Herbie wrote:

Hang on, I must be missing something...

This is my output from the tail command in OMVS in tso, which I am sure can be 
used in BPXbatch. So If you mount your dataset in OMVS / USS as /var/tailin 
OMVS.TAILIN and a second one as /var/tailout OMVS.TAILOUT(empty) and issue the 
command tail /var/tailin  /var/tailout, won't you get the best results ? No 
messing around with other unix systems etc and code that someone needs to 
rewrite in 2 year's time?

You're the first person who has mentioned other unix systems;
I believe the rest of us had assumed from the beginning z/OS
Unix System Services.  This still leaves unanswered my concerns
about binary data in RECFM=V(B) and John M.'s about short
generations.

-- 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