then code a move statement in the procedure division to fill it up with dots:
MOVE ALL "." TO W-DOTTED-LINE
The field W-DOTTED-LINE should now contain all dots, this MOVE ALL can be used to fill a field up with anything
eg
MOVE ALL "ASDF" TO W-DOTTED-LINE would fill it up thus:
"asdfasdfasdfasdfasdfasdfasdf.....etc"
"Illegal" might be a little strong in this case; "ignored" is probably more accurate.
I make the point because a VALUE clause may appear in a copybook that may be required in either WS or in an FD or both. Ignoring the presence of the value clause in the FD makes this dual use possible.
Just a minor point, but it makes our lives a lot easier.
Another handy hint:
If you want to create a dashed line with dashes alternating with spaces, the ALL literal is not limited to only one character at a time. You can use ALL "- " or ALL ". " or even ALL "ABCD". These will yield:
- - - - - - -
. . . . . . . .
ABCDABCD respectively.
Sometimes it's convenient to use different line formats.
Betty Scherber
Brainbench MVP for COBOL II
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.