|
|
| Author |
Message |
murugan_mf
New User
Joined: 31 Jan 2008 Posts: 38 Location: Chennai, India
|
|
|
|
| can any one explain what is UNION in PL/I ? |
|
| Back to top |
|
 |
References
|
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3070 Location: italy
|
|
| Back to top |
|
 |
murugan_mf
New User
Joined: 31 Jan 2008 Posts: 38 Location: Chennai, India
|
|
|
|
thanks enrico I got some idea but I am having one doubt:
How the size mismatch can occur for Individual and First_Name.
| Code: |
Declare 1 Client,
2 Number pic '999999',
2 Type bit(1),
2 * bit(7),
2 Name union,
3 Individual,
5 Last_Name char(20),
5 First_Name union,
7 First char(15),
7 Initial char(1),
3 Company char(35),
2 * char(0); |
|
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3070 Location: italy
|
|
|
|
The UNION attribute is just a more flexible form of DEFINED,
it just determines the starting point of a field with no checking of lengths IIRC
- DEFINED works only at the 1 level ( or no level ) variables
so to achieve the same result with the defined
You would have to repeat the whole structure |
|
| Back to top |
|
 |
cgk_106
New User
Joined: 22 Dec 2006 Posts: 19 Location: chennai
|
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8632 Location: 221 B Baker St
|
|
|
|
Hello,
Did you have something to ask/add. . . .?
d |
|
| Back to top |
|
 |
|
|