├── .bumpversion.cfg ├── .github └── dco.yml ├── .gitignore ├── CONTRIBUTING.md ├── Jenkinsfile ├── LICENSE ├── Makefile.in ├── README.md ├── configure ├── contributors.txt ├── docs ├── Makefile ├── ccsids.rst ├── conf.py ├── connections.rst ├── date-time-timestamp.rst ├── debugging.rst ├── errors.rst ├── examples.rst ├── faq.rst ├── faster.rst ├── functions.rst ├── generic-interface.rst ├── idle-timeout.rst ├── index.rst ├── intro.rst ├── ipc.rst ├── library-list.rst ├── performance.rst ├── qtemp.rst ├── source-layout.rst ├── varchar.rst └── wiki-dump │ ├── ccsids.txt │ ├── ccsids.wiki │ ├── changelog.txt │ ├── changelog.wiki │ ├── connections.txt │ ├── connections.wiki │ ├── date-time-timestamp.txt │ ├── date-time-timestamp.wiki │ ├── debugging.txt │ ├── debugging.wiki │ ├── errors.txt │ ├── errors.wiki │ ├── faq.txt │ ├── faq.wiki │ ├── faster.txt │ ├── faster.wiki │ ├── functions.txt │ ├── functions.wiki │ ├── generic-interface.txt │ ├── generic-interface.wiki │ ├── idle-timeout.txt │ ├── idle-timeout.wiki │ ├── install.txt │ ├── install.wiki │ ├── intro.wiki │ ├── ipc.txt │ ├── ipc.wiki │ ├── library-list.txt │ ├── library-list.wiki │ ├── performance.txt │ ├── performance.wiki │ ├── qtemp.txt │ ├── qtemp.wiki │ ├── rpg-web-services.txt │ ├── rpg-web-services.wiki │ ├── source-layout.txt │ ├── source-layout.wiki │ ├── test_versions.txt │ ├── test_versions.wiki │ ├── varchar.txt │ └── varchar.wiki ├── parse.sh ├── src ├── plugbug.rpgle ├── plugbug_h.rpgle ├── plugcach.rpgle ├── plugcach_h.rpgle ├── plugcli_h.rpgle ├── plugconf.rpgle.in ├── plugconf_h.rpgle ├── plugconv.rpgle ├── plugconv_h.rpgle ├── plugdb2.rpgle ├── plugdb2_h.rpgle ├── plugerr.rpgle ├── plugerr_h.rpgle ├── plugile.rpgle ├── plugile_h.rpgle ├── plugipc.rpgle ├── plugipc_h.rpgle ├── pluglic.rpgle ├── pluglic_h.rpgle ├── plugmri_h.rpgle ├── plugpase.rpgle ├── plugpase_h.rpgle ├── plugperf.rpgle ├── plugperf_h.rpgle ├── plugrun.rpgle ├── plugrun_h.rpgle ├── plugsig.rpgle ├── plugsig_h.rpgle ├── plugsql.rpgle ├── plugsql_h.rpgle ├── plugxml.rpgle ├── plugxml_h.rpgle ├── rpgsql.rpgle ├── xmlcgi.rpgle ├── xmllogp.rpgle ├── xmlmain.rpgle ├── xmlservice.rpgle ├── xmlstoredp.bnd ├── xmlstoredp.sql.in ├── xmlstoredp.sqlrpgle ├── xmlver.c ├── zzbigboy.rpgle ├── zzcall.rpgle ├── zzcust.rpgle ├── zzdeep.rpgle ├── zzerich.rpgle ├── zzjava.sqlrpgle ├── zzjava2.rpgle ├── zzmore.rpgle ├── zznone.rpgle ├── zzshlomo.clp ├── zzsimp.rpgle ├── zzsrv.rpgle ├── zzsrv6.rpgle ├── zzvlad.rpgle ├── zzvlad2.rpgle └── zzvlad3.rpgle ├── test ├── byval │ ├── make.sh │ ├── testdiag.py │ ├── testref.py │ ├── testsrvx.rpgle │ ├── testval.py │ ├── testval2.py │ └── testzsrv.rpgle ├── js │ ├── ftpcompile.sh │ └── sample.html └── php │ ├── ZendCall.pdf │ ├── ZendEssay.txt │ ├── ZendStar.png │ ├── authorization.php │ ├── connection.inc │ ├── db2sql.inc │ ├── ftpcompile.sh │ ├── ftpfew.sh │ ├── ibm_db2.ini-here │ ├── license.inc │ ├── skipifcw.inc │ ├── skipifdb2.inc │ ├── skipifibmi.inc │ ├── skipifodbc.inc │ ├── skipifpdo.inc │ ├── skipifrest.inc │ ├── skipiftoolkit.inc │ ├── test_00000_LEGAL_ibm_db2_io_license.phpt │ ├── test_10010_SESSION_ibm_db2_io.phpt │ ├── test_10050_ZZNONE_ibm_db2_io_none.phpt │ ├── test_10100_ZZNADA_ibm_db2_io_nada.phpt │ ├── test_10101_ZZNADA_ibm_db2_io_nada.phpt │ ├── test_10102_ZZNADA_ibm_db2_io_nada.phpt │ ├── test_10110_ZZCALL_ibm_db2_io_nolib.phpt │ ├── test_10120_ZZCALL_ibm_db2_io_pgm.phpt │ ├── test_10121_ZZCALL_ibm_db2_io_twoxml.phpt │ ├── test_10122_ZZCALL_ibm_db2_set_pgm.phpt │ ├── test_10123_ZZCALL_rest_get_pgm.phpt │ ├── test_10124_ZZCALL_rest_post_pgm.phpt │ ├── test_10125_ZZCALL_odbc_set_pgm.phpt │ ├── test_10126_ZZCALL_pdo_ibm_io_pgm.phpt │ ├── test_10127_ZZCALL_pdo_ibm_set_pgm.phpt │ ├── test_10128_ZZNADA_ZZCALL_ZZNADA_ibm_db2_io_nada.phpt │ ├── test_10129_ZZNONE_ZZCALL_ZZNONE_ibm_db2_io_none.phpt │ ├── test_10130_ZZVLAD_ibm_db2_io-pgm.phpt │ ├── test_10131_ZZVLAD_ibm_db2_io-pgm.phpt │ ├── test_10135_ZZVLAD2_ibm_db2_io-pgm.phpt │ ├── test_10136_ZZVLAD2_ibm_db2_io-pgm.phpt │ ├── test_10138_ZZVLAD3_ibm_db2_io-pgm.phpt │ ├── test_10140_ZZSTEP_ibm_db2_io_step.phpt │ ├── test_10141_ZZSTEP_ibm_db2_set_stephex.phpt │ ├── test_10142_ZZSTEP_odbc_set_step.phpt │ ├── test_10143_ZZSTEP_odbc_set_stephex.phpt │ ├── test_10144_ZZSTEP_rest_get_stephex.phpt │ ├── test_10150_ZZBIGI_db2_io_limit.phpt │ ├── test_10155_ZZCUST_ibm_db2_io_dou.phpt │ ├── test_10160_ZZARRAY_ibm_db2_io_array.phpt │ ├── test_10161_ZZARRAY_ibm_db2_set_array_bigger.phpt │ ├── test_10162_ZZARRAY_ibm_db2_set_array_big.phpt │ ├── test_10163_ZZARRAY_ibm_db2_set_array_small.phpt │ ├── test_10165_ZZARRAY2_ibm_db2_io_array.phpt │ ├── test_10166_ZZARRAY_rest_post_array_bigger.phpt │ ├── test_10167_ZZARRAY_odbc_set_array_small.phpt │ ├── test_10168_ZZARRAY_pdo_ibm_io_array.phpt │ ├── test_10169_ZZARRAY_pdo_ibm_set_array.phpt │ ├── test_10170_ZZARRAY_overlay_ibm_db2_io_array.phpt │ ├── test_10171_ZZARRAY_hole_overlay_ibm_db2_array.phpt │ ├── test_10172_V6_ZZARRAY3_ibm_db2_io_array.phpt │ ├── test_10173_V6_ZZARRAY3_ibm_db2_io_array.phpt │ ├── test_10174_ZZARRAY_ibm_db2_io_array_not_atrtribute.phpt │ ├── test_10175_ZZARRAY_ibm_db2_io_array_not_atrtribute_hex.phpt │ ├── test_10180_ZZBIG_ibm_db2_io_big.phpt │ ├── test_10181_ZZBIG_overlay_ibm_db2_io_big.phpt │ ├── test_10182_ZZBIG_overlay_ibm_db2_io_big.phpt │ ├── test_10183_ZZBIG_overlay_ibm_db2_io_big.phpt │ ├── test_10190_ZZDEEP_ibm_db2_deep.phpt │ ├── test_10195_ZZTON_ibm_db2.phpt │ ├── test_10200_ZZVARY_ibm_db2_io_varying.phpt │ ├── test_10201_ZZVARY_odbc_set_varying.phpt │ ├── test_10202_ZZVARY_db2_io_cdata.phpt │ ├── test_10203_ZZVARY_rest_post_cdata.phpt │ ├── test_10204_ZZVARY_rest_get_cdata.phpt │ ├── test_10205_ZZVARY_db2_set_cdata.phpt │ ├── test_10206_ZZVARY_odbc_set_cdata.phpt │ ├── test_10220_ZZBINARY_odbc_set_binary.phpt │ ├── test_10221_ZZBINARY_db2_io_binary.phpt │ ├── test_10222_ZZBINARY_rest_post_binary.phpt │ ├── test_10223_ZZBINARY_db2_set_binary.phpt │ ├── test_10240_ZZPDF_db2_io_pdf.phpt │ ├── test_10241_ZZPDF_rest_post_pdf.phpt │ ├── test_10242_ZZPDF_db2_set_pdf.phpt │ ├── test_10243_ZZPDF_odbc_set_pdf.phpt │ ├── test_10244_ZZPDF_pdo_ibm_set_pdf.phpt │ ├── test_10245_ZZPDF_pdo_ibm_io_pdf.phpt │ ├── test_10260_ZZDATE_ibm_db2_io_date.phpt │ ├── test_10261_ZZDATE_ibm_db2_io_dateUSA.phpt │ ├── test_10300_ZZTIME_ibm_db2_io_time.phpt │ ├── test_10301_ZZTIME_ibm_db2_io_timeUSA.phpt │ ├── test_10310_ZZOMIT_ibm_db2_io_varying.phpt │ ├── test_10311_ZZOMIT_ibm_db2_io_varying.phpt │ ├── test_10340_ZZSTAMP_ibm_db2_io_timestamp.phpt │ ├── test_10360_ZZERICH_ibm_db2_erich.phpt │ ├── test_10361_ZZERICH_ibm_db2_erich.phpt │ ├── test_10362_ZZERICH_ibm_db2_erich.phpt │ ├── test_10502_MISC_ibm_db2_io_sh_ls.phpt │ ├── test_10503_MISC_ibm_db2_io_sh_rows_ls.phpt │ ├── test_10504_MISC_ibm_db2_io_sh_wrkactjob.phpt │ ├── test_10505_MISC_ibm_db2_io_sh_rows_ls_cdata.phpt │ ├── test_10507_MISC_rest_post_sh_ls.phpt │ ├── test_10508_MISC_rest_post_sh_wrkactjob.phpt │ ├── test_10513_MISC_ibm_db2_io_sh_rows_ls_hex_ccsid.phpt │ ├── test_10514_MISC_ibm_db2_io_sh_rows_ls_hex_ccsid_cdata.phpt │ ├── test_10515_MISC_ibm_db2_io_sh_rows_wrkactjob_hex_ccsid.phpt │ ├── test_10516_MISC_ibm_db2_io_sh_rows_wrkactjob_hex_ccsid_cdata.phpt │ ├── test_10517_MISC_ibm_db2_io_sh_ls_hex_cdata.phpt │ ├── test_10522_MISC_ibm_db2_io_qsh_ls.phpt │ ├── test_10523_MISC_ibm_db2_io_qsh_rows_ls.phpt │ ├── test_10524_MISC_ibm_db2_io_qsh_wrkactjob.phpt │ ├── test_10525_MISC_ibm_db2_io_qsh_rows_ls_cdata.phpt │ ├── test_10552_db2_io_cmd_rexx_RTVSYSVAL_QDATETIME.phpt │ ├── test_10554_db2_io_cmd_rexx_RTVSYSVAL_QCCSID.phpt │ ├── test_10555_db2_io_cmd_rexx_RTVJOBA_LIBL.phpt │ ├── test_10556_db2_io_cmd_rexx_RTVJOBA_CCSID.phpt │ ├── test_10560_db2_io_cmd_rexx_RTVDTAA_CHAR.phpt │ ├── test_10561_db2_io_cmd_rexx_RTVDTAA_DEC.phpt │ ├── test_10565_db2_io_cmd_rexx_RTVOBJD_FILE.phpt │ ├── test_10577_db2_io_cmd_rexx_multiple.phpt │ ├── test_10580_db2_io_cmd_rexx_RTVJOBA_LIBL_hex_ccsid.phpt │ ├── test_10581_db2_io_cmd_rexx_RTVJOBA_LIBL_hex_ccsid_cdata.phpt │ ├── test_10582_db2_io_cmd_rexx_RTVJOBA_LIBL_ccsid_cdata.phpt │ ├── test_10670_ZZCALL_ibm_db2_io_pgm_not_attribute.phpt │ ├── test_10672_ZZCALL_ibm_db2_io_pgm_hex_not_attr.phpt │ ├── test_10680_ZZMORE_ibm_db2_io.phpt │ ├── test_10690_ZZSIMP_ibm_db2_io.phpt │ ├── test_12600_MISC_ibm_db2_io_dataqueue.phpt │ ├── test_12601_MISC_ibm_db2_io_QSZRTVPR.phpt │ ├── test_12602_MISC_ibm_db2_io_QWCRSSTS.phpt │ ├── test_12603_MISC_ibm_db2_io_xmlshorten.phpt │ ├── test_12604_MISC_ibm_db2_io_xmlstub.phpt │ ├── test_12610_MISC_ibm_db2_io_adopt.phpt │ ├── test_12611_MISC_ibm_db2_io_aftermath.phpt │ ├── test_13620_CCSID_HEX_ZZCALL_ibm_db2_io_pgm.phpt │ ├── test_13630_CCSID_BLOB_ZZCALL_ibm_db2_io_pgm.phpt │ ├── test_15650_ZZSHLOMO_OPM_ibm_db2_io_pgm.phpt │ ├── test_15651_69PARMS_OPM.phpt │ ├── test_16660_ZZCALL_here_ibm_db2_io.phpt │ ├── test_16665_ZZCALL_hex_ibm_db2_io.phpt │ ├── test_17070_NLS_ibm_db2_io.phpt │ ├── test_17500_ZZCALL_ibm_db2_io_pgm_records.phpt │ ├── test_17501_V6_ZZARRAY_ibm_db2_io_records.phpt │ ├── test_17502_V6_ZZARRAY3_ibm_db2_records.phpt │ ├── test_17503_V6_ZZBIGBOY_ibm_db2_io_pgm_records.phpt │ ├── test_18200_V6_ZZVARY4_ibm_db2_io_varying.phpt │ ├── test_20400_ZZCALL_toolkit_pgm.phpt │ ├── test_20401_cmd_toolkit.phpt │ ├── test_20403_ZZNADA_ZZCALL_ZZNADA_toolkit_pgm.phpt │ ├── test_20404_ZZNONE_ZZCALL_ZZNONE_toolkit_pgm.phpt │ ├── test_20405_ZZERICH_toolkit_erich.phpt │ ├── test_20410_ZZDATE_toolkit_pgm.phpt │ ├── test_20411_ZZDATEUSA_toolkit_pgm.phpt │ ├── test_20420_ZZTIME_toolkit_pgm.phpt │ ├── test_20421_ZZTIMEUSA_toolkit_pgm.phpt │ ├── test_20425_ZZSTAMP_toolkit_pgm.phpt │ ├── test_20426_ZZVARY_toolkit_pgm.phpt │ ├── test_20430_ZZARRAY_toolkit.phpt │ ├── test_30450_ZZCALL_cw_pgm.phpt │ ├── test_30451_RTVMSG_cw_pgm.phpt │ ├── test_30452_DTAARA_cw.phpt │ ├── test_33460_cwtest_pcml.phpt │ ├── test_33461_cwtest_userspace.phpt │ ├── test_33462_cwtest_dataqueue.phpt │ ├── test_33463_cwtest_objlist.phpt │ ├── test_33464_cwtest_pgmsimple.phpt │ ├── test_33465_cwtest_pgmcomplex.phpt │ ├── test_33466_cwtest_commands.phpt │ ├── test_33467_cwtest_sysval.phpt │ ├── test_33468_cwtest_dtaara.phpt │ ├── test_33469_cwtest_joblist.phpt │ ├── test_33470_cwtest_spool.phpt │ ├── test_33471_cwtest_joblogs.phpt │ ├── test_33472_cwtest_adopt.phpt │ ├── test_33473_cwtest_loop_adopt.phpt │ ├── test_40101_nocall_cobol_nested_ds.phpt │ ├── test_40501_nocall_nested3.phpt │ ├── test_40502_nocall_timo.phpt │ ├── test_40505_nocall_dou_inside_dou.phpt │ ├── test_40510_nocall_nested_withval_dim.phpt │ ├── test_40513_nocall_empty_1a.phpt │ ├── test_40555_nocall_dou_dou_overlay.phpt │ ├── test_50000_ibm_db2_io_jvm_init.phpt │ ├── test_50100_ibm_db2_io_jvm_ZZJAVA.phpt │ ├── test_50110_ibm_db2_io_jvm_ZZJAVA2.phpt │ ├── test_50800_ibm_db2_io_jvm_sql.phpt │ ├── test_51010_ZZCALL_ibm_db2_io_iPLUGRC32K.phpt │ ├── test_51100_ZZARRAY_ibm_db2_io_iPLUGRC32K.phpt │ ├── test_52601_MISC_ibm_db2_io_QSZRTVPR_setnext.phpt │ ├── test_70000_PERF_ibm_db2_io.phpt │ ├── test_70001_PERF_ibm_db2_set.phpt │ ├── test_70002_PERF_odbc_set.phpt │ ├── test_70003_PERF_pdo_ibm_io.phpt │ ├── test_70004_PERF_pdo_ibm_set.phpt │ ├── test_70009_PERF_loop256_raw_pgm.phpt │ ├── test_70010_PERF_loop256_toolkit_pgm.phpt │ ├── test_70020_private_loop_ibm_db2_io_nada.phpt │ ├── test_70200_NLS_ibm_db2_io_loop_drivers.phpt │ ├── test_70820_ZZCALL_ibm_db2_io_pgm.phpt │ ├── test_71160_reservation_ibm_db2_io.phpt │ ├── test_71165_reservation_fork_parent_ibm_db2_io.phpt │ ├── test_71166_reservation_child.php2 │ ├── test_72350_BATCH_ibm_db2_io_wrkactjob.phpt │ ├── test_80000_db2_io_pgm_attribute_cdata_error_default.phpt │ ├── test_80001_db2_io_srvpgm_array_data_error_default.phpt │ ├── test_80002_db2_io_srvpgm_array_data_error_fast.phpt │ ├── test_80003_db2_io_xmldata_error_default.phpt │ ├── test_80005_db2_io_IPC_junk_run_stateless_diag_error_default.phpt │ ├── test_80006_db2_io_IPC_blank_run_stateless_diag_error_fast.phpt │ ├── test_80010_ERROR_ibm_db2_io_fatal.phpt │ ├── test_80011_ERROR_ibm_db2_io_warning.phpt │ ├── test_80012_db2_io_pgm_no_resolve_error_default.phpt │ ├── test_80130_ZZBOOM_ibm_db2_io_exception.phpt │ ├── test_80140_ZZHANG_ibm_db2_io_timeout.phpt │ ├── test_80141_ZZHANG_ibm_db2_io_timeout_qsqsrvr.phpt │ ├── test_80172_V6_ZZOUCH_ibm_db2_io_array.phpt │ ├── test_80436_pgm_db2_io_error_default.phpt │ ├── test_80437_pgm_db2_io_error_fast.phpt │ ├── test_80438_pgm_db2_io_error_off.phpt │ ├── test_80439_pgm_db2_io_error_on.phpt │ ├── test_80536_db2_io_cmd_exe_error_default.phpt │ ├── test_80537_db2_io_cmd_exe_error_fast.phpt │ ├── test_80538_db2_io_cmd_exe_error_off.phpt │ ├── test_80539_db2_io_cmd_exe_error_on.phpt │ ├── test_80546_db2_io_cmd_system_error_default.phpt │ ├── test_80547_db2_io_cmd_system_error_fast.phpt │ ├── test_80548_db2_io_cmd_system_error_off.phpt │ ├── test_80549_db2_io_cmd_system_error_on.phpt │ ├── test_80555_db2_io_dou_dou_overlay_wrong_data_error_default.phpt │ ├── test_80556_db2_io_dou_dou_overlay_wrong_data_error_fast.phpt │ ├── test_80576_db2_io_cmd_rexx_error_default.phpt │ ├── test_80577_db2_io_cmd_rexx_error_fast.phpt │ ├── test_80578_db2_io_cmd_rexx_error_off.phpt │ ├── test_80579_db2_io_cmd_rexx_error_on.phpt │ ├── test_80586_db2_io_sh_error_default.phpt │ ├── test_80587_db2_io_sh_error_fast.phpt │ ├── test_80588_db2_io_sh_error_off.phpt │ ├── test_80589_db2_io_sh_error_on.phpt │ ├── test_80601_db2_io_ZZARRAY2_deep_error.phpt │ ├── test_80602_db2_io_ZZTON_deep_error.phpt │ ├── test_80603_db2_io_ZZVARY_error.phpt │ ├── test_90000_ibm_db2_io_sqlinit.phpt │ ├── test_90001_ibm_db2_io_sql_chglibl.phpt │ ├── test_90100_ibm_db2_io_sqlfetch.phpt │ ├── test_90101_ibm_db2_io_sqlprepare.phpt │ ├── test_90102_ibm_db2_io_sqlparm.phpt │ ├── test_90103_ibm_db2_io_sqlrollback.phpt │ ├── test_90104_ibm_db2_io_sqlrowcount.phpt │ ├── test_90105_ibm_db2_io_sqldelete.phpt │ ├── test_90106_ibm_db2_io_sqlparms_cdata.phpt │ ├── test_90108_ibm_db2_io_sqlcolcount.phpt │ ├── test_90109_ibm_db2_io_sqlparmcount_cdata.phpt │ ├── test_90130_ibm_db2_io_sqlmultiplefetch.phpt │ ├── test_90140_ibm_db2_io_sqlfetch_blob_clob.phpt │ ├── test_90141_ibm_db2_io_sqlrollback_blob_clob.phpt │ ├── test_90200_ibm_db2_io_sqlfetch.phpt │ ├── test_90201_ibm_db2_io_sqlprepare.phpt │ ├── test_90251_ibm_db2_io_sqlprepare_error.phpt │ ├── test_90255_ibm_db2_io_sqlexec_error.phpt │ ├── test_90300_ibm_db2_io_sqlcallproc.phpt │ ├── test_90310_ibm_db2_io_sqlcallproclob.phpt │ ├── test_90400_ibm_db2_io_sqlidentity.phpt │ ├── test_90450_ibm_db2_io_sqltables.phpt │ ├── test_90455_ibm_db2_io_sqltableprivileges.phpt │ ├── test_90460_ibm_db2_io_sqlcolumns.phpt │ ├── test_90465_ibm_db2_io_sqlcolumnprivileges.phpt │ ├── test_90470_ibm_db2_io_sqlprocedures.phpt │ ├── test_90475_ibm_db2_io_sqlprocedurecolumns.phpt │ ├── test_90480_ibm_db2_io_sqlprimarykeys.phpt │ ├── test_90485_ibm_db2_io_sqlforeignkeys.phpt │ ├── test_90490_ibm_db2_io_sqlstatistics.phpt │ ├── test_90500_ibm_db2_io_qtemp_sqlfetch.phpt │ ├── test_90501_ibm_db2_io_qtemp_sqlprepare.phpt │ ├── test_90502_ibm_db2_io_qtemp_sqlparm.phpt │ ├── test_90503_ibm_db2_io_qtemp_sqlrollback.phpt │ ├── test_90504_ibm_db2_io_qtemp_sqlrowcount.phpt │ ├── test_90505_ibm_db2_io_qtemp_sqldelete.phpt │ ├── test_90506_ibm_db2_io_qtemp_sqlparms_cdata.phpt │ ├── test_90530_ibm_db2_io_qtemp_sqlmultiplefetch.phpt │ ├── test_90600_ibm_db2_io_servermode_sqlfetch.phpt │ ├── test_90999_db2_io_sqlfree.phpt │ ├── test_98000_setup_ignore_userid.phpt │ ├── test_98010_ERROR_ibm_db2_io_fatal.phpt │ ├── test_98012_db2_io_pgm_no_resolve_error_default.phpt │ ├── test_98120_ZZCALL_ibm_db2_io_pgm.phpt │ ├── test_98140_ZZSTEP_ibm_db2_io_step.phpt │ ├── test_98160_ZZARRAY_ibm_db2_io_array.phpt │ ├── test_98180_ZZBIG_ibm_db2_io_big.phpt │ ├── test_98195_ZZTON_ibm_db2.phpt │ ├── test_98200_ZZVARY_ibm_db2_io_varying.phpt │ ├── test_98260_ZZDATE_ibm_db2_io_date.phpt │ ├── test_98555_db2_io_cmd_rexx_RTVJOBA_LIBL.phpt │ ├── test_98600_MISC_ibm_db2_io_dataqueue.phpt │ ├── test_98650_ZZSHLOMO_OPM_ibm_db2_io_pgm.phpt │ ├── test_98810_ERROR_ibm_db2_io_fatal.phpt │ ├── test_98811_ERROR_ibm_db2_io_warning.phpt │ ├── test_98999_reset_ignore_userid.phpt │ ├── test_99977_MISC_db2_set_clear_pgms.phpt │ ├── test_99988_MISC_db2_set_immed_kill.phpt │ ├── test_99999_MISC_rest_immed_kill.phpt │ ├── xmlservice_drivers.php │ ├── xmlservice_get.php │ ├── xmlservice_ibm_db2.php │ ├── xmlservice_ignore_userid.php │ ├── xmlservice_junk_away.php │ ├── xmlservice_odbc.php │ ├── xmlservice_pdo_ibm.php │ ├── xmlservice_perf_report.php │ ├── xmlservice_post.php │ └── xxcw_test_setup.php ├── utils └── xmlservice-cli.c └── xmlservice.png /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 2.0.2-dev 3 | commit = True 4 | tag = True 5 | tag_name = {new_version} 6 | parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+))? 7 | serialize = 8 | {major}.{minor}.{patch}-{release} 9 | {major}.{minor}.{patch} 10 | 11 | [bumpversion:file:src/plugconf_h.rpgle] 12 | 13 | [bumpversion:file:src/xmlver.c] 14 | 15 | [bumpversion:file:docs/conf.py] 16 | 17 | [bumpversion:part:release] 18 | optional_value = gamma 19 | values = 20 | dev 21 | gamma 22 | 23 | -------------------------------------------------------------------------------- /.github/dco.yml: -------------------------------------------------------------------------------- 1 | require: 2 | members: false 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.module 2 | *.srvpgm 3 | *.pgm 4 | *.sqlinst 5 | *.lib 6 | docs/_build 7 | # add generated files here: 8 | Makefile 9 | src/plugconf.rpgle 10 | src/xmlstoredp.sql 11 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent { 3 | node { 4 | label 'ibmi' 5 | } 6 | } 7 | stages { 8 | stage('configure') { 9 | steps { 10 | sh 'python3 ./configure --target-release V7R2M0' 11 | } 12 | } 13 | stage('build') { 14 | steps { 15 | sh 'make -j4' 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2010, IBM Corporation 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | from argparse import ArgumentParser, Action 4 | 5 | class UppercaseAction(Action): 6 | def __call__(self, parser, namespace, values, option_string=None): 7 | setattr(namespace, self.dest, values.upper()) 8 | 9 | parser = ArgumentParser(description='Configure script') 10 | parser.add_argument('--library', default='XMLSERVICE', action=UppercaseAction, help='Output library') 11 | parser.add_argument('--debug', default='*ALL', help='Debug option (DBGVIEW)') 12 | parser.add_argument('--target-release', default='*CURRENT', help='Target release (TGTRLS)') 13 | args = parser.parse_args() 14 | 15 | # Map command line arguments to replacement variables 16 | # ie. --foo -> '@FOO@': args.foo 17 | mappings = { '@' + k.upper() + '@': v for k,v in vars(args).items() } 18 | 19 | files_to_map = ( 20 | 'src/plugconf.rpgle', 21 | 'src/xmlstoredp.sql', 22 | 'Makefile', 23 | ) 24 | 25 | for f in files_to_map: 26 | with open(f + ".in", "r") as _in, open(f, "w") as _out: 27 | for line in _in: 28 | for k,v in mappings.items(): 29 | line = line.replace(k, v) 30 | 31 | print(line, end='', file=_out) 32 | -------------------------------------------------------------------------------- /contributors.txt: -------------------------------------------------------------------------------- 1 | Tony Cairns 2 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = XMLSERVICE 8 | SOURCEDIR = . 9 | BUILDDIR =_build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. XMLSERVICE documentation master file, created by 2 | sphinx-quickstart on Wed Dec 5 17:56:21 2018. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 7 | Welcome to XMLSERVICE's documentation! 8 | ====================================== 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | :caption: Contents: 13 | 14 | intro.rst 15 | functions.rst 16 | generic-interface.rst 17 | examples.rst 18 | source-layout.rst 19 | connections.rst 20 | ipc.rst 21 | idle-timeout.rst 22 | debugging.rst 23 | date-time-timestamp.rst 24 | library-list.rst 25 | qtemp.rst 26 | varchar.rst 27 | ccsids.rst 28 | faster.rst 29 | performance.rst 30 | errors.rst 31 | faq.rst 32 | 33 | .. 34 | Indices and tables 35 | ================== 36 | 37 | * :ref:`genindex` 38 | * :ref:`search` 39 | -------------------------------------------------------------------------------- /parse.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | # awk script to clean up RPG compiler output 4 | # Only prints lines like this: 5 | ## 1396 D NumQueues 10I 0 const lkjwer 000058 6 | ## ======> aaaaaa 7 | ## *RNF3308 20 a 000058 Keyword name is not valid; the keyword is ignored. 8 | # And transforms them in to this: 9 | ## 1396 D NumQueues 10I 0 const lkjwer 000058 10 | ## ^~~~~~ 11 | ## RNF3308: Keyword name is not valid; the keyword is ignored. 12 | 13 | BEGIN { 14 | context = "" 15 | header_line_count = 0 16 | is_error_message = 0 17 | } 18 | / [0-9]{4}WDS/ { 19 | # Found a spool file page header, ignore 3 lines 20 | header_line_count = 3 21 | } 22 | header_line_count > 0 { 23 | header_line_count -= 1 24 | next 25 | } 26 | /[=]{6}>/ { 27 | # Found an error marker (======>), print the context line and 28 | # altered error marker line 29 | 30 | # Convert "aa...." to "^~...." 31 | sub(/a/, "^") 32 | gsub(/a/, "~") 33 | # Remove error arrow 34 | gsub(/[=>]/, " ") 35 | 36 | print context 37 | print $0 38 | 39 | # Indicate that the next line is the error message, go to 40 | # processing it 41 | is_error_message = 1 42 | next 43 | } 44 | { 45 | # Save the context line until we find an error marker 46 | context = $0 47 | } 48 | is_error_message == 1 { 49 | # Last line was an error marker, print the error message 50 | is_error_message = 0 51 | 52 | out = substr($1,2) 53 | $1=$2=$3=$4="" 54 | print FILENAME ": " out " - " substr($0,5) 55 | } 56 | -------------------------------------------------------------------------------- /src/rpgsql.rpgle: -------------------------------------------------------------------------------- 1 | Exec Sql SET PATH *LIBL; 2 | Exec Sql Call TAPECHEK(:param) ; 3 | Exec SQL Set Option Commit=*NONE, Naming=*SQL 4 | DatFmt=*ISO, CloSQLCsr=*ENDACTGRP; 5 | 6 | -------------------------------------------------------------------------------- /src/xmlstoredp.bnd: -------------------------------------------------------------------------------- 1 | strpgmexp pgmlvl(*CURRENT) signature(*GEN) 2 | export symbol('iPLUG4K') 3 | export symbol('iPLUG32K') 4 | export symbol('iPLUG65K') 5 | export symbol('iPLUG512K') 6 | export symbol('iPLUG1M') 7 | export symbol('iPLUG5M') 8 | export symbol('iPLUG10M') 9 | export symbol('iPLUG15M') 10 | export symbol('iPLUGR4K') 11 | export symbol('iPLUGR32K') 12 | export symbol('iPLUGR65K') 13 | export symbol('iPLUGR512K') 14 | export symbol('iPLUGR1M') 15 | export symbol('iPLUGR5M') 16 | export symbol('iPLUGR10M') 17 | export symbol('iPLUGR15M') 18 | export symbol('iPLUGRC32K') 19 | export symbol('RUNASCII') 20 | endpgmexp 21 | -------------------------------------------------------------------------------- /src/xmlver.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const char* version = "XML Toolkit 2.0.2-dev"; 4 | 5 | int main() 6 | { 7 | printf("%s\n", version); 8 | return 0; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/zzbigboy.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D STEP1 s 7s 0 4 | 5 | D BIGBOY1 ds occurs(1000000) 6 | D NAME1 1 7 7 | D YEARWIN1 8 14 1 8 | d* 9 | D i S 10i 0 inz(0) 10 | D j S 10i 0 inz(0) 11 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 | * main(): Control flow 13 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 | C *Entry PLIST 15 | c parm STEP1 16 | c parm BIGBOY1 17 | /free 18 | for i = 1 to STEP1; 19 | %OCCUR(BIGBOY1) = i; 20 | NAME1 = 'B' + %char(i); 21 | YEARWIN1 = i + .1; 22 | endfor; 23 | return; 24 | /end-free 25 | -------------------------------------------------------------------------------- /src/zzcall.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D Step s 10i 0 inz(0) 4 | 5 | D INCHARA S 1a 6 | D INCHARB S 1a 7 | D INDEC1 S 7p 4 8 | D INDEC2 S 12p 2 9 | D INDS1 DS 10 | D DSCHARA 1a 11 | D DSCHARB 1a 12 | D DSDEC1 7p 4 13 | D DSDEC2 12p 2 14 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 15 | * main(): Control flow 16 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 17 | C *Entry PLIST 18 | C PARM INCHARA 19 | C PARM INCHARB 20 | C PARM INDEC1 21 | C PARM INDEC2 22 | C PARM INDS1 23 | /free 24 | Step +=1; 25 | INCHARA = 'C'; 26 | INCHARB = 'D'; 27 | INDEC1 = 321.1234; 28 | INDEC2 = 1234567890.12; 29 | DSCHARA = 'E'; 30 | DSCHARB = 'F'; 31 | DSDEC1 = 333.333; 32 | DSDEC2 = 4444444444.44; 33 | return; 34 | // *inlr = *on; 35 | /end-free 36 | 37 | -------------------------------------------------------------------------------- /src/zzcust.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D i s 10i 0 inz(0) 4 | 5 | D pcustomer_id s 8p 0 6 | D plines s 4p 0 7 | D pline_ds DS Dim(10) qualified 8 | D item 35a 9 | D qty 11p 3 10 | D price 14p 4 11 | 12 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 13 | * main(): Control flow 14 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 15 | C *Entry PLIST 16 | C PARM pcustomer_id 17 | C PARM plines 18 | C PARM pline_ds 19 | /free 20 | pcustomer_id = 12345678; 21 | plines = 8; 22 | for i = 1 to plines; 23 | pline_ds(i).item = 'good item ' + %char(i); 24 | pline_ds(i).qty = i; 25 | pline_ds(i).price = i*100; 26 | endfor; 27 | return; // *inlr = *on; 28 | /end-free 29 | 30 | -------------------------------------------------------------------------------- /src/zzerich.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | D $vevsfi s 1 3 | D $vevsrj s 2 4 | D $vevsob s 7s 0 5 | D $vevsve s 5s 0 6 | D*Ergebnisdaten: 7 | D $vevsods ds occurs(200) 8 | D $vsukz 1 1 9 | D $vpos 2 9 10 | D $vtxt 10 39 11 | D $vkalw 40 174 2 dim(15) 12 | D $vvsw 175 309 2 dim(15) 13 | D $vvsk 310 324 0 dim(15) 14 | d* 15 | D i S 10i 0 inz(0) 16 | D j S 10i 0 inz(0) 17 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 18 | * main(): Control flow 19 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 20 | C *Entry PLIST 21 | c parm $vevsfi 22 | c parm $vevsrj 23 | c parm $vevsob 24 | c parm $vevsve 25 | c parm $vevsods 26 | /free 27 | $vevsfi = 'A'; 28 | $vevsrj = 'BB'; 29 | $vevsob = 22.0; 30 | $vevsve = 33.0; 31 | for i = 1 to 200; 32 | %OCCUR($vevsods) = i; 33 | $vsukz = '1'; 34 | $vpos = '23456789'; 35 | $vtxt = 'lots o stuff'; 36 | for j = 1 to 15; 37 | $vkalw(j) = 42.42; 38 | $vvsw(j) = 43.43; 39 | $vvsk(j) = 2.0; 40 | endfor; 41 | endfor; 42 | return; 43 | /end-free 44 | -------------------------------------------------------------------------------- /src/zzjava.sqlrpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D Main PR ExtPgm('ZZJAVA') 4 | D ms 10i 0 5 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | * main(): Control flow 7 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 | D Main PI 9 | D ms 10i 0 10 | /free 11 | Exec Sql call xmlservice/sleeper(:ms); 12 | return; 13 | /end-free 14 | 15 | -------------------------------------------------------------------------------- /src/zzjava2.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D rpgVary S 4096A INZ(*BLANKS) VARYING 4 | 5 | D pathstr S O CLASS(*JAVA:'java.lang.String') 6 | D propstr S O CLASS(*JAVA:'java.lang.String') 7 | 8 | D makeString PR O EXTPROC(*JAVA:'java.lang.String': 9 | D *CONSTRUCTOR) 10 | D bytes 4096A CONST VARYING 11 | 12 | D trimString PR O CLASS(*JAVA:'java.lang.String') 13 | D EXTPROC(*JAVA:'java.lang.String': 14 | D 'trim') 15 | 16 | D getProperty PR O CLASS(*JAVA:'java.lang.String') 17 | D ExtProc(*JAVA:'java.lang.System': 18 | D 'getProperty') 19 | D static 20 | D inString O CLASS(*JAVA:'java.lang.String') 21 | 22 | D getBytes PR 4096A EXTPROC(*JAVA:'java.lang.String': 23 | D 'getBytes') VARYING 24 | 25 | 26 | D Main PR ExtPgm('ZZJAVA2') 27 | D ms 4096a 28 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 29 | * main(): Control flow 30 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 31 | D Main PI 32 | D ms 4096a 33 | /free 34 | propstr = makeString('java.class.path'); 35 | pathstr = makeString(' '); 36 | pathstr = getProperty(propstr); 37 | // pathstr = trimString(pathstr); 38 | rpgVary = getBytes(pathstr); 39 | ms = rpgVary; 40 | return; 41 | /end-free 42 | 43 | -------------------------------------------------------------------------------- /src/zzmore.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D INCHARA S 64a 4 | D INCHARB S 32000a 5 | D INCHARC S 32000a 6 | D INCHARD S 4a 7 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 | * main(): Control flow 9 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 | C *Entry PLIST 11 | C PARM INCHARA 12 | C PARM INCHARB 13 | C PARM INCHARC 14 | C PARM INCHARD 15 | /free 16 | return; 17 | /end-free 18 | 19 | -------------------------------------------------------------------------------- /src/zznone.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D Main PR ExtPgm('ZZNONE') 4 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 | * main(): Control flow 6 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 | D Main PI 8 | /free 9 | return; 10 | // *inlr = *on; 11 | /end-free 12 | 13 | -------------------------------------------------------------------------------- /src/zzshlomo.clp: -------------------------------------------------------------------------------- 1 | PGM PARM(&CHAR1 &NUM2 &RTNVAL) 2 | DCL VAR(&CHAR1) TYPE(*CHAR) LEN(15) 3 | DCL VAR(&NUM1) TYPE(*DEC) LEN(10) 4 | DCL VAR(&NUM2) TYPE(*CHAR) LEN(10) 5 | DCL VAR(&RTNVAL) TYPE(*CHAR) LEN(100) 6 | CHGVAR VAR(&CHAR1) VALUE('I am 15') 7 | CHGVAR VAR(&NUM2) VALUE(12.2) 8 | CHGVAR VAR(&RTNVAL) VALUE('ALAN HOW ARE YOU TEST one of one') 9 | ENDPGM: + 10 | ENDPGM 11 | 12 | -------------------------------------------------------------------------------- /src/zzsimp.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D ZZSIMP PR ExtPgm('ZZSIMP') 4 | D HEXHND 64 5 | D DBID 2 6 | D SPPGID 10 7 | D SPOP01 1 8 | D SPOP02 1 9 | D SPOP03 1 10 | D SPOP04 1 11 | D SPOP05 1 12 | D SPOP06 1 13 | D SPOP07 1 14 | D SPOP08 1 15 | D SPOP09 1 16 | D SPOP10 1 17 | D SPOP11 1 18 | D SPOP12 1 19 | D SPOP13 1 20 | D SPOP14 1 21 | D SPOP15 1 22 | 23 | 24 | D ZZSIMP PI 25 | D HEXHND 64 26 | D DBID 2 27 | D SPPGID 10 28 | D SPOP01 1 29 | D SPOP02 1 30 | D SPOP03 1 31 | D SPOP04 1 32 | D SPOP05 1 33 | D SPOP06 1 34 | D SPOP07 1 35 | D SPOP08 1 36 | D SPOP09 1 37 | D SPOP10 1 38 | D SPOP11 1 39 | D SPOP12 1 40 | D SPOP13 1 41 | D SPOP14 1 42 | D SPOP15 1 43 | /free 44 | return; 45 | /end-free 46 | 47 | -------------------------------------------------------------------------------- /src/zzvlad.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | 3 | D i s 10i 0 inz(0) 4 | 5 | D job_t ds qualified based(Template) 6 | D dsMyHire D datfmt(*iso) 7 | D dsMyLeav D datfmt(*iso) 8 | D dsMyJob 64A varying 9 | D dsMyPay 12p 2 10 | 11 | D MyDsArray ds likeds(job_t) dim(3) 12 | 13 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 | * main(): Control flow 15 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 16 | C *Entry PLIST 17 | C PARM MyDsArray 18 | /free 19 | for i = 1 to 3; 20 | // data values 21 | select; 22 | when i = 1; 23 | MyDsArray(i).dsMyHire = d'2011-05-11'; 24 | MyDsArray(i).dsMyLeav = d'2011-07-12'; 25 | MyDsArray(i).dsMyJob = 'Frog wrangler'; 26 | MyDsArray(i).dsMyPay = 7.25; 27 | when i = 2; 28 | MyDsArray(i).dsMyHire = d'2010-01-11'; 29 | MyDsArray(i).dsMyLeav = d'2010-07-12'; 30 | MyDsArray(i).dsMyJob = 'Toad wrangler'; 31 | MyDsArray(i).dsMyPay = 4.29; 32 | when i = 3; 33 | MyDsArray(i).dsMyHire = d'2009-05-11'; 34 | MyDsArray(i).dsMyLeav = d'2009-07-12'; 35 | MyDsArray(i).dsMyJob = 'Lizard wrangler'; 36 | MyDsArray(i).dsMyPay = 1.22; 37 | // other? 38 | other; 39 | endsl; 40 | endfor; 41 | return; 42 | // *inlr = *on; 43 | /end-free 44 | 45 | -------------------------------------------------------------------------------- /src/zzvlad2.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | D i s 10i 0 inz(0) 3 | D j s 10i 0 inz(0) 4 | d MyErrorDs ds qualified based(Template) 5 | d ErrorId 8a 6 | d Severity 3u 0 7 | d Description 80a 8 | d ErrorParm ds likeds(MyErrorDs) dim(20) 9 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 | * main(): Control flow 11 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 | C *Entry PLIST 13 | C PARM ErrorParm 14 | C PARM NumOfErrors 2 0 15 | /free 16 | j = NumOfErrors; 17 | for i = 1 to j; 18 | // data values 19 | select; 20 | when i = 1; 21 | ErrorParm(i).ErrorId = '11111111'; 22 | ErrorParm(i).Severity = 1.0; 23 | ErrorParm(i).Description = 'Universe blew up'; 24 | when i = 2; 25 | ErrorParm(i).ErrorId = '22222222'; 26 | ErrorParm(i).Severity = 2.0; 27 | ErrorParm(i).Description = 'World blew up'; 28 | when i = 3; 29 | ErrorParm(i).ErrorId = '33333333'; 30 | ErrorParm(i).Severity = 3.0; 31 | ErrorParm(i).Description = 'Machine blew up'; 32 | // other? 33 | other; 34 | ErrorParm(i).ErrorId = %char(i); 35 | ErrorParm(i).Severity = i; 36 | ErrorParm(i).Description = 'Program blew up'; 37 | endsl; 38 | endfor; 39 | return; 40 | // *inlr = *on; 41 | /end-free 42 | 43 | -------------------------------------------------------------------------------- /src/zzvlad3.rpgle: -------------------------------------------------------------------------------- 1 | H AlwNull(*UsrCtl) 2 | D i s 10i 0 inz(0) 3 | d MyErrorDs ds qualified based(Template) 4 | d ErrorId 8a 5 | d Severity 3u 0 6 | d Description 80a 7 | d ErrorParm ds likeds(MyErrorDs) dim(20) 8 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 | * main(): Control flow 10 | *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 | C *Entry PLIST 12 | C PARM ErrorParm 13 | /free 14 | for i = 1 to 20; 15 | // data values 16 | if ErrorParm(i).ErrorId = *BLANKS; 17 | return; 18 | endif; 19 | select; 20 | when i = 1; 21 | ErrorParm(i).ErrorId = '11111111'; 22 | ErrorParm(i).Severity = 1.0; 23 | ErrorParm(i).Description = 'Universe blew up'; 24 | when i = 2; 25 | ErrorParm(i).ErrorId = '22222222'; 26 | ErrorParm(i).Severity = 2.0; 27 | ErrorParm(i).Description = 'World blew up'; 28 | when i = 3; 29 | ErrorParm(i).ErrorId = '33333333'; 30 | ErrorParm(i).Severity = 3.0; 31 | ErrorParm(i).Description = 'Machine blew up'; 32 | // other? 33 | other; 34 | ErrorParm(i).ErrorId = %char(i); 35 | ErrorParm(i).Severity = i; 36 | ErrorParm(i).Description = 'Program blew up'; 37 | endsl; 38 | endfor; 39 | return; 40 | // *inlr = *on; 41 | /end-free 42 | 43 | -------------------------------------------------------------------------------- /test/byval/testdiag.py: -------------------------------------------------------------------------------- 1 | import os 2 | from itoolkit import * 3 | from itoolkit.lib.ilibcall import * 4 | itransport = iLibCall() 5 | itool = iToolKit() 6 | myxml = "" 7 | itool.add(iXml(myxml)) 8 | # print(itool.xml_in()) 9 | itool.call(itransport) 10 | # print(itool.xml_out()) 11 | diag = itool.dict_out() 12 | if 'version' in diag: 13 | print ("version : "+diag['version']) 14 | 15 | -------------------------------------------------------------------------------- /test/byval/testref.py: -------------------------------------------------------------------------------- 1 | import os 2 | from itoolkit import * 3 | from itoolkit.lib.ilibcall import * 4 | 5 | itransport = iLibCall() 6 | 7 | itool = iToolKit() 8 | itool.add(iCmd('chglibl', 'CHGLIBL LIBL(XMLSERVICE)')) 9 | itool.add( 10 | iSrvPgm('zzarray','ZZSRV','ZZARRAY') 11 | .addParm(iData('myName','10a','ranger')) 12 | .addParm(iData('myMax','10i0','8')) 13 | .addParm(iData('myCount','10i0','',{'enddo':'mycnt'})) 14 | .addRet( 15 | iDS('dcRec_t',{'dim':'999','dou':'mycnt'}) 16 | .addData(iData('dcMyName','10a','')) 17 | .addData(iData('dcMyJob','4096a','')) 18 | .addData(iData('dcMyRank','10i0','')) 19 | .addData(iData('dcMyPay','12p2','')) 20 | ) 21 | ) 22 | itool.call(itransport) 23 | chglibl = itool.dict_out('chglibl') 24 | zzarray = itool.dict_out('zzarray') 25 | print(chglibl['success']) 26 | print(zzarray['success']) 27 | if 'success' in zzarray: 28 | print(zzarray['myName'],'ranger') 29 | print(zzarray['myMax'],'8') 30 | print(zzarray['myCount'],'8') 31 | i = 1 32 | dcRec_t = zzarray['dcRec_t'] 33 | for rec in dcRec_t: 34 | print(rec['dcMyName'],"ranger"+str(i)) 35 | print(rec['dcMyJob'],"Test 10"+str(i)) 36 | print(int(rec['dcMyRank']), 10 + i) 37 | print(float(rec['dcMyPay']),13.42 * i) 38 | i+=1 39 | 40 | 41 | -------------------------------------------------------------------------------- /test/byval/testval.py: -------------------------------------------------------------------------------- 1 | import os 2 | from itoolkit import * 3 | from itoolkit.lib.ilibcall import * 4 | 5 | itransport = iLibCall() 6 | 7 | itool = iToolKit() 8 | itool.add(iCmd('chglibl', 'CHGLIBL LIBL(XMLSERVICE)')) 9 | # dcl-pr testval5 int(20); 10 | # arg1 int(3); 11 | # arg2 int(5); 12 | # arg3 int(10); 13 | # arg4 int(20); 14 | # end-pr; 15 | s1 = iSrvPgm('testval5','TESTZSRV','TESTVAL5') 16 | p1 = iParm('p1',{'by':'val'}) 17 | p1.add(iData('arg1','3i0','4')) 18 | p2 = iParm('p2',{'by':'val'}) 19 | p2.add(iData('arg2','5i0','5')) 20 | p3 = iParm('p3',{'by':'val'}) 21 | p3.add(iData('arg3','10i0','6')) 22 | p4 = iParm('p4',{'by':'val'}) 23 | p4.add(iData('arg4','20i0','7')) 24 | s1.add(p1) 25 | s1.add(p2) 26 | s1.add(p3) 27 | s1.add(p4) 28 | s1.addRet(iData('retval','20i0','0')) 29 | itool.add(s1) 30 | print(itool.xml_in()) 31 | exit() 32 | itool.call(itransport) 33 | chglibl = itool.dict_out('chglibl') 34 | testval5 = itool.dict_out('testval5') 35 | print(itool.xml_out()) 36 | print(chglibl['success']) 37 | print(testval5['success']) 38 | if 'success' in testval5: 39 | print(testval5['arg1']) 40 | print(testval5['arg2']) 41 | print(testval5['arg3']) 42 | print(testval5['arg4']) 43 | print(testval5['retval']) 44 | 45 | 46 | -------------------------------------------------------------------------------- /test/byval/testval2.py: -------------------------------------------------------------------------------- 1 | import os 2 | from itoolkit import * 3 | from itoolkit.lib.ilibcall import * 4 | 5 | itransport = iLibCall() 6 | 7 | itool = iToolKit() 8 | itool.add(iCmd('chglibl', 'CHGLIBL LIBL(XMLSERVICE)')) 9 | # dcl-proc GetSmart export; 10 | # dcl-pi *N; 11 | # p0Format char(10) Value; 12 | # p0Type char(1) Value; 13 | # p0Value char(15) Value; 14 | # p0Channel char(5); 15 | # p0ChannelDesc char(50); 16 | # p0MPG char(5); 17 | # p0MPGDesc char(50); 18 | # p0Class char(5); 19 | # p0ClassDesc char(50); 20 | # p0Line char(5); 21 | # p0LineDesc char(50); 22 | # p0Part char(15); 23 | # p0PartDesc char(30); 24 | # end-pi; 25 | s1 = iSrvPgm('getsmart','TESTZSRV','GETSMART') 26 | p1 = iParm('p1',{'by':'val'}) 27 | p1.add(iData('p0Format','10a','')) 28 | p2 = iParm('p2',{'by':'val'}) 29 | p2.add(iData('p0Type','1a','')) 30 | p3 = iParm('p3',{'by':'val'}) 31 | p3.add(iData('p0Value','15a','')) 32 | s1.add(p1) 33 | s1.add(p2) 34 | s1.add(p3) 35 | s1.addParm(iData('p0Channel','5a','')) 36 | s1.addParm(iData('p0ChannelDesc','50a','')) 37 | s1.addParm(iData('p0MPG','5a','')) 38 | s1.addParm(iData('p0MPGDesc','50a','')) 39 | s1.addParm(iData('p0Class','5a','')) 40 | s1.addParm(iData('p0ClassDesc','50a','')) 41 | s1.addParm(iData('p0Line','5a','')) 42 | s1.addParm(iData('p0LineDesc','50a','')) 43 | s1.addParm(iData('p0Part','15a','')) 44 | s1.addParm(iData('p0PartDesc','30a','')) 45 | 46 | itool.add(s1) 47 | 48 | itool.call(itransport) 49 | chglibl = itool.dict_out('chglibl') 50 | getsmart = itool.dict_out('getsmart') 51 | print(chglibl['success']) 52 | # print(getsmart) 53 | # print(itool.xml_in()) 54 | # print(itool.xml_out()) 55 | if 'success' in getsmart: 56 | print(getsmart['p0Format']) 57 | print(getsmart['p0Type']) 58 | print(getsmart['p0Value']) 59 | print(getsmart['p0Channel']) 60 | print(getsmart['p0ChannelDesc']) 61 | print(getsmart['p0MPG']) 62 | print(getsmart['p0MPGDesc']) 63 | print(getsmart['p0Class']) 64 | print(getsmart['p0ClassDesc']) 65 | print(getsmart['p0Line']) 66 | print(getsmart['p0LineDesc']) 67 | print(getsmart['p0Part']) 68 | print(getsmart['p0PartDesc']) 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /test/js/ftpcompile.sh: -------------------------------------------------------------------------------- 1 | # bash ftpcompile.sh lp0364d adc 2 | MYPWD=$(<$HOME/.ftprc) 3 | ftp -i -n -v $1 << ftp_end 4 | user $2 $MYPWD 5 | 6 | quote namefmt 1 7 | 8 | bin 9 | cd /www/apachedft/htdocs/ 10 | mput * 11 | 12 | quit 13 | 14 | ftp_end 15 | 16 | -------------------------------------------------------------------------------- /test/php/ZendCall.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/xmlservice/9756860b7bc7700de561a21a37bac286cdd8506e/test/php/ZendCall.pdf -------------------------------------------------------------------------------- /test/php/ZendEssay.txt: -------------------------------------------------------------------------------- 1 | This is my essay on this animal. 2 | 3 | 4 | I have blanks lines. 5 | 6 | 7 | I have not much info. 8 | 9 | 10 | But it is a clob. 11 | -------------------------------------------------------------------------------- /test/php/ZendStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/xmlservice/9756860b7bc7700de561a21a37bac286cdd8506e/test/php/ZendStar.png -------------------------------------------------------------------------------- /test/php/connection.inc: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /test/php/ftpcompile.sh: -------------------------------------------------------------------------------- 1 | # bash ftpcompile.sh lp0364d adc 2 | MYPWD=$(<$HOME/.ftprc) 3 | ftp -i -n -v $1 << ftp_end 4 | user $2 $MYPWD 5 | 6 | quote namefmt 1 7 | 8 | bin 9 | cd /www/zendsvr/htdocs/tests/xmlservice 10 | mput * 11 | 12 | quit 13 | 14 | ftp_end 15 | 16 | -------------------------------------------------------------------------------- /test/php/ftpfew.sh: -------------------------------------------------------------------------------- 1 | # bash ftpfew.sh lp0364d adc 2 | MYPWD=$(<$HOME/.ftprc) 3 | ftp -i -n -v $1 << ftp_end 4 | user $2 $MYPWD 5 | 6 | quote namefmt 1 7 | 8 | bin 9 | cd /www/zendsvr/htdocs/tests/xmlservice 10 | mput test_801* 11 | 12 | quit 13 | 14 | ftp_end 15 | 16 | -------------------------------------------------------------------------------- /test/php/ibm_db2.ini-here: -------------------------------------------------------------------------------- 1 | ; pear test only 2 | extension=ibm_db2.so 3 | ibm_db2.i5_ignore_userid=1 4 | 5 | -------------------------------------------------------------------------------- /test/php/license.inc: -------------------------------------------------------------------------------- 1 | 39 | -------------------------------------------------------------------------------- /test/php/skipifcw.inc: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /test/php/skipifdb2.inc: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /test/php/skipifibmi.inc: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /test/php/skipifodbc.inc: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /test/php/skipifpdo.inc: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /test/php/skipifrest.inc: -------------------------------------------------------------------------------- 1 | "; 7 | $clobOut = ""; 8 | $parm = "?db2=$i5restdb"; 9 | $parm .= "&uid=$user"; 10 | $parm .= "&pwd=$password"; 11 | $parm .= "&ipc=$ipc"; 12 | $parm .= "&ctl=$ctl"; 13 | $parm .= "&xmlin=".urlencode($clobIn); 14 | $parm .= "&xmlout=32768"; // size expected XML output 15 | $linkall = "$i5resturl".htmlentities($parm); 16 | $xmlobj = simplexml_load_file($linkall); 17 | if (!$xmlobj) die('skip'); 18 | $sh = $xmlobj->xpath('/script/sh'); 19 | if (!$sh) die('skip'); 20 | $data = (string)$sh[0]; 21 | if (!$data) die('skip'); 22 | if (isset($_SERVER['PHP_SELF'])) $HANDLER = $_SERVER['PHP_SELF']; 23 | else $HANDLER = $argv[0]; 24 | if (strpos($data," 4 5 ")>0 && strpos($HANDLER,"V6")>0) die('skip'); 25 | $clobIn = ""; 26 | $clobOut = ""; 27 | $sh = ""; 28 | $data = ""; 29 | $HANDLER = ""; 30 | $xmlobj = ""; 31 | error_reporting(E_ALL); // **** OK ERRORS please 32 | ?> 33 | 34 | -------------------------------------------------------------------------------- /test/php/skipiftoolkit.inc: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /test/php/test_00000_LEGAL_ibm_db2_io_license.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout LIC - license 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; // XML in 16 | $clobOut = ""; // XML out 17 | $ctl .= " *license"; // show license 18 | $ret=db2_bind_param($stmt, 1, "ipc", DB2_PARAM_IN); 19 | $ret=db2_bind_param($stmt, 2, "ctl", DB2_PARAM_IN); 20 | $ret=db2_bind_param($stmt, 3, "clobIn", DB2_PARAM_IN); 21 | $ret=db2_bind_param($stmt, 4, "clobOut", DB2_PARAM_OUT); 22 | $ret=db2_execute($stmt); 23 | if (!$ret) die("Bad execute: ".db2_stmt_errormsg()); 24 | // dump XML out 25 | var_dump($clobOut); 26 | // XML check 27 | $xmlobj = simplexml_load_string($clobOut); 28 | if (!$xmlobj) die("Bad XML returned\n"); 29 | // check raw XML no error? 30 | if (strpos($clobOut,"Copyright")<1) die("Fail Copyright ($ctl)\n"); 31 | echo "Success\n"; 32 | ?> 33 | --EXPECTF-- 34 | %s 35 | Success 36 | 37 | -------------------------------------------------------------------------------- /test/php/test_10010_SESSION_ibm_db2_io.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout PGM - session data 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 43 | ENDPROC; 44 | return test_lib_replace($clob); 45 | } 46 | ?> 47 | --EXPECTF-- 48 | %s 49 | Success 50 | 51 | -------------------------------------------------------------------------------- /test/php/test_10050_ZZNONE_ibm_db2_io_none.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 PGM no parms - RPG no parm and no return 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 0) die("Fail\n"); 30 | echo "Success\n"; 31 | 32 | // D Main PR ExtPgm('ZZNONE') 33 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 34 | // * main(): Control flow 35 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 36 | // D Main PI 37 | function getxml() { 38 | $clob = << 40 | 41 | 42 | ENDPROC; 43 | return test_lib_replace($clob); 44 | } 45 | ?> 46 | --EXPECTF-- 47 | %s 48 | Success 49 | 50 | -------------------------------------------------------------------------------- /test/php/test_10100_ZZNADA_ibm_db2_io_nada.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SRVPGM - RPG no parm and no return 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 0) die("Fail\n"); 30 | echo "Success\n"; 31 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 32 | // * zznada: check no parms 33 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 34 | // P zznada B export 35 | // D zznada PI 36 | function getxml() { 37 | $clob = << 39 | 40 | 41 | ENDPROC; 42 | return test_lib_replace($clob); 43 | } 44 | ?> 45 | --EXPECTF-- 46 | %s 47 | Success 48 | 49 | -------------------------------------------------------------------------------- /test/php/test_10101_ZZNADA_ibm_db2_io_nada.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SRVPGM - RPG no parm and no return 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 0) die("Fail\n"); 30 | echo "Success\n"; 31 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 32 | // * zznada: check no parms 33 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 34 | // P zznada B export 35 | // D zznada PI 36 | function getxml() { 37 | $clob = << 39 | 40 | ENDPROC; 41 | return test_lib_replace($clob); 42 | } 43 | ?> 44 | --EXPECTF-- 45 | %s 46 | Success 47 | 48 | -------------------------------------------------------------------------------- /test/php/test_10102_ZZNADA_ibm_db2_io_nada.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SRVPGM - RPG no parm and no return 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 0) die("Fail\n"); 30 | echo "Success\n"; 31 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 32 | // * zznada: check no parms 33 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 34 | // P zznada B export 35 | // D zznada PI 36 | function getxml() { 37 | $clob = << 39 | 40 | 41 | 42 | 43 | 44 | ENDPROC; 45 | return test_lib_replace($clob); 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10141_ZZSTEP_ibm_db2_set_stephex.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 result set SRVPGM - RPG step hex incrementing 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/pgm'); 33 | if (!$allpgms) die("Missing XML pgm info"); 34 | $pgm = $allpgms[0]; 35 | $name = $pgm->attributes()->name; 36 | $lib = $pgm->attributes()->lib; 37 | $func = $pgm->attributes()->func; 38 | // pgm return 39 | $retn = $pgm->xpath('return'); 40 | if (!$retn) die("No XML pgm return ($lib/$name.$func)"); 41 | $data = (string)$retn[0]->data; 42 | if (strlen($data) < 8) die("return not greater than '0'"); 43 | // good 44 | echo "Success ($lib/$name.$func return $data)\n"; 45 | } 46 | 47 | function getxml() { 48 | $clob = << 50 | 57 | ENDPROC; 58 | return test_lib_replace($clob); 59 | } 60 | ?> 61 | --EXPECTF-- 62 | %s 63 | Success (%s) 64 | %s 65 | Success (%s) 66 | %s 67 | Success (%s) 68 | %s 69 | Success (%s) 70 | %s 71 | Success (%s) 72 | 73 | -------------------------------------------------------------------------------- /test/php/test_10144_ZZSTEP_rest_get_stephex.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: REST GET SRVPGM - RPG step var incrementing 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | asXML(); 25 | else $clobOut = ""; 26 | // ----------------- 27 | // output processing 28 | // ----------------- 29 | // dump raw XML (easy test debug) 30 | var_dump($clobOut); 31 | // xml check via simplexml vs. expected results 32 | $xmlobj = simplexml_load_string($clobOut); 33 | if (!$xmlobj) die("Bad XML returned"); 34 | $allpgms = $xmlobj->xpath('/script/pgm'); 35 | if (!$allpgms) die("Missing XML pgm info"); 36 | $pgm = $allpgms[0]; 37 | $name = $pgm->attributes()->name; 38 | $lib = $pgm->attributes()->lib; 39 | $func = $pgm->attributes()->func; 40 | // pgm return 41 | $retn = $pgm->xpath('return'); 42 | if (!$retn) die("No XML pgm return ($lib/$name.$func)"); 43 | $data = (string)$retn[0]->data; 44 | if (strlen($data) < 8) die("return not greater than '0'"); 45 | // good 46 | echo "Success ($lib/$name.$func return $data)\n"; 47 | } 48 | 49 | function getxml() { 50 | $clob = << 52 | 59 | ENDPROC; 60 | return test_lib_replace($clob); 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success (%s) 66 | %s 67 | Success (%s) 68 | %s 69 | Success (%s) 70 | %s 71 | Success (%s) 72 | %s 73 | Success (%s) 74 | 75 | -------------------------------------------------------------------------------- /test/php/test_10502_MISC_ibm_db2_io_sh_ls.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls /usr/local/zendsvr/bin 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 35 | if (!$sh) die("Missing XML sh info"); 36 | 37 | // good 38 | echo "Success (PASE sh)\n"; 39 | 40 | // 5250: 41 | // call qp2term 42 | // /QOpenSys/usr/bin/ls /tmp 43 | function getxml() { 44 | $clob = << 46 | 49 | ENDPROC; 50 | return $clob; 51 | } 52 | ?> 53 | --EXPECTF-- 54 | %s 55 | Success (%s) 56 | 57 | -------------------------------------------------------------------------------- /test/php/test_10503_MISC_ibm_db2_io_sh_rows_ls.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls -l /usr/local/zendsvr/bin 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 35 | if (!$sh) die("Missing XML sh info"); 36 | 37 | // good 38 | echo "Success (PASE sh)\n"; 39 | 40 | // 5250: 41 | // call qp2term 42 | // /QOpenSys/usr/bin/ls /tmp 43 | function getxml() { 44 | $clob = << 46 | 49 | ENDPROC; 50 | return $clob; 51 | } 52 | ?> 53 | --EXPECTF-- 54 | %s 55 | Success (%s) 56 | 57 | -------------------------------------------------------------------------------- /test/php/test_10504_MISC_ibm_db2_io_sh_wrkactjob.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - system 'wrkactjob' 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 35 | if (!$sh) die("Missing XML sh info"); 36 | $expect = 'E N D O F L I S T I N G'; // should be in the list 37 | $missing = true; 38 | foreach ($sh[0]->row as $row) { 39 | $data = (string)$row; 40 | if (strpos($data,$expect)>0) { 41 | $missing = false; 42 | break; 43 | } 44 | } 45 | if ($missing) die("XML sh data missing ($expect)"); 46 | 47 | // good 48 | echo "Success (PASE sh)\n"; 49 | 50 | // 5250: 51 | // call qp2term 52 | // /QOpenSys/usr/bin/system -i 'wrkactjob SBS(QUSRWRK)' 53 | function getxml() { 54 | $clob = << 56 | 59 | ENDPROC; 60 | return $clob; 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success (%s) 66 | 67 | -------------------------------------------------------------------------------- /test/php/test_10505_MISC_ibm_db2_io_sh_rows_ls_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls -l /usr/local/zendsvr/bin 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 36 | if (!$sh) die("Missing XML sh info"); 37 | 38 | // good 39 | echo "Success (PASE sh)\n"; 40 | 41 | // 5250: 42 | // call qp2term 43 | // /QOpenSys/usr/bin/ls /tmp 44 | function getxml() { 45 | $clob = << 47 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success (%s) 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_10507_MISC_rest_post_sh_ls.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: REST POST SH - ls /usr/local/zendsvr/bin 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "*LOCAL", 16 | 'uid' => $user, 17 | 'pwd' => $password, 18 | 'ipc' => $ipc, 19 | 'ctl' => $ctl, 20 | 'xmlin' => $clobIn, 21 | 'xmlout' => 1000000 // size expected XML output 22 | ) 23 | ); 24 | $opts = array('http' => 25 | array( 26 | 'method' => 'POST', 27 | 'header' => 'Content-type: application/x-www-form-urlencoded', 28 | 'content' => $postdata 29 | ) 30 | ); 31 | $context = stream_context_create($opts); 32 | // execute 33 | $linkall = $i5resturl; 34 | $result = file_get_contents($linkall, false, $context); 35 | // result 36 | if ($result) { 37 | $getOut = simplexml_load_string($result); 38 | $clobOut = $getOut->asXML(); 39 | } 40 | else $clobOut = ""; 41 | // ----------------- 42 | // output processing 43 | // ----------------- 44 | // dump raw XML (easy test debug) 45 | var_dump($clobOut); 46 | // xml check via simplexml vs. expected results 47 | $xmlobj = simplexml_load_string($clobOut); 48 | if (!$xmlobj) die("Bad XML returned"); 49 | // ----------------- 50 | // output sh call 51 | // ----------------- 52 | $sh = $xmlobj->xpath('/script/sh'); 53 | if (!$sh) die("Missing XML sh info"); 54 | 55 | // good 56 | echo "Success (PASE sh)\n"; 57 | 58 | // 5250: 59 | // call qp2term 60 | // /QOpenSys/usr/bin/ls /tmp 61 | function getxml() { 62 | $clob = << 64 | 67 | ENDPROC; 68 | return $clob; 69 | } 70 | ?> 71 | --EXPECTF-- 72 | %s 73 | Success (%s) 74 | 75 | -------------------------------------------------------------------------------- /test/php/test_10513_MISC_ibm_db2_io_sh_rows_ls_hex_ccsid.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls -l /usr/local/zendsvr/bin (hex 1.7.4+) 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 37 | if (!$sh) die("Missing XML sh info"); 38 | // expected 39 | $hexrows = $xmlobj->xpath('/script/sh/row/hex'); 40 | $data = ""; 41 | foreach($hexrows as $hex) { $data .= pack("H*", $hex); } 42 | if (strpos($data,"zsemfile")<1) die("zsemfile missing\n"); 43 | echo "Good ".substr($data,-100)."\n"; 44 | 45 | // good 46 | echo "Success (PASE sh)\n"; 47 | 48 | // 5250: 49 | // call qp2term 50 | // /QOpenSys/usr/bin/ls /tmp 51 | function getxml() { 52 | $clob = "\n"; 53 | $clob .= "\n"; 58 | return $clob; 59 | } 60 | ?> 61 | --EXPECTF-- 62 | %s 63 | Success (%s) 64 | 65 | -------------------------------------------------------------------------------- /test/php/test_10514_MISC_ibm_db2_io_sh_rows_ls_hex_ccsid_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls -l /usr/local/zendsvr/bin (hex 1.7.4+) 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sh'); 38 | if (!$sh) die("Missing XML sh info"); 39 | // expected 40 | $hexrows = $xmlobj->xpath('/script/sh/row/hex'); 41 | $data = ""; 42 | foreach($hexrows as $hex) { $data .= pack("H*", $hex); } 43 | if (strpos($data,"zsemfile")<1) die("zsemfile missing\n"); 44 | echo "Good ".substr($data,-100)."\n"; 45 | 46 | // good 47 | echo "Success (PASE sh)\n"; 48 | 49 | // 5250: 50 | // call qp2term 51 | // /QOpenSys/usr/bin/ls /tmp 52 | function getxml() { 53 | $clob = "\n"; 54 | $clob .= "\n"; 59 | return $clob; 60 | } 61 | ?> 62 | --EXPECTF-- 63 | %s 64 | Success (%s) 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_10515_MISC_ibm_db2_io_sh_rows_wrkactjob_hex_ccsid.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - hex wrkactjob 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | sh->hex; 35 | // var_dump($hex); 36 | 37 | $clobOut = pack("H*",$hex); 38 | // var_dump($clobOut); 39 | if (strpos($clobOut,"E N D O F L I S T I N G")<1) die("E N D O F L I S T I N G missing\n"); 40 | echo "I am completed\n"; 41 | 42 | // good 43 | echo "Success (PASE sh)\n"; 44 | 45 | // 5250: 46 | // call qp2term 47 | // /QOpenSys/usr/bin/ls /tmp 48 | function getxml() { 49 | $clob = "\n"; 50 | $clob .= "\n"; 57 | return $clob; 58 | } 59 | ?> 60 | --EXPECTF-- 61 | %s 62 | Success (%s) 63 | 64 | 65 | -------------------------------------------------------------------------------- /test/php/test_10516_MISC_ibm_db2_io_sh_rows_wrkactjob_hex_ccsid_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - hex wrkactjob 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | sh->hex; 36 | // var_dump($hex); 37 | 38 | $clobOut = pack("H*",$hex); 39 | // var_dump($clobOut); 40 | if (strpos($clobOut,"E N D O F L I S T I N G")<1) die("E N D O F L I S T I N G missing\n"); 41 | echo "I am completed\n"; 42 | 43 | // good 44 | echo "Success (PASE sh)\n"; 45 | 46 | // 5250: 47 | // call qp2term 48 | // /QOpenSys/usr/bin/ls /tmp 49 | function getxml() { 50 | $clob = "\n"; 51 | $clob .= "\n"; 58 | return $clob; 59 | } 60 | ?> 61 | --EXPECTF-- 62 | %s 63 | Success (%s) 64 | 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_10517_MISC_ibm_db2_io_sh_ls_hex_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SH - ls /usr/local/zendsvr/bin 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | \n"; 48 | $clob .= "\n"; 53 | return $clob; 54 | } 55 | ?> 56 | --EXPECTF-- 57 | %s 58 | Success (%s) 59 | 60 | -------------------------------------------------------------------------------- /test/php/test_10522_MISC_ibm_db2_io_qsh_ls.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout QSH - /usr/bin/ls /tmp 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/qsh'); 35 | if (!$qsh) die("Missing XML qsh info"); 36 | 37 | // good 38 | echo "Success (ILE qsh)\n"; 39 | 40 | // 5250: 41 | // call qp2term 42 | // /usr/bin/ls /tmp 43 | function getxml() { 44 | $clob = << 46 | 49 | ENDPROC; 50 | return $clob; 51 | } 52 | ?> 53 | --EXPECTF-- 54 | %s 55 | Success (%s) 56 | 57 | -------------------------------------------------------------------------------- /test/php/test_10523_MISC_ibm_db2_io_qsh_rows_ls.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout QSH - /usr/bin/ls -l /tmp 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/qsh'); 35 | if (!$qsh) die("Missing XML qsh info"); 36 | 37 | // good 38 | echo "Success (ILE qsh)\n"; 39 | 40 | // 5250: 41 | // call qp2term 42 | // /QOpenSys/usr/bin/ls /tmp 43 | function getxml() { 44 | $clob = << 46 | 49 | ENDPROC; 50 | return $clob; 51 | } 52 | ?> 53 | --EXPECTF-- 54 | %s 55 | Success (%s) 56 | 57 | -------------------------------------------------------------------------------- /test/php/test_10524_MISC_ibm_db2_io_qsh_wrkactjob.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout QSH - /usr/bin/system -i 'wrkactjob' 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/qsh'); 35 | if (!$qsh) die("Missing XML qsh info"); 36 | $expect = 'E N D O F L I S T I N G'; // should be in the list 37 | $missing = true; 38 | foreach ($qsh[0]->row as $row) { 39 | $data = (string)$row; 40 | if (strpos($data,$expect)>0) { 41 | $missing = false; 42 | break; 43 | } 44 | } 45 | if ($missing) die("XML qsh data missing ($expect)"); 46 | 47 | // good 48 | echo "Success (ILE qsh)\n"; 49 | 50 | // 5250: 51 | // call qp2term 52 | // /usr/bin/system -i 'wrkactjob' 53 | function getxml() { 54 | $clob = << 56 | 59 | ENDPROC; 60 | return $clob; 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success (%s) 66 | 67 | -------------------------------------------------------------------------------- /test/php/test_10525_MISC_ibm_db2_io_qsh_rows_ls_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout QSH - /usr/bin/ls -l /tmp 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/qsh'); 36 | if (!$qsh) die("Missing XML qsh info"); 37 | 38 | // good 39 | echo "Success (ILE qsh)\n"; 40 | 41 | // 5250: 42 | // call qp2term 43 | // /QOpenSys/usr/bin/ls /tmp 44 | function getxml() { 45 | $clob = << 47 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success (%s) 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_10552_db2_io_cmd_rexx_RTVSYSVAL_QDATETIME.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVSYSVAL QDATETIME 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return $clob; 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10554_db2_io_cmd_rexx_RTVSYSVAL_QCCSID.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVSYSVAL QCCSID 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return $clob; 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10555_db2_io_cmd_rexx_RTVJOBA_LIBL.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVJOBA LIBL 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return $clob; 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10556_db2_io_cmd_rexx_RTVJOBA_CCSID.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVJOBA CCSID 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return $clob; 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10560_db2_io_cmd_rexx_RTVDTAA_CHAR.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVDTAARA CHAR 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 42 | 47 | ENDPROC; 48 | return test_lib_replace($clob); 49 | } 50 | ?> 51 | --EXPECTF-- 52 | %s 53 | Success 54 | 55 | -------------------------------------------------------------------------------- /test/php/test_10561_db2_io_cmd_rexx_RTVDTAA_DEC.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVDTAARA DEC 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 42 | 46 | ENDPROC; 47 | return test_lib_replace($clob); 48 | } 49 | ?> 50 | --EXPECTF-- 51 | %s 52 | Success 53 | 54 | -------------------------------------------------------------------------------- /test/php/test_10565_db2_io_cmd_rexx_RTVOBJD_FILE.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVOBJD AFILE 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return test_lib_replace($clob); 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_10577_db2_io_cmd_rexx_multiple.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx multiple cmd 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 46 | ENDPROC; 47 | return $clob; 48 | } 49 | ?> 50 | --EXPECTF-- 51 | %s 52 | Success 53 | 54 | -------------------------------------------------------------------------------- /test/php/test_10580_db2_io_cmd_rexx_RTVJOBA_LIBL_hex_ccsid.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVJOBA LIBL hex ccsid 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/cmd'); 41 | if (!$sh) die("Missing XML cmd info"); 42 | // expected 43 | $hexrows = $xmlobj->xpath('/script/cmd/row'); 44 | $data = ""; 45 | foreach($hexrows as $row) { 46 | $hexdata = $row->xpath('data/hex'); 47 | foreach($hexdata as $hex) { 48 | $data .= " \n-> ".pack("H*", $hex); 49 | } 50 | } 51 | echo "$data\n"; 52 | if (strpos($data,"QSYS")<1) die("Missing QSYS\n"); 53 | 54 | // good 55 | echo "Success\n"; 56 | 57 | function getxml() { 58 | $clob = "\n"; 59 | $clob .= "\n"; 64 | return $clob; 65 | } 66 | ?> 67 | --EXPECTF-- 68 | %s 69 | Success 70 | 71 | -------------------------------------------------------------------------------- /test/php/test_10582_db2_io_cmd_rexx_RTVJOBA_LIBL_ccsid_cdata.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVJOBA LIBL hex ccsid 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/cmd'); 42 | if (!$sh) die("Missing XML cmd info"); 43 | // expected 44 | $usualrows = $xmlobj->xpath('/script/cmd/row'); 45 | $data = ""; 46 | foreach($usualrows as $row) { 47 | $usualdata = $row->xpath('data'); 48 | foreach($usualdata as $mydata) { 49 | $data .= " \n-> ".$mydata; 50 | } 51 | } 52 | echo "$data\n"; 53 | if (strpos($data,"QSYS")<1) die("Missing QSYS\n"); 54 | 55 | // good 56 | echo "Success\n"; 57 | 58 | function getxml() { 59 | $clob = "\n"; 60 | $clob .= "\n"; 65 | return $clob; 66 | } 67 | ?> 68 | --EXPECTF-- 69 | %s 70 | Success 71 | 72 | -------------------------------------------------------------------------------- /test/php/test_20401_cmd_toolkit.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - Zend Toolkit CMDs 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getMessage()); } 13 | $ToolkitServiceObj->setToolkitServiceParams( 14 | array('InternalKey'=>$ipc, // route to same XMLSERVICE job /tmp/myjob1 15 | 'subsystem'=>"QGPL/QDFTJOBD", // subsystem/jobd to start XMLSERVICE (if not running) 16 | 'plug'=>"iPLUG32K")); // max size data i/o (iPLUG4K,32K,65K.512K,1M,5M,10M,15M) 17 | // execute command 18 | $cmd = "addlible $testLib"; 19 | $Result = $ToolkitServiceObj->CLCommand($cmd); 20 | $Rows = $ToolkitServiceObj->CLInteractiveCommand("DSPLIBL"); 21 | if(!$Rows) die($ToolkitServiceObj->getLastError()); 22 | var_dump($Rows); 23 | if (strpos(implode(",",$Rows),$testLib)<1) die("missing $testLib"); 24 | echo "Success\n"; 25 | ?> 26 | --EXPECTF-- 27 | %s 28 | Success 29 | 30 | -------------------------------------------------------------------------------- /test/php/test_20420_ZZTIME_toolkit_pgm.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - Zend Toolkit time ISO 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | getMessage()); } 13 | $ToolkitServiceObj->setToolkitServiceParams( 14 | array('InternalKey'=>$ipc, // route to same XMLSERVICE job /tmp/myjob1 15 | 'subsystem'=>"QGPL/QDFTJOBD", // subsystem/jobd to start XMLSERVICE (if not running) 16 | 'plug'=>"iPLUG32K")); // max size data i/o (iPLUG4K,32K,65K.512K,1M,5M,10M,15M) 17 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 18 | // * zztime: check time parm 19 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 20 | // P zztime B export 21 | // D zztime PI T 22 | // D myTime T timfmt(*iso) 23 | // * vars 24 | // D retTime s T timfmt(*iso) 25 | // /free 26 | // retTime=myTime; 27 | // myTime=t'12.34.56'; 28 | // return retTime; 29 | // /end-free 30 | // P E 31 | $param[] = $ToolkitServiceObj->AddParameterChar ('both', 8, 'ZZTIME', 'myTime', '09.45.29'); 32 | $retrn[] = $ToolkitServiceObj->AddParameterChar ('both', 8, 'ZZTIME', 'retTime', '02.02.02'); 33 | $result = $ToolkitServiceObj->PgmCall('ZZSRV', $testLib, $param, $retrn, array('func'=>'ZZTIME')); 34 | // var_dump($result); 35 | /* in/out param myDate */ 36 | $myTime = "XMLSERVICE i/o param myTime: ".$result["io_param"]["myTime"]; 37 | echo "$myTime\n"; 38 | $expect = '12.34.56'; 39 | if (strpos($myTime,$expect)<1) die("Fail missing $expect\n"); 40 | /* return value retTime */ 41 | $retTime = "XMLSERVICE return retTime: ".$result["retvals"]["retTime"]; 42 | echo "$retTime\n"; 43 | $expect = '09.45.29'; 44 | if (strpos($retTime,$expect)<1) die("Fail missing $expect\n"); 45 | /* all good */ 46 | echo "Success\n"; 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_30451_RTVMSG_cw_pgm.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - CW Toolkit REXX RTVMSG command 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | $conId)); 15 | if (!$conn) 16 | { $tab = i5_error(); 17 | die("Connect: ".$tab[2]." "."$tab[3], $tab[0]"); 18 | } 19 | 20 | $msgid = "CPF0010"; 21 | $msgf = "QCPFMSG"; 22 | 23 | if (!i5_command("RTVMSG", array("MSGID" => $msgid, "MSGF" => $msgf), array("MSG" => array("msg", "char(200)")), $conn)) die(i5_errormsg()); 24 | if (function_exists('i5_output')) extract(i5_output()); 25 | echo "Description of $msgid: $msg\n"; 26 | 27 | if (strpos($msg,'support')<1) die("$msg not contain support"); 28 | 29 | // good 30 | echo "I have ... \n"; 31 | echo "Success\n"; 32 | ?> 33 | --EXPECTF-- 34 | %s 35 | Success 36 | 37 | -------------------------------------------------------------------------------- /test/php/test_33463_cwtest_objlist.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest object list 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 15 | // object list 16 | $list = i5_objects_list($demoLib, '*ALL', '*PGM', $conn); 17 | if (!$list) { 18 | die('Error getting object list: ' . printArray(i5_error()) . '

