Problem:
The ability of a COBOL program to store and retrieve the values of certain data items and objects from within any Web page of an application that will also maintain its state between multiple client requests is essential in ASP.NET development.
Resolution:
The following code will create a new session variable called "MyName" which will be associated with the value of the "Text" property of the wsName object. Session variables are always stored as a name/value pair where "value" can refer to anything from a simple string to a complex COBOL object instance.
The actual location where Session variables will be stored is dependent upon the Session state configuration options set within the applications Web.config file. The default storage location is "InProc" which means that the Session data will be stored within the memory space of the ASP.NET worker process "aspnet_wp.exe".
invoke self::"Session"::"Clear"
invoke self::"Session"::"Add"("MyName", wsName::"Text")
set wsName::"Text" to self::"Session"::"Item"("MyName")
The other intrinsic objects are accessed using the same COBOL syntax.




