Skip to main content

In the 2017 Visual Studio with COBOL processing I have not been able to find a good solution to process numeric data entered in the gridview. I'll describe a situation. With a three byte field described in gridview as numeric (or no formatting) you can't target the data entered in the gridview to a numeric field such as "pic 999". Currently I use "pic XXX" and have to accommodate all the variations of how the data might be input. Anybody have a simple solution?

In the 2017 Visual Studio with COBOL processing I have not been able to find a good solution to process numeric data entered in the gridview. I'll describe a situation. With a three byte field described in gridview as numeric (or no formatting) you can't target the data entered in the gridview to a numeric field such as "pic 999". Currently I use "pic XXX" and have to accommodate all the variations of how the data might be input. Anybody have a simple solution?

The COBOL intrinsic function NUMVAL will do the trick within one statement


In the 2017 Visual Studio with COBOL processing I have not been able to find a good solution to process numeric data entered in the gridview. I'll describe a situation. With a three byte field described in gridview as numeric (or no formatting) you can't target the data entered in the gridview to a numeric field such as "pic 999". Currently I use "pic XXX" and have to accommodate all the variations of how the data might be input. Anybody have a simple solution?

A good solution is using WPF with Data Binding. Data Binding will do all conversions and also tests that entered values are numeric.