Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

UNION in PLI

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

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Thu Oct 14, 2010 9:52 am    Post subject: UNION in PLI
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: 74
Location: India

PostPosted: Thu Oct 14, 2010 4:51 pm    Post subject:
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: 1027
Location: Oostende, Belgium

PostPosted: Thu Oct 14, 2010 5:06 pm    Post subject:
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    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 Column Correlation names in UNION GuyC DB2 7 Mon Sep 06, 2010 8:31 pm
No new posts Fine tuning UNION ALL query Satish5 DB2 6 Thu Jun 25, 2009 9:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us