× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



--




I'm using a ProgramCall object to call an iSeries CL program from a java class.
Part of the CL function involves deleting a physical file (if exists) and then
recreating it later on. If there are no environmental problems then everything
runs OK and the file is deleted/created.

Next, I wanted to check for environmental CPF exceptions using the AS400Message
object. I used a 5250 terminal session to place an exclusive lock on the
physical file. Used a second 5250 session command line to attempt to delete the
file, this did not work and returned the exception message, CPF3202, 'File AAA
in Library BBB in use'. I would expect this. However, with the lock still in
place I executed the class to call the CL (to delete the file) but all I got was
CPF9898 with text '.'
--

 . CPF9898
is a developer's DIY CPF message for inserting your own text. I would have
expected CPF3202 or similar.

My code was , more or less, based on a fragment from the IBM toolbox website :

                AS400Message [] msgList = prog.getMessageList();

                for (int j=0; j<msgList.length; j++){
                        System.err.println(msgList [j].getID());
                        System.err.println(msgList [j].getText());
                }
where prog is the ProgramCall object.

The CL program will not actually fail because I have used a CPF MONMSG to
monitor the delete command:

             DLTF       &LIB/&FIL
             MONMSG     MSGID(CPF2100 CPF3200)

but I would expect, at least,  message CPF3202 (or similar) to be returned to
msgList and not CPF9898 which is meaningless.
Any explanations or fixes for this seemingly bizzare behaviour very welcome!

Keith




--



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.