'); 19 | 20 | } else { 21 | 22 | while ($listItem = i5_objects_list_read($list)) { 23 | echo printArray($listItem); 24 | } 25 | echo 'End of list. Error information: ' . printArray(i5_error()) . '

'; 26 | } 27 | i5_objects_list_close($list); 28 | 29 | } // doObjectList 30 | 31 | 32 | // good 33 | echo "\nSuccess\n"; 34 | ?> 35 | --EXPECTF-- 36 | %s 37 | Success 38 | 39 | -------------------------------------------------------------------------------- /test/php/test_33464_cwtest_pgmsimple.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest pgm simple 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | '; 14 | 15 | $progname = "$demoLib/TESTSTP2"; 16 | 17 | $desc = array ( 18 | array ("Name"=>"code", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10"), 19 | array ("Name"=>"name", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10") 20 | ); 21 | $desc = Array ( 22 | 0 => Array ( 'type' => 0, 'name' => 'code', 'length' => 10, 'io' => 3 ), 23 | 1 => Array ( 'type' => 0, 'name' => 'name', 'length' => 10, 'io' => 3 ) ) ; 24 | echo "About to call $progname with two char parameters.
"; 25 | 26 | $prog = i5_program_prepare($progname, $desc); 27 | if ($prog === FALSE) { 28 | $errorTab = i5_error(); 29 | echo "Program prepare failed
\n"; 30 | var_dump($errorTab); 31 | die(); 32 | } 33 | /* Execute Program */ 34 | $params = array ("code"=>"123","name"=>"ABC"); 35 | $retvals = array("code"=>"code","name"=>"name"); 36 | $ret = i5_program_call($prog, $params, $retvals) ; 37 | if (function_exists('i5_output')) extract(i5_output()); // i5_output() required if called in a function 38 | 39 | if ($ret === FALSE) 40 | { 41 | $errorTab = i5_error(); 42 | echo "FAIL : i5_program_call failure message: " . $conn->getLastError() . " with code
"; 43 | var_dump($errorTab); 44 | die(); 45 | }else { 46 | // success 47 | echo "Success! The return values are:
", "Name: ", $name, "
Code: ", $code, "

