View previous topic :: View next topic
|
Author |
Message |
gangas
New User
Joined: 20 Jul 2005 Posts: 14
|
|
|
|
hi
in redifines
1)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies b.
this will valid or not
2)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies a.
this will valid or not |
|
Back to top |
|
|
barobaybay
New User
Joined: 22 Jul 2005 Posts: 12 Location: Philippines
|
|
|
|
gangas wrote: |
hi
in redifines
1)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies b.
this will valid or not
2)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies a.
this will valid or not |
in the above statements, i believe #1 is valid instead of #2 which is not valid. |
|
Back to top |
|
|
lalita
New User
Joined: 03 Jul 2005 Posts: 8
|
|
|
|
HI
i think both 1 & 2 are valid because in both redefine is made at the same levels.
lalita |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hi
IT IS VALID IN BOTH CASE REDDEFINE NO PROBLEM BUT IT WILL PROBLEM IN LOGICALY JUST USE PROPERLY.
THANOOZ |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
gangas,
1 will not work, 2 is the correct method
Code: |
One or more redefinitions of the same storage area are permitted. The entries that give the new descriptions of the storage area must immediately follow the description of the redefined area without intervening entries that define new character positions. Multiple redefinitions must all use the data-name of the original entry that defined this storage area. For example:
05 A PICTURE 9999.
05 B REDEFINES A PICTURE 9V999.
05 C REDEFINES A PICTURE 99V99.
The redefining entry (identified by data-name-1) and any subordinate entries must not contain any VALUE clauses.
|
Also refer http://publib.boulder.ibm.com/infocenter/pdthelp/index.jsp?topic=/com.ibm.entcobol3.doc/tptbl21.htm |
|
Back to top |
|
|
|