Topic
No replies
SystemAdmin
SystemAdmin
23 Posts
ACCEPTED ANSWER

Pinned topic CA1S Frequently Asked Questions

‏2008-12-04T22:57:08Z |
Hi all,

Below is a list of FAQs regarding REST support in CICS using PHP. We will continue to update it as more questions come in.
If your question is not answered here, don't hesitate to post a new thread!


Getting Started

  • Where can I download this SupportPac and how do I start using it?
Both the user guide (ca1s.pdf) and the SupportPac package (ca1s.zip) are available on the CA1S download page.

PHP Questions

  • Is there any relationship between the runtime for PHP in CA1s and the one in WebSphere sMash?
Yes, the technology behind the Java-based runtime for PHP is shared between CA1S and WebSphere sMash.
  • Is there any relationship between the runtime for PHP in CA1s and the one available from http://php.net?
Not in terms of code sharing for the runtime. The core runtime (the PHP 'virtual machine', if you will) is implemented in Java for CA1S and WebSphere sMash, and in C for php.net PHP.
IBM engineers are contributing tests back to the PHP project, which are directly consumable by the php.net PHP implementation. We have also spent some time working on the PHP Development Toolkit (PDT) at the Eclipse project, adding function to enable it to debug PHP code using XDebug via the DBGp protocol. Our runtime for PHP uses the DBGp protocol for it's own debug capabilities.
  • Does this SupportPac provide a complete PHP implementation?
No. The intent of this SupportPac is to provide a PHP scripting environment for programmers who want to build RESTful Web Services that expose CICS resources. To achieve this, we prioritized language level constructs above function libraries. We have a fairly complete implementation of the PHP language, but we are yet to implement the full set of functions that ship with the default distribution of php.net PHP.

Please refer to section 13 of ca1s.pdf for the list of PHP functions available in CA1S. It is our intention, over time, to provide a full set of library functions that make sense in the CICS environment. If you need functions that are not yet available, don't hesitate to let us know in this forum.

Encoding Questions

  • Why can't I view the example scripts in my text editor on z/OS?
If your editor expects EBCDIC character data, you will not see PHP code when you try to view the example scripts. The example scripts are provided in ASCII because, by default, CA1S is configured to run ISO8859-1 scripts.
You can edit the scripts on a system that supports ASCII character data, or you can convert the scripts to EBCDIC using iconv, e.g.:

iconv -f ISO8859-1 -t IBM-1047 HelloCICS.php

If you transcode the scripts to an EBCDIC code page, remember to change unicode.script_encoding in php.ini accordingly. Please see section 9 of ca1s.pdf for more information on encoding considerations.
  • Why does my browser display garbage characters when I try to view a page?
Ensure the encoding of your PHP script matches the unicode.script_encoding setting in php.ini. By default, unicode.script_encoding is set up to expect scripts encoded in ISO-8859-1.
Also, confirm that the script begins with a '<?php' tag.



JZOS Questions

  • Why do I get a 'java.lang.NegativeArraySizeException' when generating record classes from ADATA using JZOS?
Remember to run the command 'quote site rdw' and 'bin' before retrieving the ADATA via FTP.
The JZOS documentation is included in the CA1S package as "JZOS Cobol Record Generator Users Guide.pdf". For more information, see section "Running the COBOL RecordClassGenerator" of "JZOS Cobol Record Generator Users Guide.pdf".
  • When I read fields in a commarea, why do the values not contain the data I expect?
If caching was not disabled when generating the record classes, changes to commarea fields may not be reflected when reading values back out of the fields. Remember to set genCache=false in the generation step.
See section 6.2 of ca1s.pdf for more information.


Edited by: Robin_Fernandes_admin on Dec 13, 2008 4:01 AM
Updated on 2008-12-13T09:13:40Z at 2008-12-13T09:13:40Z by SystemAdmin