"; 48 | } 49 | $close_val = i5_program_close ($prog); 50 | if ($close_val === false ) 51 | { 52 | print ("FAIL : i5_program_close returned fales, closing an open prog.
\n"); 53 | $errorTab = i5_error(); 54 | var_dump($errorTab); 55 | die(); 56 | } 57 | 58 | 59 | } // (simple call) 60 | 61 | // good 62 | echo "\nSuccess\n"; 63 | ?> 64 | --EXPECTF-- 65 | %s 66 | Success 67 | 68 | -------------------------------------------------------------------------------- /test/php/test_33467_cwtest_sysval.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest system value 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 16 | 17 | 18 | // good 19 | echo "\nSuccess\n"; 20 | ?> 21 | --EXPECTF-- 22 | %s 23 | Success 24 | 25 | -------------------------------------------------------------------------------- /test/php/test_33469_cwtest_joblist.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest job list 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 17 | 18 | $list = i5_job_list(array(I5_JOBNAME=>'ZENDSVR')); 19 | if (!$list) { 20 | echo 'Error getting job list: ' . printArray(i5_error()) . '
'; 21 | die(); 22 | } else { 23 | $jobCount = 0; 24 | while (($listItem = i5_job_list_read($list)) && (++$jobCount <= 5)) { 25 | echo printArray($listItem) . '
'; 26 | } 27 | echo 'End of list.

