Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Function 10 :Query Sessions using ehllapi function and PCSHLL32.dll in C#

178 views
Skip to first unread message

Nks

unread,
Aug 15, 2016, 10:23:59 PM8/15/16
to
Hello All,
I am trying to get the session information using function 'Query Sessions'. Below is the code that I have written in C#

public static UInt32 HLL_QuerySession()
{
StringBuilder Data = new StringBuilder(416);

mint_Rc = 0;
mint_Func = HA_QUERY_SESSIONS;
mint_Len = 416;


mint_QuerySystem = EhllapiFunc.hllapi(out mint_Func, Data, out mint_Len, out mint_Rc);
mstr_QueryData = Data.ToString();

return mint_QuerySystem;
}

Result:
Return Code: 0
Data length: number of connections opened
Data String : session Id and the session name of the first session in alphabetical order. i,e. if there are three session that is open, session B,C and D, then the Data String displayed is only 'B Session name'.

However as per the description in the 'IBM Manual' it says "The Query_Sessions function returns either a 12-byte description of each
configured session or a null (’’) if an error occurs. But in the above case it displays for only one instance.


Kindly help.
0 new messages