|
Things just keep getting weirder and weirder. Here's the Program bits. The program will try to open the document first. If it is not found, via the on-error picking up the (FileNotFoundException), it creates a new one. The issue is that I'm getting an IOException thrown from the POIFSFilesSystem *CONSTRUCTOR if I sign off and back on. The monitor is catching this, and re-creating a new workbook object, instead of returning the instance of the current work book object. qualFileName = '/Public/' + %trim(getMthDesc(fclmo:'F':'L')) + %subst(%char(fclyr):3:2) + 'GL.XLS'; // instantiate a new workbook object if not found. monitor; book = hssf_Open(qualFileName); on-error; book = new_HSSFWorkbook(); endmon; So, HSSF_Open procedure of the service program, I added this code: /free wwStr = new_String(peFilename); wwFile = new_FileInputStream(wwStr); wwPOIFS = new_POIFSFileSystem(wwFile); // Trap any errors here. monitor; wwBook = new_HSSFWorkbookFromPOIFS(wwPOIFS); on-error; IOException = new_IOException(); messageString = new_msg_string(IOE_getMessage(IOException)); charOutput = %subst(String_getBytes(messageString):1:52); dsply charOutput; endmon; closeFile(wwFile); hssf_freeLocalRef(wwPOIFS); hssf_freeLocalRef(wwFile); hssf_freeLocalRef(wwStr); in order to see what may be causing the IOException. Here's where it gets weird. If I step through in Debug, it works fine whether I do it from another job or not. But, if I'm not in debug, it doesn't execute the ON-ERROR section, but it does still throw the IOException. How can I find what the problem is? No-one else seems to be having this issue. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com
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.