Page 1 of 1

01 level redefined 10 times.

PostPosted: Fri Jul 18, 2008 7:55 pm
by ranga_subham
Hi,

We have a COBOL program wherein, a 01 level item is redefined several times but with different elementary fields. While writing, the programmer used only the original 01 level item to write from. :o

Can't the redefined group item be used to write from? :?

Please explain.

Thanks.

Re: 01 level redefined 10 times.

PostPosted: Fri Jul 18, 2008 8:08 pm
by dick scherrer
Hello,

While writing, the programmer used only the original 01 level item to write from.
Why does this cause concern?

Can't the redefined group item be used to write from?
It can but why would you want to?

You need to keep in mind that when something is redfined, there is stil only one address where things are moved to/from and or read into/written from. The main thing a redefines provides is the ability to define different "pictures" for the same data.

Unless there is some reason you have not posted, i'd suggest leaving the code as it is.

Re: 01 level redefined 10 times.

PostPosted: Fri Jul 18, 2008 8:19 pm
by ranga_subham
This is the first time I seen such a thing. I don't know if redefined group item also can be used to write from.

Thanks Dick.

Re: 01 level redefined 10 times.

PostPosted: Fri Jul 18, 2008 8:22 pm
by dick scherrer
You're welcome :)

d