IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

UNION in PLI


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Thu Oct 14, 2010 9:52 am
Reply with quote

Hello Team,

I am trying to change a COBOL code to PLI code and I am replacing REDEFINES with UNION. The code is working fine except that I am not able to use the group item as such .
For eg:-
Code:


DCL 1 cust_info,                     
    2 name1 char(3) init('ab'),       
    2 contact union,                 
        3 phone CHAR(11),                 
        3 phonedetails,                   
              4 area char(4),               
              4 no   char(7);               


When I populate the phone variable the same values are getting populated in phonedetails also. But the problem is that when I try to PUT SKIP or try to write the group variable cust_info in to a file , I am getting an error :

Unsupported use of union or structure containing a
union.


Please advise.
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Thu Oct 14, 2010 4:51 pm
Reply with quote

Hello Team,


Anybody could help on the above issue pls ?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Thu Oct 14, 2010 5:06 pm
Reply with quote

From the manual, GC14-7286-00:

Quote:
IBM1662I S Unsupported use of union or structure containing a union.

Explanation: Unions and structures containing unions may not be used in expressions except when used as an argument to a built-in function such as ADDR or UNSPEC.


Now tell us, what is your problem?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Illegal use of keyword fetch. Token w... DB2 2
No new posts Can we Update cursor with group by an... DB2 5
No new posts Union or join query DB2 2
No new posts Column Correlation names in UNION DB2 7
No new posts Fine tuning UNION ALL query DB2 6
Search our Forums:

Back to Top