11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

amInitialize<br />

Syntax<br />

1-88 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

amInitialize(hSession,appName, policyName, reasonCode)<br />

Note: This function is case-sensitive. If you want it to be case-insensitive, you<br />

must compile your programs using the BASIC command with the -i option.<br />

Description<br />

The amInitialize function creates and opens an AMI session. The output parameter,<br />

hsession, is a session handle that is valid until the session is terminated. This function<br />

returns a status code indicating success, warning, or failure.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

hSession Upon successful return, holds a handle to a session. You can then use the<br />

handle in other UniData WebSphere MQ API calls. [OUT]<br />

appName An optional name that you can use to identify the session. [IN]<br />

policyName The name of a policy. If you specify ““ (null), UniData uses the system<br />

default policy name. [IN]<br />

reasonCode Holds an AMI Reason Code when the function returns a status indicating<br />

an AMI warning, or an AMI error occurred. You can use the AMI Reason<br />

Code to obtain more information about the cause of the warning or error.<br />

See the MQSeries Application Messaging Interface manual for a list of<br />

AMI Reason Codes and their descriptions. [OUT]<br />

amInitialize Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!