Package com.ibm.dbb.build.smf
Class SmfRecord
- java.lang.Object
-
- com.ibm.dbb.build.smf.SmfRecord
-
- Direct Known Subclasses:
DBBSmfRecord
public class SmfRecord extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SmfRecord(byte type)
Create an object representing an SMF record header of a particular SMF type.SmfRecord(byte[] data, boolean bReadData)
Create an object representing an SMF record header using a data buffer.SmfRecord(byte type, short subtype)
Create an object representing an SMF record header of a particular SMF type and subtype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getDate()
Returns SMF record header date.byte
getFlag()
Returns SMF record header flag.byte[]
getHeader()
Returns copy of the byte array containing only the SMF record header.int
getHeaderLength()
Returns length of the SMF record header.int
getLength()
Returns the length of the SMF recordbyte[]
getRecord()
Returns a copy of the byte array containing the SMF record data.java.lang.String
getSegment()
Returns SMF record header segment.java.lang.String
getSID()
Returns SMF record header system identification.short
getSubType()
Returns SMF record header subtypebyte[]
getTime()
Returns SMF record header time.byte
getType()
Returns SMF record header type.java.lang.String
getWID()
Returns SMF record header subsystem identification.void
setWID(java.lang.String wid)
Set the SMF record header subsystem identification.java.lang.String
toString()
-
-
-
Constructor Detail
-
SmfRecord
public SmfRecord(byte type)
Create an object representing an SMF record header of a particular SMF type. The type is immutable meaning that it can't be changed once the object is created. This object maps the standard SMF record header and header with subtypes as defined at https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieag200/smfhdr.htm.- Parameters:
type
- The SMF record type
-
SmfRecord
public SmfRecord(byte type, short subtype)
Create an object representing an SMF record header of a particular SMF type and subtype. The type and subtype are immutable meaning that they can't be changed once the object is created. This object maps the standard SMF record header and header with subtypes as defined at https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieag200/smfhdr.htm.- Parameters:
type
- The SMF record typesubtype
- The SMF record subtype
-
SmfRecord
public SmfRecord(byte[] data, boolean bReadData)
Create an object representing an SMF record header using a data buffer. This is generally used when the data is read from the SMF facility using the SMF Data Dump programs. See Dumping the SMF Data Sets for more information. NOTE: It is assumed that the type, subtype, and flags already set in the buffer. NOTE: The data returned from the SMF dump programs are missing the record length and segment descriptor at the beginning of the buffer.- Parameters:
data
- A required parameter. A byte array containing SMF data usually read using the SMF record dump programs.bReadData
- Indicates that the record was read from SMF dump program and is missing record length and segment descriptor (4 bytes) at the beginning of the buffer.- Throws:
java.security.InvalidParameterException
- if data is null or byte array is shorter than a standard SMF header with subtypes (24 bytes).
-
-
Method Detail
-
getRecord
public byte[] getRecord()
Returns a copy of the byte array containing the SMF record data.- Returns:
- copy of byte array representing data.
-
getLength
public int getLength()
Returns the length of the SMF record- Returns:
- int
-
getHeader
public byte[] getHeader()
Returns copy of the byte array containing only the SMF record header.- Returns:
- copy of record header buffer.
-
getHeaderLength
public int getHeaderLength()
Returns length of the SMF record header.- Returns:
- length
-
getType
public byte getType()
Returns SMF record header type.- Returns:
- SMF record type
-
getFlag
public byte getFlag()
Returns SMF record header flag.- Returns:
- SMF record flag
-
getTime
public byte[] getTime()
Returns SMF record header time.- Returns:
- SMF record header time
-
getDate
public byte[] getDate()
Returns SMF record header date.- Returns:
- SMF record header date
-
getSID
public java.lang.String getSID()
Returns SMF record header system identification.- Returns:
- SMF record header system identification
-
getSegment
public java.lang.String getSegment()
Returns SMF record header segment.- Returns:
- SMF record header segment
-
getWID
public java.lang.String getWID()
Returns SMF record header subsystem identification.- Returns:
- null if there is no subtype, otherwise, the SMF record header subsytem identification
-
setWID
public void setWID(java.lang.String wid)
Set the SMF record header subsystem identification. This only works if a subtype was specified when creating the object. If no subtype was specified, this call has no effect.- Parameters:
wid
- subsystem identification
-
getSubType
public short getSubType()
Returns SMF record header subtype- Returns:
- subtype
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-