CW doesn't recognize I5_TYPE_SHORT

General discussion on Zend Server for IBM System i
Post Reply
cedric_chapuis
Posts: 5
Joined: Wed Feb 01, 2012 5:30 pm

CW doesn't recognize I5_TYPE_SHORT

Post by cedric_chapuis » Fri Feb 03, 2012 5:11 pm

Hello,

I'm have problem with I5_TYPE_SHORT, CW does not recognize it.

Look IDLIEN, IDLIENPARENT and COUVERTURE bellow : type as blank...

Code: Select all

	<pgm name='XWBD90' lib='' func='F_LIEN'>
		<parm io='in' comment='ID_'>
			<data var='ID_' type='25a' varying='off'>12b03q063728200-673919559</data>
		</parm>

		<parm io='both' comment='XWBLIEN_'>
			<ds var='XWBLIEN_'>
				<data var='SOCIETE' type='2a' varying='off'></data>
				<data var='ETABLISSEMENT' type='2a' varying='off'></data>
				<data var='DEPARTEMENT' type='1a' varying='off'></data>
				<data var='IDENTIFICATEUR' type='3a' varying='off'></data>
				<data var='TYPEENTITE' type='6a' varying='off'></data>
				<data var='CODE1ENTITE' type='15a' varying='off'></data>
				<data var='CODE2ENTITE' type='15a' varying='off'></data>
				<data var='CODE3ENTITE' type='15a' varying='off'></data>
				<data var='IDLIENPARENT' type='' varying='off'>0</data>
				<data var='IDLIEN' type='' varying='off'>0</data>
				<data var='TYPELIEN' type='1a' varying='off'></data>
				<data var='LIBELLE' type='70a' varying='off'></data>
				<data var='IDUNIQUE' type='25a' varying='off'></data>
				<data var='EMPLACEMENT' type='15a' varying='off'></data>
				<data var='NOMORIGINE' type='128a' varying='off'></data>
				<data var='NOMSTOCKAGE' type='128a' varying='off'></data>
				<data var='TAILLE' type='10i0' varying='off'>0</data>
				<data var='TYPEMIME' type='50a' varying='off'></data>
				<data var='DTCREATION' type='10i0' varying='off'>0</data>
				<data var='DTMODIFICATION' type='10i0' varying='off'>0</data>
				<data var='STATUT' type='1a' varying='off'></data>
				<data var='COUVERTURE' type='' varying='off'>0</data>
			</ds>
		</parm>
	</pgm>
and that generate "Undefined offset: 1 in /usr/local/ZendSvr/share/ToolkitApi/cwclasses.php on line 962" in php.log before a PHP Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 109.

I'm added here in the cwclasses.php... :

Code: Select all

[...]
	protected $_typeMap = array(I5_TYPE_CHAR    => "%sa",
                               I5_TYPE_PACKED  => "%sp%s",
                               // 4 byte float
                               I5_TYPE_FLOAT   => "4f",
                               // data structure
                               I5_TYPE_STRUCT  => "ds",
                               // int32, 4 bytes
                               I5_TYPE_INT     => "10i0",
                               I5_TYPE_SHORT   => "5i0",
                               I5_TYPE_ZONED   => "%ss%s",
                               // TODO not sure if byte really maps to binary. No one knows what BYTE really does
                               I5_TYPE_BYTE    => "%sb",
                               // hole is exclusive to new toolkit.
                               'hole'          => "%sh",
                               );
[...]
XML input as now good, but the log show only PHP Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/ZendSvr/share/ToolkitApi/Db2supp.php on line 109.

Any ideas ?

Cédric
I'm just migrate two scripts... good luck if you must upgrade more !

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by aseiden » Fri Feb 03, 2012 5:56 pm

Hi, Cédric,

Does DSPMSG QSYSOPR show any messages waiting from your RPG (or other) program?

Best,
Alan Seiden

P.S. If DSPMSG QSYSOPR doesn't clear things up, contact me offline at alan@alanseiden.com. I'll help you figure it out and then we'll post the answer here on the forum.

rangercairns
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by rangercairns » Fri Feb 10, 2012 12:03 am

Look at your system settings ... they are likely 65535 (evil dead zombie)

XMLSERVICE is hanging right out of box (because CCSID 65535)

Code: Select all

Q: XMLSERVICE is returning junk, how can i fix?
Q: XMLSERVICE is not working at all and IPC /tmp/xxx dir not created, how can i fix?
Q: XMLSERVICE is hanging?
A: You need to change Apache settings.
The following steps lead to a successful test:

end current running jobs:
ENDTCPSVR SERVER(*HTTP) HTTPSVR(ZENDSVR)
ENDPJ SBS(QSYSWRK) PGM(QSQSRVR) OPTION(*IMMED)

check the system CCSID value is 65535:
DSPSYSVAL SYSVAL(QCCSID)
 Coded character set
   identifier . . . . . :   65535      1-65535

edit configuration:
/www/zendsvr/conf/fastcgi.conf (optional from editor): 
SetEnv="LANG=C"

/www/zendsvr/conf/httpd.conf (web admin GUI port 2001 - ZENDSVR):
DefaultFsCCSID 37
CGIJobCCSID 37

restart jobs:
STRPJ SBS(QSYSWRK) PGM(QSQSRVR)
STRTCPSVR SERVER(*HTTP) HTTPSVR(ZENDSVR)


wrkactjob
If you see ANY XMLSERVICE jobs, kill them before retry.

This will allow XMLSERVICE to work (IPC was junk not /tmp/whatever).
This should fix "junk" from ibm_db2 on i (odbc, pdo_ibm, etc.).

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by aseiden » Fri Feb 10, 2012 7:37 pm

Cédric's timeout was resolved with a new beta update to the toolkit. Soon it will be available to all.

As for some of the less common data types such as I5_TYPE_SHORT, we're working with Cédric to get them implemented.

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by aseiden » Fri Feb 10, 2012 11:42 pm

It's also important to set the CCSID, as indicated in rangercairns's note above. Editing the Apache httpd.conf file to add appropriate CCSID is critical to success with DB2 and PHP on IBM i. Since the new toolkit generally runs over DB2, CCSID is very important.

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by zend_i5 » Sun Feb 12, 2012 4:29 pm

The Apache CCSID could be set by using option 8 in the Zend Server for IBM i Setup Menu

cedric_chapuis
Posts: 5
Joined: Wed Feb 01, 2012 5:30 pm

Re: CW doesn't recognize I5_TYPE_SHORT

Post by cedric_chapuis » Tue Feb 14, 2012 11:08 am

Okay, no more message from execution time since I'm setting up CCSID in our Apache server.

Post Reply