'; 28 | } 29 | i5_job_list_close($list); 30 | 31 | 32 | // Get info about current job 33 | echo "Getting information about current job.
"; 34 | $list = i5_job_list();//array(I5_USERNAME=>'*ALL'), $conn); 35 | if (!$list) { 36 | echo 'Error getting job list: ' . printArray(i5_error()) . '
'; 37 | die(); 38 | } else { 39 | // should be only one for current job. 40 | $listItem = i5_job_list_read($list); 41 | echo "
list item for current job: " . printArray($listItem) . "

"; 42 | echo "Job name: {$listItem[I5_JOB_NAME]} user: {$listItem[I5_JOB_USER_NAME]} job number: {$listItem[I5_JOB_NUMBER]}

"; 43 | } 44 | i5_job_list_close($list); 45 | 46 | } //(if do job lists) 47 | 48 | 49 | 50 | 51 | // good 52 | echo "\nSuccess\n"; 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_33471_cwtest_joblogs.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest job log list 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 17 | $list = i5_jobLog_list(); 18 | if (!$list) { 19 | echo 'No joblogs found
'; 20 | } else { 21 | 22 | while ($listItem = i5_jobLog_list_read($list)) { 23 | echo printArray($listItem); 24 | } 25 | echo '
End of list.

'; 26 | } 27 | i5_jobLog_list_close($list); 28 | 29 | } //(if do joblogs) 30 | 31 | 32 | // good 33 | echo "\nSuccess\n"; 34 | ?> 35 | --EXPECTF-- 36 | %s 37 | Success 38 | 39 | -------------------------------------------------------------------------------- /test/php/test_33472_cwtest_adopt.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: - cwtest adopt 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 21 | $start = microtime(true); 22 | 23 | $success = i5_adopt_authority($user, $testPw); 24 | $end = microtime(true); 25 | $elapsed = $end - $start; 26 | 27 | 28 | if (!$success) { 29 | echo "Error adopting authority: " . printArray(i5_error()) . "
"; 30 | die(); 31 | } else { 32 | echo "Success adopting authority in $elapsed seconds
"; 33 | 34 | echo "About to check current user and other variables after adopting authority.
"; 35 | 36 | $cmdString = 'RTVJOBA'; 37 | $input = array(); 38 | 39 | $output = array('ccsid' => array('ccsid', 'dec(5 0)'), 40 | 'dftccsid' => array('defaultCcsid', 'dec(5 0)'), 41 | 'curuser'=>'currentUser', 42 | 'nbr'=>'jobNumber', 43 | 'job'=>'jobName', 44 | 'user'=>'jobUser', 45 | 'usrlibl' => 'userLibl'); 46 | $commandSuccessful = i5_command($cmdString, $input, $output, $conn); 47 | if (function_exists('i5_output')) extract(i5_output()); // i5_output() required if called in a function 48 | 49 | echo "Ran command $cmdString. Return: " . OkBad($commandSuccessful) . 50 | " with original job user '$jobUser', current user '$currentUser', CCSID '$ccsid', default CCSID '$defaultCcsid', job name '$jobName', job number '$jobNumber', with user liblist '$userLibl'.

