CPC2206 warning in spooled file

Discussion in 'PHP Toolkit' started by Sheldon Foster, Aug 14, 2015.

  1. Sheldon Foster

    Sheldon Foster New Member

    We are getting the following error in various situations, but it seems related to using the new toolkit for doing certain things:
    CPC2206: Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed
    One example of when it happens is when running the getDiagnostics() function in ToolkitServiceXML.php.
    Could it be the underlying XMLSERVICE is using QSHELL where it has to change the ownership of QZHSYSTEM?
    Any ideas how we can avoid this warning message?
     
  2. Alan

    Alan Administrator Staff Member

    Sheldon, XMLSERVICE does not use QSHELL unless asked to do so. One place where we do use QSHELL, however, is when retrieving spool files via the Compatibility Wrapper (CW). The CW function i5_spool_get_data() calls QSHELL, which sends that CPC2202 message in STDERR, and from there, to a spool file. If you experienced this message when calling i5_spool_get_data(), the issue was resolved in 1.6.1 (search for "CPC2206" in the following link to see how it was done: https://github.com/zendtech/IbmiToolkit/blob/1.6.1/ToolkitApi/CW/cw.php). Version 1.6.1 can be downloaded here: https://github.com/zendtech/IbmiToolkit/archive/1.6.1.zip

    Alan
     
  3. Sheldon Foster

    Sheldon Foster New Member

    Alan,

    Thank you for your reply. I have seen that fix but we are experiencing this issue under different circumstances, although the logic of the fix may be what we need - just not sure where we would need to put it. We are not using the CW at all. It seems to happen when we use the toolkit for things other than calling rpg programs (not in every case, but for example when we run the getDiagnostics() function). Our interim fix is to run a DLTSPLF after anything that seems to cause it, but it's kind of a band-aid fix. I need to download the XMLSERVICE rpg source code, jump in and follow what's really happening under the covers. Somewhere, somehow (at least in the case of the getDiagnostics() function) this is happening. I'll keep you posted if I find anything . . .
     
  4. Alan

    Alan Administrator Staff Member

    Sheldon, this is a test to see if you'll be notified when I reply. Let me know.
     
  5. Alan

    Alan Administrator Staff Member

    Sheldon, are you passing any parameters into getDiagnostics(), or allowing the default to be 'joblog' ? If the latter, all that's sent to XMLSERVICE is <diag info='joblog' /> . In that case, I think you're right that XMLSERVICE must be using QSHELL or QSH underneath (we could look at source code to check). In other contexts, I've seen QSHELL send the CPC2206 message to STDERR, and sometimes a spool file is generated with the message. In CW I solved this by discarding STDERR. If you think this analysis is correct then I'll ask Tony (XMLSERVICE author) about it.
     
  6. Sheldon Foster

    Sheldon Foster New Member

    Alan, we are calling getDiagnostics() without any parameters. In ToolkitService.php the function definition is as follows:
    getDiagnostics($info = 'joblog', $jobName = '', $jobUser = '', $jobNumber = '')

    We are trying to get the jobName, jobUser, and jobNumber so we can run a CHGJOB command, so the only parameter we are passing is $info.

    Your analysis does seem correct though.

    Unfortunately, we don't have XMLSERVICE source code on our machine as we just upgraded the machine a few months ago (so we have whatever comes compiled with ZendServer pre-installed on the machine, if I understand how things work). Because of that I haven't been able to look at what's actually going on in XMLSERVICE. I think we have the latest version, just no source code to look at.
     
    Last edited: Aug 27, 2015
  7. Alan

    Alan Administrator Staff Member

Share This Page