You do understand that your query is absurd if taken verbatim; because it goes against the rules of basic COBOL variable assignment.
If you REALLY DO have a requirement of initializing a field, which is inherently NUMERIC, with SPACEs - then the best bet you have is - modify the attribute of the numeric field to alphanumeric; because with NUMERIC, afa I know spaces dont work; or unless you are able to work something out with REDEFinitions. But I'd leave it to you to read the manual and UNDERSTAND the basic variable definition attributes.
A "numeric" variable in COBOL may be USAGE DISPLAY or COMP or COMP-1 through COMP-5 and depending upon the USAGE, what you want to do may work in a way you don't expect or it may generate a compiler error.
Yep, what Terry suggested does that trick. And if you really want to cross-check your 'MOVE' result, you can validate if WS-NUMERIC-DEFINITION = SPACES or not.
I hope that we do understand that we are not actually moving spaces to a 'numeric field', as requested, but to an 'alphanumeric group variable'; and then referring that field using a 'variable name' which has numeric attributes; which is different from the query: populate spaces in the numeric field in the cobol program
No Aki88 - you have read the fine print just fine. The others have taken the view that, being a beginner, the TS did not know how to frame the question properly. Hopefully, from now on TS will be able to think a little bit more about the phrasing of their questions.
The problem I have is that people can explain things quickly but I can only comprehend slowly. Regards Nic