Closed alanseiden closed 8 years ago
I like this. It provides access to a feature baked into the XMLSERVICE, a feature for exactly this purpose. Is it also a bit of a slippery slope feature, which could be abused if one gets too comfy adding commands to the list? I'm not at all saying "don't implement this;" merely thinking we might caution users to use it judiciously.
Am I being overly-cautious? I still like it! On Nov 9, 2015 12:12 AM, "Alan Seiden" notifications@github.com wrote:
The first time libraries are added to the library list, all is fine and fast:
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Exec end: 2015-11-09 01:06:07. Seconds to execute: 0.66702795028687.
The second time, a "warning"-type error, CPF2103, occurs:
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Exec end: 2015-11-09 01:06:48. Seconds to execute: 3.1658799648285.
Note that when ADDLIBLE generates the warnings, execution is slowed to more than 3 seconds. The slowness occurs because by default, XMLSERVICE reacts to errors by retrieving joblog data, which is slow to obtain.
Solution: consider XMLSERVICE's error="fast" mode ( http://yips.idevcloud.com/wiki/index.php/XMLService/XMLSERVICEQuick) for commands such as ADDLIBLE where warnings may often be ignored. "Fast" mode returns a brief error rather than a complete joblog.
One way to achieve this easily (for the CW as well as regular toolkit) would be to add something like fastErrorCommands="ADDLIBLE" to toolkit.ini; in PHP, then, when a command is run, use this list (comma-delimited) to determine if "fast" mode should be used.
— Reply to this email directly or view it on GitHub https://github.com/zendtech/IbmiToolkit/issues/54.
And we could treat CPF2103 as a non-error if so configured.
Dear Overly Cautious, yes, and ADDLIBLE is the only command I can think of now that needs this assistance. It's been discussed for years; now the issue is official thanks to Github.
Incidentally, the compatibility wrapper (CW) uses ADDLIBLE implicitly during i5_connect when a library list has been specified. CW loops through the library list and runs ADDLIBLE for each library. Hence, users may be running ADDLIBLE without knowing it. For that reason, I suggest configuring ADDLIBLE/CPF2103 to be seen as "benign" by default. Other errors such as "library not found" should still be considered serious.
Another option: ask XMLSERVICE to add "ADDLIBLE with MONMSG" as a basic capability or plugin
Closing issue because covered in #74.
The first time libraries are added to the library list, all is fine and fast:
The second time, a "warning"-type error, CPF2103, occurs:
Note that when ADDLIBLE generates the warnings, execution is slowed to more than 3 seconds. The slowness occurs because by default, XMLSERVICE reacts to errors by retrieving joblog data, which is slow to obtain.
Solution: consider XMLSERVICE's error="fast" mode (http://yips.idevcloud.com/wiki/index.php/XMLService/XMLSERVICEQuick) for commands such as ADDLIBLE where warnings may often be ignored. "Fast" mode returns a brief error rather than a complete joblog.
One way to achieve this easily (for the CW as well as regular toolkit) would be to add something like fastErrorCommands="ADDLIBLE" to toolkit.ini; in PHP, then, when a command is run, use this list (comma-delimited) to determine if "fast" mode should be used.