Hi Michael,
I would first ask you what fields you are looking for? Depending on the job types that you use, the number of columns could be quite large and that would be a bit tedious getting to the right column position. If you are only looking for the common properties, say job name, machine and some run time info like run calendars. I would suggest using the SDK. It's fairly easy to use and has examples to get you started. There is a Java and C++ versions available. Towards the middle of this links page it has the instructions on how to launch the SDK reference guide.
I have a personal preference towards the Java since it works for any OS, but that is personal choice. Here is a sample I lifted from the Java doc to get certain fields from all jobs:
private void sample(AsApi appServer) {
GetJobsWithFilterReq req = new GetJobsWithFilterReq();
JobFilterString filter =
new JobFilterString(IJobFilterString.FLT_JOB_NAME, "sample%");
int[] attributes = {
GetJobsWithFilterReq.ATTR_JOB_NAME,
GetJobsWithFilterReq.ATTR_APPLICATION,
GetJobsWithFilterReq.ATTR_JOB_TYPE,
GetJobsWithFilterReq.ATTR_GROUP
};
req.setRequest(filter, attributes);
try {
ApiResponseSet rspSet = (ApiResponseSet)req.execute(appServer);
while(rspSet.hasNext()) {
System.out.println("----- Begin Response ----");
GetJobsWithFilterRsp rsp = (GetJobsWithFilterRsp)rspSet.next();
int[] rspAttributes = rsp.getAttributes();
String name, output;
for(int i=0; i<rspAttributes.length; i++) {
int type = rsp.getAttributeType(rspAttributes[i]);
switch(type) {
case IFilterRsp.TYPE_INT:
name = rsp.getAttributeName(rspAttributes[i]);
output = name + " = " + rsp.getInt(rspAttributes[i]);
System.out.println(output);
break;
case IFilterRsp.TYPE_STRING:
name = rsp.getAttributeName(rspAttributes[i]);
output = name + " = " + rsp.getString(rspAttributes[i]);
System.out.println(output);
break;
case IFilterRsp.TYPE_DATE:
name = rsp.getAttributeName(rspAttributes[i]);
output = name + " = " + Tools.getStringFromDate(rsp.getDate(rspAttributes[i]));
System.out.println(output);
break;
case IFilterRsp.TYPE_CHAR:
name = rsp.getAttributeName(rspAttributes[i]);
output = name + " = " + rsp.getChar(rspAttributes[i]);
System.out.println(output);
break;
}
}
System.out.println("----- End Response ----\n");
}
} catch (AsGeneralErrorException genEx) {
System.out.println("AsGeneralErrorException: " + genEx.getMessage());
} catch (AsNoAttributesException noAttrEx) {
System.out.println("AsNoAttributesException: " + noAttrEx.getMessage());
} catch (AsBadAttributesException badAttrEx) {
System.out.println("AsBadAttributesException: " + badAttrEx.getMessage());
} catch (AsBadFilterFieldsException badFiltEx) {
System.out.println("AsBadFilterFieldsException: " + badFiltEx.getMessage());
} catch (AsException ex) {
System.out.println("AsException: " + ex.getMessage());
}
}
There are many more attributes you can pull as well. They come out in the order in the attributes you request.
Regards,
Mike
Original Message:
Sent: Aug 25, 2023 10:31 AM
From: Michael Botticelli
Subject: Converting JIL to MS Excel format
I know I am probably not the first to ask this but I need to be able to convert jil file to excel format in column basis so that I can use the data for analysis on a project I am doing. Thank you