Entire Connection API usage from Natural

I would like to use the Entire Connection ActiveX control in a Natural V6 session on Windows to drive a terminal session. Is this possible ? I have tried a few basic method invocations but am clearly missing something basic as nothing appears to work.

For example I try the GetAvailableSessions with the following code fragment:

PROCESS GUI ACTION <>
WITH #OCX-1 #SessionNames #DefName
USING #Result
/*
write ‘Result:’ #Result /
‘Sessions:’ /
#SessionNames (al=64) /
‘Session count:’ #DefName

The result value is always 20. I have a terminal session active and logged on to CICS but still I receive the error. I have determined that this error code indicates “API_ERROR_NOT_CONNECTED” as shown in the ECAPI.H file.

Any suggestions ?

Hi Mike,

I haven’t played with the Connection controls from Natural, but when using other ActiveX controls a method would use:
Send “GetAvailableSessions” To #E-C-Application With #SessionNames #DefName Return #Result

I see that the Component Browser gives examples using the Process Gui Action, but unless you are using it as an embeded object I would try the Send method.

Please let me know if this helps &/or works,
Chad.