Cadet 1st Class
Cadet 1st Class


Can you do programming in visual cobol .net using await and Task operators? I have a very simple method below and wish to use async, Task and await operators.  Is this possible in a windows form application?


method-id CreateUser(username as string) returning a as type Task[condition-value] async

end method.

Tags (1)
1 Reply
Micro Focus Expert
Micro Focus Expert

We do not currently support await / async syntax. It is however still possible to use async APIs. If you would like code to execute after a Task has completed, you can use the ContinueWith method on the task that is returned from the async method.


          declare t = CreateUser("gromit")
          invoke t::ContinueWith(
              delegate using tr as type Task[condition-value]
                  display tr::Result

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.