Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What is UNION in PL/I

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Thu Jul 10, 2008 4:44 pm    Post subject: What is UNION in PL/I
Reply with quote

can any one explain what is UNION in PL/I ?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jul 10, 2008 4:48 pm    Post subject: Reply to: UNION
Reply with quote

did You care to look at the manual ,

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ibm3lr60/8.9?SHELF=IBMSH360.bks&DT=20071130131006

if something is not clear somebody will be glad to explain
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Thu Jul 10, 2008 5:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Jul 10, 2008 5:22 pm    Post subject: Reply to: UNION
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Illegal use of keyword fetch. Token w... HABBIE DB2 2 Fri Aug 28, 2015 5:20 pm
No new posts Can we Update cursor with group by an... vyasricha DB2 5 Sat May 26, 2012 11:05 am
No new posts Union or join query GuyC DB2 2 Tue May 10, 2011 1:25 pm
No new posts UNION in PLI Appu PL/I & Assembler 2 Thu Oct 14, 2010 9:52 am
No new posts Column Correlation names in UNION GuyC DB2 7 Mon Sep 06, 2010 8:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us