Topic
1 reply Latest Post - ‏2011-12-19T12:10:04Z by EvanChow
DLJONES
DLJONES
6 Posts
ACCEPTED ANSWER

Pinned topic PHP calling CICS program using containers

‏2011-12-16T17:45:03Z |
I am trying to call a cobol CICS program that returns its results in a container because of the 32K limit on the size of the COMMAREA. I cannot find an example in the documentation. Does anyone have an example of this? Or is their another way of passing > 32K of data from CICS to a php application?

Thanks
Updated on 2011-12-19T12:10:04Z at 2011-12-19T12:10:04Z by EvanChow
  • EvanChow
    EvanChow
    1 Post
    ACCEPTED ANSWER

    Re: PHP calling CICS program using containers

    ‏2011-12-19T12:10:04Z  in response to DLJONES
    Hi there,
    I am afraid that there is not an existing example as you required. But there is an exmaple showing how to use COMMAREA to link COBOL problem. I attached the link as below, FYI.
    http://publib.boulder.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=%2Fcom.ibm.cics.ts.smash.doc%2Fsmash_jzos.html&resultof=%22%6a%7a%6f%73%22%20%22%6a%7a%6f%22%20
    In Dynamic Scripting, you can use JCICS API in PHP or Groovy scripts to interact with CICS.
    To use Container in Dynamic Scripting V1.0, you can try like this:
    <?php
    //Import the CICS classes
    java_import('com.ibm.cics.server.Container');
    java_import('com.ibm.cics.server.Program');
    java_import('com.ibm.cics.server.Task');

    //Prepare the channel and container
    $dsTask = Task.getTask();
    $dsChannel = $dsTask.createChannel('DSCOBOL');
    $dsContainer = $dsChannel.createContainer('DSCOBOL');
    $dsContainer.put('Hello World');

    //Link COBOL program
    $dsProgram = new Program();
    $dsProgram.setName('DSCOBOL');
    $dsProgram.link($dsChannel);
    $status = $dsChannel.getContainer('STATUS');
    echo $status.get();
    ?>
    Here is an JCICS exmaple of using Channel and Containers. Hope it can help.
    http://publib.boulder.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=%2Fcom.ibm.cics.ts.java.doc%2Ftopics%2Fdfhpjkg.html&resultof=%22%6a%63%69%63%73%22%20%22%6a%63%69%63%22%20%22%63%6f%6e%74%61%69%6e%65%72%22%20%22%63%6f%6e%74%61%69%6e%22%20