Redefined elements are typically described in the model as a choice.
You can address either of the forms but never both.
This means that the first time you address one of the values in the choice you are stuck with using this choice branch.
Tell those COBOL programmers not to overload their copy books to the point where you have to inspect the content before you can choose which branch to take in the choice.
This may also be due to a lack of initialization of the record (bad practice). Redefining any structure as pic X(n) allows you to glance over undefined areas like fillers where the structure of the data may as well be binary as text...
In a correct structure you should never have a comp-3 redefined as text.
You may have a pic 9(y) redefined as a pic X(y) but this is then just between different text representations of the same entity....
If you cannot choose depending on data discovered BEFORE the redefines wich branch of the choice you are going to use, you need to have your COBOL programmers deliver you a "better" copy book where you can resolve the choice before it is upon you.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum