[Migrated content. Thread originally posted on 17 September 2003]
The length size of a variable LK-ITEM has to be changed dynamically several times during the execution of a program.I've tried as below but it did not worked. Some one has already faced similar and solved it?
Thanks in advance.
77 REASON-FOR-EXPORT-ITEM-SIZE pic x(47).
77 CURRENCY-ITEM-SIZE pic x(24).
77 COUNTRY-ITEM-SIZE pic x(40).
. . .
77 TABLE-ITEM-SIZE pic 9(2).
78 ITEM-SIZE value length of TABLE-ITEM-SIZE.
. . .
01 LK-CODES-AREA is external.
02 LK-ITEM pic x(ITEM-SIZE).
. . .
evaluate true
when REASON-FOR-EXPORT-CODES
set TABLE-ITEM-SIZE to size of REASON-FOR-EXPORT-ITEM-SIZE
call "reason-for-export-codes"
end-call
when CURRENCY-CODES
set TABLE-ITEM-SIZE to size of CURRENCY-ITEM-SIZE
call "currency-codes"
end-call
when COUNTRY-CODES
set TABLE-ITEM-SIZE to size of COUNTRY-ITEM-SIZE
call "country-codes"
end-call
. . .



