Data structures are defined via PHP as follows:
Main data is an array of key-value pairs, where key is the parameter name and value is the array of:
Example:
<?php
$person = array(
"name" => array(I5_TYPE_CHAR, 50),
"age" => array(I5_TYPE_INT, 0),
"ID" => array(I5_TYPE_BYTE, 10)
);
$data = array(
"person" => array(I5_TYPE_STRUCT, $person),
"last_accesses" => array(I5_TYPE_INT, 0, I5_OUT, 3),
"account_balance" => array(I5_TYPE_PACKED, "10.3", I5_OUT)
);
$prg = i5_program_prepare("MYLIB/PERSONPGM", $data);
?>
In any place data description is required; the name of the file with external data structure description can be used instead.
Data structure is defined via PHP as follows:
Main data is the array of values, having following fields:
Example:
<?php
$description = Array(
array("Name"=>"P1", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10", "count"=>5),
array("Name"=>"P2C", "IO"=>I5_INOUT, "Type"=>I5_TYPE_LONG),
array("Name"=>"P2", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR, "Length"=>"1", "countRef"=>"P2C"),
array("DSName"=>"PS", "count"=>2, "DSParm"=>array(
array("Name"=>"PS1", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10"),
array("Name"=>"PS2", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10"),
array("Name"=>"PS3", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR, "Length"=>"10"),
)
)
);
$prg = eac_program_prepare("MYLIB/PERSONPGM", $description);
?>
I5_TYPE_CHAR I5_TYPE_PACKED I5_TYPE_FLOAT I5_TYPE_STRUCT (long format uses DSName to define structure) |
I5_TYPE_INT I5_TYPE_ZONED I5_TYPE_BYTE |
These values can be OR'ed together to get input-output value:
Error Types
I5_ERR_OK I5_ERR_TOOMUCHOPENFILE I5_ERR_INVALIDPTR I5_ERR_INVALIDFIELDNBR I5_ERR_INVALIDKEYNBR I5_ERR_INVALIDOPENMODE I5_ERR_RECORDLOCKED I5_ERR_FILELIMITS I5_ERR_INVALIDSEQ I5_ERR_NOLINKDEFINED I5_ERR_NULLNOTALLOWED I5_ERR_WRONGLOGIN I5_ERR_FIELDNULL I5_ERR_INVALIDINFO I5_ERR_RECORDCHANGED I5_ERR_NOTINTRAN I5_ERR_PHP_HDLCONN I5_ERR_PHP_OPTIONSTYPE I5_ERR_PHP_RESOURCE_BAD I5_ERR_PHP_NBPARAM_BAD I5_ERR_PHP_OPERATOR_BAD I5_ERR_PHP_NOT_BOOKMARK I5_ERR_PHP_GETPARAM I5_ERR_PHP_PARAM_DESC I5_ERR_PHP_VARIABLE I5_ERR_PHP_EXECUTE I5_ERR_PHP_EMPTY_ARRAY I5_ERR_PHP_NO_PARMNAME |
I5_ERR_PHP_COMMAND_ERROR I5_ERR_PHP_GET_SYSVAL I5_ERR_PHP_BAD_DEF I5_ERR_PHP_NO_DS_VALUE I5_ERR_ENDOFOCC I5_ERR_DESC_UNEXP I5_ERR_DESC_WRONG_DATAOP I5_ERR_PHP_BAD_PROG_NAME I5_ERR_PHP_NOT_DTAQ_KEY I5_ERR_PHP_DESC_EMPTY I5_ERR_PHP_LIST_PROP I5_ERR_PHP_API_LENGTH I5_ERR_ERROR I5_ERR_MEMALLOC I5_ERR_FIELDNOTFOUND I5_ERR_INVALIDKEYLEN I5_ERR_NOTENABLETOUPDATE I5_ERR_RECORDNOTFOUND I5_ERR_BEOF I5_ERR_NOTCONNECTED I5_ERR_NORANGESET I5_ERR_NOCURRENTRECORD I5_ERR_BADSESSION I5_ERR_NOTENOUGHRIGHTS I5_ERR_INVALIDTYPE I5_ERR_NOTTYPEPROPERTY I5_ERR_ALLREADYINTRAN I5_ERR_PHP_HDLDFT
|
I5_ERR_PHP_HDLBAD I5_ERR_PHP_OPTIONSNUMBER I5_ERR_PHP_TYPEPARAM I5_ERR_PHP_TYPEGET I5_ERR_PHP_BOOKMARK I5_ERR_PHP_CALL_BINDPARAM I5_ERR_PHP_BINDPARAM I5_ERR_PHP_BLOBSIZE I5_ERR_PHP_INTERNAL I5_ERR_PHP_NO_COMMAND I5_ERR_PHP_NO_KEYNAME I5_ERR_PHP_NO_ZVALUE I5_ERR_PHP_DATAREA_READ I5_ERR_PHP_ELEMENT_MISSING I5_ERR_PHP_BAD_KEYNAME I5_ERR_PARAMNOTFOUND I5_ERR_PHP_BAD_DS_INPUT I5_ERR_DQDESC_UNSUPP I5_ERR_INCORRECTVALUE I5_ERR_PHP_AS400_MESSAGE I5_ERR_PHP_DTAQ_BADKEY I5_ERR_PHP_BAD_LEN_PROP I5_ERR_PHP_SPOOL_FILE_FOPEN |
Data structures are defined via PHP as follows:
Main data is the array of values, having the following fields:
Data structure is defined via PHP as follows:
Example:
<?php
$description = Array(
array("Name"=>"P1", "IO"=>I5_INOUT,
"Type"=>I5_TYPE_CHAR, "Length"=>"10", "count"=>5),
array("Name"=>"P2C", "IO"=>I5_INOUT, "Type"=>I5_TYPE_LONG),
array("Name"=>"P2", "IO"=>I5_INOUT, "Type"=>I5_TYPE_CHAR,
"Length"=>"1", "countRef"=>"P2C"),
array("DSName"=>"PS", "count"=>2, "DSParm"=>array(
array("Name"=>"PS1", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR,
"Length"=>"10"),
array("Name"=>"PS2", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR,
"Length"=>"10"),
array("Name"=>"PS3", "IO"=>I5_IN|I5_OUT, "Type"=>I5_TYPE_CHAR,
"Length"=>"10"),
)
)
);
$prg = i5_program_prepare("MYLIB/PERSONPGM", $description);
?>
I5_CURLIB (Default Value = "*CURLIB")
I5_ALL_OBJECTS (Default value = "*ALL")
I5_ALL_NAMES (Default value = "*")
I5_LIST_MINIMAL
I5_LIST_DETAILED
I5_LIST_FULL
i5_JOB_ACT_JOB_STS I5_JOB_BRKMSG I5_JOB_CNTRYID I5_JOB_POOL_ID I5_JOB_PROCESS_UNIT_TIME_DB I5_JOB_DATETIME_SCHED I5_JOB_DATSEP I5_JOB_DFTWAIT I5_JOB_DFTCCSID I5_JOB_ENDSEV I5_JOB_FUNC_NAME I5_JOB_GRPPRFNAME I5_JOB_ACCOUNT_CODE I5_JOB_QUEUE_NAME I5_JOB_JOBMSGQFL I5_JOB_USRID_SETTING I5_JOB_TYPE_ENHANCED I5_JOB_LOGCLPGM I5_JOB_MODE_NAME I5_JOB_MAX_THREADS I5_JOB_MSGRPL I5_JOB_ MCH_LCKW I5_JOB_OUTQ_NAME I5_JOB_PRTDEVNAME I5_JOB_PROG_RETCODE I5_JOB_RESPONSE_TIME I5_JOB_STRSEQ I5_JOB_SBMJOB I5_JOB_SYSPOOLID I5_JOB_SGNSTS I5_JOB_TIMSEP I5_JOB_TMPSTGK I5_JOB_TIME_NONDB_LCKW |
I5_JOB_ALW_MULTI_THREADS I5_JOB_CANCEL_KEY I5_JOB_USRPRF I5_JOB_CHAR_ID_CTRL I5_JOB_DATETIME_ACTIVE I5_JOB_DATETIME_JOBQ I5_JOB_DBCS_CAP I5_JOB_DEVRCYACN I5_JOB_DECFMT I5_JOB_ENDSTS I5_JOB_FUNC_TYPE I5_JOB_GRPPRFNAME_SUP I5_JOB_DATE I5_JOB_QUEUE_PTY I5_JOB_JOBMSGQ_SIZE I5_JOB_END_REASON I5_JOB_LANGID I5_JOB_LOGSEV I5_JOB_MAX_PROC_UNIT_TIME I5_JOB_MAX_TMP_STG_M I5_JOB_INTERACTIVE_TRS I5_JOB_NONDB_LCKW I5_JOB_OUTQ_PTY I5_JOB_PURGE I5_JOB_PENDING_SGNSET I5_JOB_RUNPTY I5_JOB_STS_MSGHDL I5_JOB_SBMMSGQ I5_JOB_SPCLENV I5_JOB_SVRTYPE I5_JOB_TIMESLICE I5_JOB_TIME_DB_LCKW I5_JOB_THREADCNT |
I5_JOB_ACT_ENDJOB_STS I5_JOB_CCSID I5_JOB_COMPLETION_STS I5_JOB_PROCESS_UNIT_TIME I5_JOB_DATETIME_IN I5_JOB_DATFMT I5_JOB_DDM_HANDLE I5_JOB_DEVNAME I5_JOB_DATETIME_END I5_JOB_EXITKEY I5_JOB_SIGNED_JOB I5_JOB_INQMSGRPLY I5_JOB_DESC_NAME I5_JOB_SWITCHES I5_JOB_USRID I5_JOB_LOG_PENDING I5_JOB_LOGLVL I5_JOB_LOGTEXT I5_JOB_MAX_TMP_STG_K I5_JOB_MEM_POOL_NAME I5_JOB_DB_LCKWAIT I5_JOB_AUX_IOREQ I5_JOB_PRTTEXT I5_JOB_PRD_RETCODE I5_JOB_PROCESS_ID I5_JOB_ROUTING_DATA I5_JOB_STS_JOBQ I5_JOB_SBSD I5_JOB_SGNBLK_MASK I5_JOB_SPLFILE_ACTION I5_JOB_TIMESLICE_END I5_JOB_TIME_MCH_LCKW |
I5_LOBJ_MESSAGE_SEVERITY I5_LOBJ_MESSAGE_IDENTIFIER I5_LOBJ_MESSAGE_FILELIBRARY I5_LOBJ_TIMESENT_MICRO |
I5_LOBJ_MESSAGE_TYPE I5_LOBJ_DATASENT |
I5_LOBJ_MESSAGE_FILENAME I5_LOBJ_TIMESENT |
|
|
|
I5_LOBJ_ALERTOPT I5_LOBJ_MSGDTA I5_LOBJ_MSGHLPDTAFMT I5_LOBJ_SNDTYPE I5_LOBJ_SNDPROC I5_LOBJ_RCVMOD I5_LOBJ_PROBLEMID I5_LOBJ_RQSLVL |
I5_LOBJ_RPLDATA1 I5_LOBJ_MSGHLP I5_LOBJ_DFTRPLY I5_LOBJ_SNDPGM I5_LOBJ_RCVTYPE I5_LOBJ_RCVPROC I5_LOBJ_RPLYSTS I5_LOBJ_TXTCCSID |
I5_LOBJ_MSG I5_LOBJ_MSGHLPDTA I5_LOBJ_SNDNAME I5_LOBJ_SNDMOD I5_LOBJ_RCVPROG I5_LOBJ_MSGFILE I5_LOBJ_RQSSTS I5_LOBJ_DATACCSID |
I5_TYPE_CHAR
I5_ERR_OK
I5_ERR_ERROR
I5_ERR_TOOMUCHOPENFILE
I5_ERR_MEMALLOC
I5_ERR_INVALIDPTR I5_ERR_FIELDNOTFOUND I5_ERR_INVALIDFIELDNBR I5_ERR_INVALIDKEYLEN I5_ERR_INVALIDKEYNBR I5_ERR_NOTENABLETOUPDATE I5_ERR_INVALIDOPENMODE I5_ERR_RECORDNOTFOUND I5_ERR_RECORDLOCKED I5_ERR_BEOF I5_ERR_FILELIMITS I5_ERR_NOTCONNECTED I5_ERR_INVALIDSEQ I5_ERR_NORANGESET |
I5_ERR_NOLINKDEFINED I5_ERR_NOCURRENTRECORD I5_ERR_NULLNOTALLOWED I5_ERR_BADSESSION I5_ERR_WRONGLOGIN I5_ERR_NOTENOUGHRIGHTS I5_ERR_FIELDNULL I5_ERR_INVALIDTYPE I5_ERR_INVALIDINFO I5_ERR_NOTTYPEPROPERTY I5_ERR_RECORDCHANGED I5_ERR_ALLREADYINTRAN I5_ERR_NOTINTRAN |
I5_ERR_PHP_HDLDFT I5_ERR_PHP_HDLCONN I5_ERR_PHP_HDLBAD I5_ERR_PHP_OPTIONSTYPE I5_ERR_PHP_OPTIONSNUMBER I5_ERR_PHP_RESOURCE_BAD I5_ERR_PHP_TYPEPARAM I5_ERR_PHP_NBPARAM_BAD I5_ERR_PHP_TYPEGET I5_ERR_PHP_OPERATOR_BAD I5_ERR_PHP_BOOKMARK I5_ERR_PHP_NOT_BOOKMARK I5_ERR_PHP_CALL_BINDPARAM I5_ERR_PHP_GETPARAM I5_ERR_PHP_BINDPARAM I5_ERR_PHP_PARAM_DESC I5_ERR_PHP_BLOBSIZE I5_ERR_PHP_VARIABLE I5_ERR_PHP_INTERNAL I5_ERR_PHP_EXECUTE I5_ERR_PHP_NO_COMMAND I5_ERR_PHP_EMPTY_ARRAY I5_ERR_PHP_NO_KEYNAME I5_ERR_PHP_NO_PARMNAME |
I5_ERR_PHP_NO_ZVALUE I5_ERR_PHP_COMMAND_ERROR I5_ERR_PHP_DATAREA_READ I5_ERR_PHP_GET_SYSVAL I5_ERR_PHP_ELEMENT_MISSING I5_ERR_PHP_BAD_DEF I5_ERR_PHP_BAD_KEYNAME I5_ERR_PHP_NO_DS_VALUE I5_ERR_PARAMNOTFOUND I5_ERR_ENDOFOCC I5_ERR_PHP_BAD_DS_INPUT I5_ERR_DESC_UNEXP I5_ERR_DQDESC_UNSUPP I5_ERR_DESC_WRONG_DATAOP I5_ERR_INCORRECTVALUE I5_ERR_PHP_BAD_PROG_NAME I5_ERR_PHP_AS400_MESSAGE I5_ERR_PHP_NOT_DTAQ_KEY I5_ERR_PHP_DTAQ_BADKEY I5_ERR_PHP_DESC_EMPTY I5_ERR_PHP_BAD_LEN_PROP I5_ERR_PHP_LIST_PROP I5_ERR_PHP_SPOOL_FILE_FOPEN I5_ERR_PHP_API_LENGTH |