by Robert Sample » Wed Feb 08, 2012 9:32 pm
Technically, COBOL does not have strings in the sense of other languages, where the length can vary at run time. In COBOL, every variable in WORKING-STORAGE has its length set at compile time, and that length does not change during the program execution. Even variables defined with OCCURS DEPENDING ON have the maximum length allocated in WORKING-STORAGE at compile time, so there's something in every one of those memory locations even if the length is less than the maximum.