"; 51 | 52 | } //(if $success) 53 | 54 | } //(if ($doAdoptAuthority)) 55 | 56 | 57 | 58 | // good 59 | echo "\nSuccess\n"; 60 | ?> 61 | --EXPECTF-- 62 | %s 63 | Success 64 | 65 | -------------------------------------------------------------------------------- /test/php/test_40513_nocall_empty_1a.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: DSUDIMVAL1 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 43 | 48 | ENDPROC; 49 | $was = array("zz0cnt"); 50 | $now = array("$zz0cnt"); 51 | return str_replace($was,$now,$clob); 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_50000_ibm_db2_io_jvm_init.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout create JVM test 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 36 | --EXPECTF-- 37 | %s 38 | Success 39 | 40 | 41 | -------------------------------------------------------------------------------- /test/php/test_50100_ibm_db2_io_jvm_ZZJAVA.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout JVM test ZZJAVA sleeper 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | '*java' -- set your own classpath 15 | // SP SQL java: 'customControl'=>'*sqljava' or 'customControl'=>'*dbgjava' -- your classpath ignored 16 | try { $ToolkitServiceObj = ToolkitService::getInstance($conn); } catch (Exception $e) { die($e->getMessage()); } 17 | $options = array('plugSize'=>'4K','customControl'=>'*sqljava','stateless'=>true); 18 | $ToolkitServiceObj->setToolkitServiceParams($options); 19 | $ms = 5000; // 5 seconds 20 | echo "java RPG w/java stored procedure now sleep($ms ms) ...\n"; 21 | $param = array(); 22 | $param[] = $ToolkitServiceObj->AddParameterInt32('both', "ms", "ms", $ms); 23 | $result = $ToolkitServiceObj->PgmCall('ZZJAVA', 'XMLSERVICE', $param, null, null); 24 | var_dump($result); 25 | 26 | if ($result["io_param"]["ms"] != $ms) die("ZZJAVA missing $ms "); 27 | 28 | echo "\nSuccess\n"; 29 | ?> 30 | --EXPECTF-- 31 | %s 32 | Success 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/php/test_50110_ibm_db2_io_jvm_ZZJAVA2.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout JVM test ZZJAVA2 return classpath 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | '*java' -- set your own classpath 15 | // SP SQL java: 'customControl'=>'*sqljava' or 'customControl'=>'*dbgjava' -- your classpath ignored 16 | try { $ToolkitServiceObj = ToolkitService::getInstance($conn); } catch (Exception $e) { die($e->getMessage()); } 17 | $options = array('plugSize'=>'4K','customControl'=>'*java','stateless'=>true); 18 | $ToolkitServiceObj->setToolkitServiceParams($options); 19 | 20 | $yours = "/QIBM/ProdData/OS400/Java400/ext/db2routines_classes.jar:/QIBM/ProdData/OS400/Java400/ext/runtime.zip:/QIBM/ProdData/OS400/Java400/ext/sqlj_classes.jar:/QIBM/ProdData/OS400/Java400/ext/db2_classes.jar"; 21 | $mine = "/home/adc"; 22 | $ours = $mine.':'.$yours; 23 | $result = $ToolkitServiceObj->CLCommand("ADDENVVAR ENVVAR(CLASSPATH) VALUE('{$ours}') REPLACE(*YES)"); 24 | var_dump($result); 25 | 26 | echo "calling java now ...\n"; 27 | $param = array(); 28 | $param[] = $ToolkitServiceObj->AddParameterChar ('both', 4096, 'classpath', 'classpath', ''); 29 | $result = $ToolkitServiceObj->PgmCall('ZZJAVA2', 'XMLSERVICE', $param, null, null); 30 | var_export($result); 31 | 32 | if (strpos($result["io_param"]["classpath"],$mine)<1) die("ZZJAVA missing $mine"); 33 | 34 | echo "\nSuccess\n"; 35 | ?> 36 | --EXPECTF-- 37 | %s 38 | Success 39 | 40 | 41 | -------------------------------------------------------------------------------- /test/php/test_50800_ibm_db2_io_jvm_sql.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL JVM 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sql/fetch/row'); 37 | if (!$rows) die("Missing XML rows info"); 38 | foreach($rows as $row) { 39 | foreach($row->data as $data) { 40 | echo $data; 41 | } 42 | echo "\n"; 43 | } 44 | 45 | if (strpos($data, "db2_classes.jar") < 1) die("missing db2_classes.jar\n"); 46 | 47 | // good 48 | echo "\nSuccess\n"; 49 | 50 | function getxml() { 51 | $clob = << 53 | 63 | ENDPROC; 64 | return $clob; 65 | } 66 | ?> 67 | --EXPECTF-- 68 | %s 69 | Success 70 | 71 | -------------------------------------------------------------------------------- /test/php/test_70020_private_loop_ibm_db2_io_nada.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout -- loop private start/stop 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 0) { 35 | var_dump($clobOut); 36 | die("Fail\n"); 37 | } 38 | else echo "$i) Success($ctl)\n"; 39 | 40 | } 41 | } 42 | echo "Success\n"; 43 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 44 | // * zznada: check no parms 45 | // *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 46 | // P zznada B export 47 | // D zznada PI 48 | function getxml() { 49 | $clob = << 51 | 52 | 53 | 54 | 55 | 56 | ENDPROC; 57 | return test_lib_replace($clob); 58 | } 59 | ?> 60 | --EXPECTF-- 61 | %s 62 | Success 63 | 64 | -------------------------------------------------------------------------------- /test/php/test_80006_db2_io_IPC_blank_run_stateless_diag_error_fast.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 blank ipc stateless 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | FFFFFFFF')<1) die("Missing error FFFFFFFF\n"); 38 | // QSQSRVR because bad IPC will run *here 39 | if (strpos($clobOut,'QSQSRVR')<1) die("Missing error QSQSRVR\n"); 40 | // joblog status 41 | if (strpos($clobOut,'0) die("Error contains 49 | 54 | ENDPROC; 55 | return test_lib_replace($clob); 56 | } 57 | ?> 58 | --EXPECTF-- 59 | %s 60 | Success 61 | 62 | -------------------------------------------------------------------------------- /test/php/test_80010_ERROR_ibm_db2_io_fatal.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 - check fatal error 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath($look); 41 | if (!$allerrors) die("Fail XML errors missing $look\n"); 42 | else echo "Good XML $look\n"; 43 | } 44 | 45 | // good 46 | echo "Success\n"; 47 | 48 | 49 | function getxml() { 50 | $clob = << 52 | 56 | ENDPROC; 57 | return test_lib_replace($clob); 58 | } 59 | ?> 60 | --EXPECTF-- 61 | %s 62 | Success 63 | 64 | -------------------------------------------------------------------------------- /test/php/test_80130_ZZBOOM_ibm_db2_io_exception.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SRVPGM - exception 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 44 | 48 | ENDPROC; 49 | return test_lib_replace($clob); 50 | } 51 | ?> 52 | --EXPECTF-- 53 | %s 54 | Success 55 | 56 | -------------------------------------------------------------------------------- /test/php/test_80141_ZZHANG_ibm_db2_io_timeout_qsqsrvr.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SRVPGM - hang qsysopr 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 48 | 52 | ENDPROC; 53 | return test_lib_replace($clob); 54 | } 55 | 56 | ?> 57 | --EXPECTF-- 58 | %s 59 | Success 60 | 61 | -------------------------------------------------------------------------------- /test/php/test_80436_pgm_db2_io_error_default.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 pgm check error default 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | 44 | function getxml() { 45 | $clob = << 47 | 53 | ENDPROC; 54 | return test_lib_replace($clob); 55 | } 56 | ?> 57 | --EXPECTF-- 58 | %s 59 | Success 60 | 61 | -------------------------------------------------------------------------------- /test/php/test_80437_pgm_db2_io_error_fast.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 IBM_DB2 pgm check error fast 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='fast'\n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'0) die("Error contains , but should not error='fast'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | 44 | function getxml() { 45 | $clob = << 47 | 53 | ENDPROC; 54 | return test_lib_replace($clob); 55 | } 56 | ?> 57 | --EXPECTF-- 58 | %s 59 | Success 60 | 61 | -------------------------------------------------------------------------------- /test/php/test_80438_pgm_db2_io_error_off.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 IBM_DB2 pgm check error off 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | 44 | function getxml() { 45 | $clob = << 47 | 53 | ENDPROC; 54 | return test_lib_replace($clob); 55 | } 56 | ?> 57 | --EXPECTF-- 58 | %s 59 | Success 60 | 61 | -------------------------------------------------------------------------------- /test/php/test_80439_pgm_db2_io_error_on.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 IBM_DB2 pgm check error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | 44 | function getxml() { 45 | $clob = << 47 | 53 | ENDPROC; 54 | return test_lib_replace($clob); 55 | } 56 | ?> 57 | --EXPECTF-- 58 | %s 59 | Success 60 | 61 | -------------------------------------------------------------------------------- /test/php/test_80536_db2_io_cmd_exe_error_default.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd exe error default 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not exec='cmd' (default)\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_80537_db2_io_cmd_exe_error_fast.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd exe error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='fast'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'0) die("Error contains , but should not error='fast'\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not exec='cmd' error='fast'\n"); 39 | 40 | echo "Success\n"; 41 | 42 | function getxml() { 43 | $clob = << 45 | 49 | ENDPROC; 50 | return $clob; 51 | } 52 | ?> 53 | --EXPECTF-- 54 | %s 55 | Success 56 | 57 | -------------------------------------------------------------------------------- /test/php/test_80538_db2_io_cmd_exe_error_off.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd exe error off 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not exec='cmd' error='off'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_80539_db2_io_cmd_exe_error_on.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd exe error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')<1) die("Missing error \n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not exec='cmd' error='on'\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_80546_db2_io_cmd_system_error_default.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd system error default 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'\n"); 39 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 40 | 41 | 42 | // good 43 | echo "Success\n"; 44 | 45 | function getxml() { 46 | $clob = << 48 | 52 | ENDPROC; 53 | return $clob; 54 | } 55 | ?> 56 | --EXPECTF-- 57 | %s 58 | Success 59 | 60 | -------------------------------------------------------------------------------- /test/php/test_80547_db2_io_cmd_system_error_fast.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd system error off 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='fast'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'0) die("Error contains , but should not error='fast'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_80548_db2_io_cmd_system_error_off.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd system error off 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 37 | if (strpos($clobOut,'')<1) die("Missing error \n"); 38 | if (strpos($clobOut,'\n"); 39 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 40 | 41 | 42 | // good 43 | echo "Success\n"; 44 | 45 | function getxml() { 46 | $clob = << 48 | 52 | ENDPROC; 53 | return $clob; 54 | } 55 | ?> 56 | --EXPECTF-- 57 | %s 58 | Success 59 | 60 | -------------------------------------------------------------------------------- /test/php/test_80549_db2_io_cmd_system_error_on.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check cmd system error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')<1) die("Missing error \n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | 58 | -------------------------------------------------------------------------------- /test/php/test_80576_db2_io_cmd_rexx_error_default.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check rexx error default 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | -------------------------------------------------------------------------------- /test/php/test_80577_db2_io_cmd_rexx_error_fast.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check rexx error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='fast'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'0) die("Error contains , but should not error='fast'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | -------------------------------------------------------------------------------- /test/php/test_80578_db2_io_cmd_rexx_error_off.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check rexx error off 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not error='off'\n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | -------------------------------------------------------------------------------- /test/php/test_80579_db2_io_cmd_rexx_error_on.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check rexx error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')<1) die("Missing error \n"); 36 | if (strpos($clobOut,'')<1) die("Missing error \n"); 37 | if (strpos($clobOut,'\n"); 38 | if (strpos($clobOut,"CPF")<1) die("Missing CPFxxx\n"); 39 | 40 | // good 41 | echo "Success\n"; 42 | 43 | function getxml() { 44 | $clob = << 46 | 50 | ENDPROC; 51 | return $clob; 52 | } 53 | ?> 54 | --EXPECTF-- 55 | %s 56 | Success 57 | -------------------------------------------------------------------------------- /test/php/test_80586_db2_io_sh_error_default.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check sh error default 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not sh default\n"); 36 | if (strpos($clobOut,'')>0) die("Error contains , but should not sh default\n"); 37 | if (strpos($clobOut,'0) die("Error contains , but should not sh default\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not sh default\n"); 39 | if (strpos($clobOut,"hdhdgd not found")<1) die("Missing hdhdgd not found\n"); 40 | 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 51 | ENDPROC; 52 | return $clob; 53 | } 54 | ?> 55 | --EXPECTF-- 56 | %s 57 | Success 58 | 59 | -------------------------------------------------------------------------------- /test/php/test_80589_db2_io_sh_error_on.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 check sh error on 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | ')>0) die("Error contains , but should not sh default\n"); 36 | if (strpos($clobOut,'')>0) die("Error contains , but should not sh default\n"); 37 | if (strpos($clobOut,'0) die("Error contains , but should not sh default\n"); 38 | if (strpos($clobOut,"CPF")>0) die("Error contains CPFxxx, but should not sh default\n"); 39 | if (strpos($clobOut,"hdhdgd not found")<1) die("Missing hdhdgd not found\n"); 40 | 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 51 | ENDPROC; 52 | return $clob; 53 | } 54 | ?> 55 | --EXPECTF-- 56 | %s 57 | Success 58 | 59 | -------------------------------------------------------------------------------- /test/php/test_90001_ibm_db2_io_sql_chglibl.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - query animal 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; 19 | $clobOut = ""; 20 | $ret=db2_bind_param($stmt, 1, "ipc", DB2_PARAM_IN); 21 | $ret=db2_bind_param($stmt, 2, "ctl", DB2_PARAM_IN); 22 | $ret=db2_bind_param($stmt, 3, "clobIn", DB2_PARAM_IN); 23 | $ret=db2_bind_param($stmt, 4, "clobOut", DB2_PARAM_OUT); 24 | $ret=db2_execute($stmt); 25 | if (!$ret) die("Bad execute: ".db2_stmt_errormsg()); 26 | // ----------------- 27 | // output processing (XML input info) 28 | // ----------------- 29 | // dump raw XML (easy test debug) 30 | var_dump($clobOut); 31 | $xmlobj = simplexml_load_string($clobOut); 32 | if (!$xmlobj) die("Bad XML input"); 33 | if (strpos($clobOut,"error")>0) die("CHGLIBL $schematest failed\n"); 34 | // good 35 | echo "Success\n"; 36 | 37 | function getxml() { 38 | $clob = << 43 | --EXPECTF-- 44 | %s 45 | Success 46 | 47 | -------------------------------------------------------------------------------- /test/php/test_90104_ibm_db2_io_sqlrowcount.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - affected row count 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sql/rowcount'); 39 | printf ($format, "pre rollback changed",(string)$row[0]); 40 | if ((string)$row[0] != 1) die("pre rollback bad\n"); 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 58 | ENDPROC; 59 | return $clob; 60 | } 61 | ?> 62 | --EXPECTF-- 63 | %s 64 | Success 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_90105_ibm_db2_io_sqldelete.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - delete rows 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sql/rowcount'); 39 | printf ($format, "pre rollback changed",(string)$row[0]); 40 | if ((string)$row[0] != 3) die("pre rollback bad\n"); 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 58 | ENDPROC; 59 | return $clob; 60 | } 61 | ?> 62 | --EXPECTF-- 63 | %s 64 | Success 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_90310_ibm_db2_io_sqlcallproclob.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - stored proc lob animal1 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 160000 ) die("Wrong size output $len \n"); 43 | else echo "size in range 149000 < $len < 160000 \n"; 44 | 45 | // good 46 | echo "Success\n"; 47 | 48 | function getxml() { 49 | $clob = << 51 | 63 | ENDPROC; 64 | return $clob; 65 | } 66 | ?> 67 | --EXPECTF-- 68 | %s 69 | Success 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /test/php/test_90400_ibm_db2_io_sqlidentity.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - identity 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 50 | 63 | ENDPROC; 64 | return $clob; 65 | } 66 | ?> 67 | --EXPECTF-- 68 | %s 69 | Success 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /test/php/test_90450_ibm_db2_io_sqltables.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - tables 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 61 | return $clob; 62 | } 63 | ?> 64 | --EXPECTF-- 65 | %s 66 | Success 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /test/php/test_90455_ibm_db2_io_sqltableprivileges.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - table privileges 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 60 | return $clob; 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /test/php/test_90460_ibm_db2_io_sqlcolumns.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - columns 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 61 | return $clob; 62 | } 63 | ?> 64 | --EXPECTF-- 65 | %s 66 | Success 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /test/php/test_90465_ibm_db2_io_sqlcolumnprivileges.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - column privileges 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 61 | return $clob; 62 | } 63 | ?> 64 | --EXPECTF-- 65 | %s 66 | Success 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /test/php/test_90470_ibm_db2_io_sqlprocedures.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - procedures 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 60 | return $clob; 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /test/php/test_90475_ibm_db2_io_sqlprocedurecolumns.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - procedure columns 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 61 | return $clob; 62 | } 63 | ?> 64 | --EXPECTF-- 65 | %s 66 | Success 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /test/php/test_90480_ibm_db2_io_sqlprimarykeys.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - primary keys 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 60 | return $clob; 61 | } 62 | ?> 63 | --EXPECTF-- 64 | %s 65 | Success 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /test/php/test_90485_ibm_db2_io_sqlforeignkeys.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - foreign keys 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 51 | "; 63 | return $clob; 64 | } 65 | ?> 66 | --EXPECTF-- 67 | %s 68 | Success 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /test/php/test_90490_ibm_db2_io_sqlstatistics.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - statistics 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 55 | "; 65 | return $clob; 66 | } 67 | ?> 68 | --EXPECTF-- 69 | %s 70 | Success 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /test/php/test_90504_ibm_db2_io_qtemp_sqlrowcount.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - qtemp affected row count 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sql/rowcount'); 39 | printf ($format, "pre rollback changed",(string)$row[0]); 40 | if ((string)$row[0] != 1) die("pre rollback bad\n"); 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 58 | ENDPROC; 59 | return $clob; 60 | } 61 | ?> 62 | --EXPECTF-- 63 | %s 64 | Success 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_90505_ibm_db2_io_qtemp_sqldelete.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - qtemp delete rows 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath('/script/sql/rowcount'); 39 | printf ($format, "pre rollback changed",(string)$row[0]); 40 | if ((string)$row[0] != 3) die("pre rollback bad\n"); 41 | // good 42 | echo "Success\n"; 43 | 44 | function getxml() { 45 | $clob = << 47 | 58 | ENDPROC; 59 | return $clob; 60 | } 61 | ?> 62 | --EXPECTF-- 63 | %s 64 | Success 65 | 66 | -------------------------------------------------------------------------------- /test/php/test_90999_db2_io_sqlfree.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 inout SQL - free all 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 34 | 39 | ENDPROC; 40 | return $clob; 41 | } 42 | ?> 43 | --EXPECTF-- 44 | %s 45 | Success 46 | 47 | -------------------------------------------------------------------------------- /test/php/test_98000_setup_ignore_userid.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_Db2 ignore userid - setup special ibm_db2.ini 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 14 | --EXPECTF-- 15 | %s 16 | Success 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/php/test_98010_ERROR_ibm_db2_io_fatal.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 - check fatal error 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath($look); 41 | if (!$allerrors) die("Fail XML errors missing $look\n"); 42 | else echo "Good XML $look\n"; 43 | } 44 | 45 | // good 46 | echo "Success\n"; 47 | 48 | 49 | function getxml() { 50 | $clob = << 52 | 56 | ENDPROC; 57 | return test_lib_replace($clob); 58 | } 59 | ?> 60 | --EXPECTF-- 61 | %s 62 | Success 63 | 64 | -------------------------------------------------------------------------------- /test/php/test_98555_db2_io_cmd_rexx_RTVJOBA_LIBL.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 rexx RTVJOBA LIBL 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 41 | 44 | ENDPROC; 45 | return $clob; 46 | } 47 | ?> 48 | --EXPECTF-- 49 | %s 50 | Success 51 | 52 | -------------------------------------------------------------------------------- /test/php/test_98810_ERROR_ibm_db2_io_fatal.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_DB2 - check fatal error 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | xpath($look); 41 | if (!$allerrors) die("Fail XML errors missing $look\n"); 42 | else echo "Good XML $look\n"; 43 | } 44 | 45 | // good 46 | echo "Success\n"; 47 | 48 | 49 | function getxml() { 50 | $clob = << 52 | 56 | ENDPROC; 57 | return test_lib_replace($clob); 58 | } 59 | ?> 60 | --EXPECTF-- 61 | %s 62 | Success 63 | 64 | -------------------------------------------------------------------------------- /test/php/test_98999_reset_ignore_userid.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: IBM_Db2 ignore userid - reset to normal 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 14 | --EXPECTF-- 15 | %s 16 | Success 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/php/test_99977_MISC_db2_set_clear_pgms.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: CTL - clear server 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 30 | --EXPECTF-- 31 | %s 32 | clear 33 | 34 | -------------------------------------------------------------------------------- /test/php/test_99988_MISC_db2_set_immed_kill.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: CTL - kill server 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 43 | --EXPECTF-- 44 | %s 45 | dead 46 | 47 | -------------------------------------------------------------------------------- /test/php/test_99999_MISC_rest_immed_kill.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | XML i Toolkit: CTL - kill server 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | "; // XML in 21 | $parm = "?db2=$i5restdb"; 22 | $parm .= "&uid=$user"; 23 | $parm .= "&pwd=$password"; 24 | $parm .= "&ipc=$ipc"; 25 | $parm .= "&ctl=$ctl"; 26 | $parm .= "&xmlin=".urlencode($clobIn); 27 | $parm .= "&xmlout=32768"; // size expected XML output 28 | // execute 29 | $linkall = "$i5resturl".htmlentities($parm); 30 | $getOut = simplexml_load_file($linkall); 31 | 32 | } 33 | 34 | echo "i am ...\n"; 35 | echo "dead\n"; 36 | ?> 37 | --EXPECTF-- 38 | %s 39 | dead 40 | 41 | -------------------------------------------------------------------------------- /test/php/xmlservice_drivers.php: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /test/php/xmlservice_get.php: -------------------------------------------------------------------------------- 1 | 17 | // AllowOverride None 18 | // order allow,deny 19 | // allow from all 20 | // SetHandler cgi-script 21 | // Options +ExecCGI 22 | // 23 | function xmlservice($xml) { 24 | global $i5persistentconnect, $database, $user, $password, $ipc, $ctl, $procConn, $procLib, $procPlug, $procPlugR, 25 | $i5resturl, $i5restdb, $i5restuser, $i5restpass, $i5restsz; 26 | $was = array('"'); 27 | $now = array("'"); 28 | $xmlIn = str_replace($was,$now,$xml); 29 | $xmlOut = ''; 30 | $parm = "?db2=$i5restdb"; 31 | $parm .= "&uid=$i5restuser"; 32 | $parm .= "&pwd=$i5restpass"; 33 | $parm .= "&ipc=$ipc"; 34 | $parm .= "&ctl=$ctl"; 35 | $parm .= "&xmlin=".urlencode($xmlIn); 36 | $parm .= "&xmlout=$i5restsz"; // size expected XML output 37 | $linkall = "$i5resturl".htmlentities($parm); 38 | $xmlOut = file_get_contents($linkall); 39 | return driverJunkAway($xmlOut); // just in case driver odd 40 | // ... possible junk end record, 41 | // recordjunk 42 | } 43 | ?> 44 | -------------------------------------------------------------------------------- /test/php/xmlservice_ignore_userid.php: -------------------------------------------------------------------------------- 1 | 0) $rc += 1; 6 | if (strpos($output,'i5_ignore_userid')>0) $rc += 1; 7 | if (strpos($output,'pear test only')>0) $rc += 1; 8 | return $rc; 9 | } 10 | 11 | function ibm_db2_IgnoreOn() { 12 | global $curr_ibm_db2_file, $save_ibm_db2_file, $here_ibm_db2_file; 13 | // already set 14 | $rc = ibm_db2_Status($curr_ibm_db2_file); 15 | if ($rc < 3) { 16 | // assure backup 17 | $diff = trim(`diff $curr_ibm_db2_file $save_ibm_db2_file`); 18 | if ($diff) `cp $curr_ibm_db2_file $save_ibm_db2_file`; // curr to save 19 | // set up ignore_userid 20 | `cp $here_ibm_db2_file $curr_ibm_db2_file`; // here to curr 21 | } 22 | echo `cat $curr_ibm_db2_file`; 23 | } 24 | 25 | function ibm_db2_IgnoreOff() { 26 | global $curr_ibm_db2_file, $save_ibm_db2_file, $here_ibm_db2_file; 27 | // using pear test ini, then return to normal 28 | $rc = ibm_db2_Status($curr_ibm_db2_file); 29 | if ($rc > 2) `cp $save_ibm_db2_file $curr_ibm_db2_file`; // save to curr 30 | echo `cat $curr_ibm_db2_file`; 31 | } 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /test/php/xmlservice_junk_away.php: -------------------------------------------------------------------------------- 1 | junk 7 | function driverJunkAway($xml) 8 | { 9 | // trim blanks (NO we need them) 10 | $clobOut = $xml; 11 | // *BLANKS returned forget it 12 | if (! trim($clobOut)) return $clobOut; 13 | // result set end of record marker ($ctl='*hack') 14 | $fixme = ''; 15 | $pos = strpos($clobOut,$fixme); 16 | if ($pos > -1) { 17 | $clobOut = substr($clobOut,0,$pos); 18 | } 19 | else { 20 | // traditional end of script 21 | $fixme = ''; 22 | $pos = strpos($clobOut,$fixme); 23 | if ($pos > -1) { 24 | $clobOut = substr($clobOut,0,$pos+strlen($fixme)); 25 | } 26 | // maybe error/performance report 27 | else { 28 | $fixme = ''; 29 | $pos = strpos($clobOut,$fixme); 30 | if ($pos > -1) { 31 | $clobOut = substr($clobOut,0,$pos+strlen($fixme)); 32 | } 33 | } 34 | } 35 | return $clobOut; 36 | } 37 | 38 | // xml common text replacement 39 | function test_lib_replace($xml) { 40 | global $testLib, $procOPM; 41 | if (!$procOPM) { 42 | $was = array("xyzlibxmlservicexyz"); 43 | $now = array("$testLib"); 44 | } 45 | else { 46 | $was = array("xyzlibxmlservicexyz"," 59 | -------------------------------------------------------------------------------- /test/php/xmlservice_perf_report.php: -------------------------------------------------------------------------------- 1 | xpath('/report/performance'); 9 | foreach($perfs as $perf) { 10 | $recs = $perf->xpath('record'); 11 | foreach($recs as $rec) { 12 | $label = (string)$rec->label; 13 | $ticks = (string)$rec->ticks; 14 | if (strpos($label,"+")>0) continue; 15 | if (strpos($label,"T_")>-1) $ticks_t += $ticks; // client ticks 16 | elseif (strpos($label,"S_")>-1) $ticks_s += $ticks; // server ticks 17 | } 18 | } 19 | $ticks_a = $ticks_t + $ticks_s; 20 | 21 | // report 22 | $perfs = $xmlobj->xpath('/report/performance'); 23 | foreach($perfs as $perf) { 24 | $recs = $perf->xpath('record'); 25 | foreach($recs as $rec) { 26 | $label = (string)$rec->label; 27 | $ticks = (string)$rec->ticks; 28 | if (strpos($label,"+")>0) continue; 29 | if (strpos($label,"T_")>-1) $pctme =$ticks/$ticks_t*100; 30 | elseif (strpos($label,"S_")>-1) $pctme = $ticks/$ticks_s*100; 31 | else $pctme = 0; 32 | $pctall=$ticks/$ticks_a*100; 33 | echo sprintf("%20s %10d %15.4f%% %15.4f%%\n",$label,$ticks,$pctme,$pctall); 34 | } 35 | } 36 | echo "===\n"; 37 | echo sprintf("%20s client=%d server=%d total=%d\n","ticks",$ticks_t,$ticks_s,$ticks_a); 38 | } 39 | ?> 40 | -------------------------------------------------------------------------------- /test/php/xmlservice_post.php: -------------------------------------------------------------------------------- 1 | 17 | // AllowOverride None 18 | // order allow,deny 19 | // allow from all 20 | // SetHandler cgi-script 21 | // Options +ExecCGI 22 | // 23 | function xmlservice($xml) { 24 | global $i5persistentconnect, $database, $user, $password, $ipc, $ctl, $procConn, $proclib, $procPlug, $procPlugR, 25 | $i5resturl, $i5restdb, $i5restuser, $i5restpass, $i5restsz; 26 | $was = array('"'); 27 | $now = array("'"); 28 | $xmlIn = str_replace($was,$now,$xml); 29 | $xmlOut = ''; 30 | $postdata = http_build_query( 31 | array( 32 | 'db2' => $i5restdb, 33 | 'uid' => $i5restuser, 34 | 'pwd' => $i5restpass, 35 | 'ipc' => $ipc, 36 | 'ctl' => $ctl, 37 | 'xmlin' => $xmlIn, 38 | 'xmlout' => $i5restsz // size expected XML output 39 | ) 40 | ); 41 | $opts = array('http' => 42 | array( 43 | 'method' => 'POST', 44 | 'header' => 'Content-type: application/x-www-form-urlencoded', 45 | 'content' => $postdata 46 | ) 47 | ); 48 | $context = stream_context_create($opts); 49 | $xmlOut = file_get_contents($i5resturl, false, $context); 50 | return driverJunkAway($xmlOut); // just in case driver odd 51 | // ... possible junk end record, 52 | // recordjunk 53 | } 54 | ?> 55 | -------------------------------------------------------------------------------- /xmlservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/xmlservice/9756860b7bc7700de561a21a37bac286cdd8506e/xmlservice.png --------------------------------------------------------------------------------