|
I am trying to retrieve the substitution data from an RQueuedMessage, but all I ever get is for the substitution data is null. Here is the code I am using... try { RJobLog wJobLog = new RJobLog(pAS400, pJobName, pUserName, pJobNumber); wJobLog.setSelectionValue(RJobLog.STARTING_MESSAGE_KEY, RJobLog.OLDEST); wJobLog.open(); wJobLog.waitForComplete(); long wNumberOfMessages = wJobLog.getListLength(); for(long wI = 0; wI < wNumberOfMessages; ++wI) { RQueuedMessage wQMsg = (RQueuedMessage)wJobLog.resourceAt(wI); wQMsg.load(MessageFile.SUBSTITUTE_FORMATTING_CHARACTERS); // wQMsg.load(MessageFile.NO_FORMATTING); // wQMsg.load(MessageFile.RETURN_FORMATTING_CHARACTERS); byte[] wSD = (byte[])wQMsg.getAttributeValue(wQMsg.SUBSTITUTION_DATA); System.out.println("Substitution data is always null: " + wSD); } wJobLog.close(); } catch (Exception wExc) { wExc.printStackTrace(); } The substitution data is always null (not an empty byte array). I have tried all three of the load constants, which by the way they seem to have no effect on the formatting of the second level text either. While I'm searching for answers let me ask another question. The reason I am doing this is I want to hunt down message CPI432F, which states an Access path is suggested. I then want to construct an index with information from the substitution data. I would sure think that I am re-inventing the wheel on this task. Can anyone reference me to some existing code to accomplish this? Thanks for any help in advance.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.