1) Does it work with VBS (Spanned) records? I want to read SMF data.
Most of the time we convert our SMF from VBS to VB, so this is not a
biggie.
2) Are the first four bytes of the byte[] array the LLBB field? This is
important. I used the JZOS RecordClassGenerator to create the .java
source to read the SMF data. The resulting classes map the LLBB field at
the beginning of the buffer. If the read method does not return the LLBB
at the start, then I guess that I need to use the form:
RDWInputRecordStreamVar.read(buffer,4)
and just ignore the first 4 bytes of the buffer.
Thanks,
--
John McKown
Maranatha! <><
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Sorry, the com.ibm.jzos.RDWInputStream class reads from an InputStream
of bytes which contain records that are RDW-prefixed.
Unfortunately it doesn't handle SDWs, but it probably should. Shame on us :-)
If you run your Java on z/OS, you wouldn't actually use the
RDWInputStream. Just open the SMF VBS dataset with ZFile in record
mode and you will get a complete logical record for each read():
ZFile zfile = new ZFile("//DD:SMFIN", "rb,noseek,mode=record");
byte[] buf = new byte[4096]
zfile.read(buf)
Buf off-platform: if you downloaded the SMF file using FTP and the
"RDW" option - I'm not sure that FTP wouldn't assemble the segments of
the record and just put a plain RDW?
Otherwise, you could use "fromdsn" which reads entire records, along
the the "-l rdw" option which would put a RDW (not SDW) before each
complete logical record.
But: If you used Co:Z Launcher to pipe SMF data into your off-platform
Java SMF processor, you could still use the RDWInputStream, since the
"fromdsn" commands reads entire logical records. The "-l rdw" option
will put a RDW (not an SDW) before each logical record.
Here's an example:
http://dovetail.com/docs/coz/cookbook.html#4_5
In your case, "smfp" would be replaced by your Java program which
would wrap System.in in an RDWInputStream.
And as you know, the cool thing is that the Java code is processing
records as they are transferred throug the pipe :-)
Kirk Wolf
Dovetailed Technologies
(and IBM JZOS Development)
http://dovetail.com