On 25/04/2018 4:46 AM, Jousma, David wrote:
So, has anyone written a SAS/MXG program to read through these SMF30 records
yet, that they would care to share?
I have added a program to the EasySMF Java samples to do this. In Java
it looks like this:
import java.io.*;
import com.blackhillsoftware.smf.SmfRecord;
import com.blackhillsoftware.smf.SmfRecordReader;
import com.blackhillsoftware.smf.smf30.Smf30Record;
public class UserKeyCommon
{
public static void main(String[] args) throws IOException
{
try (SmfRecordReader reader = SmfRecordReader.fromDD("INPUT"))
{
reader.include(30);
boolean foundAuditEnabled = false;
int userKeyCommonFound = 0;
for (SmfRecord record : reader)
{
Smf30Record r30 = new Smf30Record(record);
if (r30.storageSection() != null)
{
if (!foundAuditEnabled &&
r30.storageSection().smf30UserKeyCommonAuditEnabled())
{
foundAuditEnabled = true;
}
if
(r30.storageSection().smf30UserKeyCommonAuditEnabled()
&& (r30.storageSection().smf30UserKeyCsaUsage()
|| r30.storageSection().smf30UserKeyCadsUsage()
||
r30.storageSection().smf30UserKeyChangKeyUsage()))
{
userKeyCommonFound++;
System.out.format(
"%-23s %-4s %-8s %-8s %-10s %-10s %-10s%n",
r30.smfDateTime(),
r30.system(),
r30.identificationSection().smf30jbn(),
r30.identificationSection().smf30jnm(),
r30.storageSection().smf30UserKeyCsaUsage() ? "CSA" : "",
r30.storageSection().smf30UserKeyCadsUsage() ? "CADS" : "",
r30.storageSection().smf30UserKeyChangKeyUsage() ? "KEYCHANGE" : "");
}
}
}
if (!foundAuditEnabled)
{
System.out.println("No records found with User Key
Common Audit Enabled!");
}
else
{
System.out.format("%d records flagged%n",
userKeyCommonFound);
}
}
}
}
I don't have any data where user key common is in use but I have tested
it as well as I can without that.
There is a 30 day trial available if anyone wants to try it out on their
system:
https://www.blackhillsoftware.com/30-day-trial/
Andrew Rowley
--
Andrew Rowley
Black Hill Software
+61 413 302 386
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN