View previous topic :: View next topic
|
Author |
Message |
brahmanandareddy
New User
Joined: 16 Dec 2004 Posts: 44 Location: Hyderabad
|
|
|
|
1. Can I redefine a variable with different picture clause....see below
01 var1 pic x(10).
02 var2 pic 9(20) redefines var1.
move 'breddy' to var1.
display var1.
display var2.
what would be the results in the above code. is this possible?
2. For which item we cannot use redefines?
01
77
66
49 |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
Hi BrahmanandaReddy,
You can redefine a variable with different picture clause. But we can't redefine with a larger value.
66 level name is used specially for renames clause and 49 level is used for Varchar type DB2 columns. Redefines can be used for 01 and 77 level items.
Hope this helps:-) |
|
Back to top |
|
|
brahmanandareddy
New User
Joined: 16 Dec 2004 Posts: 44 Location: Hyderabad
|
|
|
|
Hi Anuradha,
Thanx for reply....but I think we can redefine a variable holding smaller value with a variable larger than that value
01 VAR1 pic x(10).
01 VAR2 pic 9(20) REDEFINES VAR1.
The above will workout without any problems. I read it in books and this has been asked in Kanbay test.
Thank You |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
Hi BrahmanandaReddy,
Can you help me out by saying the book you read. Because redefining an element with a larger values is not allowed in our shop. When we tried doing so it gave me an error. But i heard people saying that it is allowed. Please give me the name of the book/Manual you read |
|
Back to top |
|
|
Rajshekhar V Patil
New User
Joined: 23 Feb 2005 Posts: 7 Location: Mumbai
|
|
|
|
Hi,
Level 66 can not be Redefines.
The level 66 only used for Rename.
The level 49 u can make Redefine.
Rajshekhar V Patil |
|
Back to top |
|
|
mainframemouli
New User
Joined: 01 Mar 2005 Posts: 52 Location: Mysore
|
|
|
|
Hi anuradha,
Its not mentioned in any book or so , but its a FAQ in mainframe interviews.
But that kind of redefinig is possible....
we are using Roscoe 6.0 its allowed in that.... |
|
Back to top |
|
|
therasith
New User
Joined: 02 Jan 2004 Posts: 52 Location: chennai
|
|
|
|
IT IS IMPOSSIBLE. IMPROPER DATA TYPE ASSUMED
01 TO 77 LEVEL EXCEPT 66 |
|
Back to top |
|
|
sunnyk
New User
Joined: 20 Oct 2004 Posts: 59
|
|
|
|
Hi,
You can redefine a small item with a larger item only when they are at 01 level.I have tried that many a times and it has worked fine for me.
And u can redefine at all levels except 66 level.
Thanks
sunny |
|
Back to top |
|
|
|