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
 

 

Define a member in structure with respect to another member

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

New User


Joined: 23 Feb 2006
Posts: 12

PostPosted: Fri Feb 24, 2006 3:20 pm    Post subject: Define a member in structure with respect to another member
Reply with quote

Hi
I would like to know if it is possible to define a member in a structure with respect to another member which is initialized :
eg :

dcl 1 struct,
2 a pic '99' init(12),
2 b char(3) init('abc),
2 c char(2) def b position(1);

Awaiting reply.
Back to top
View user's profile Send private message

nutakkimurali

New User


Joined: 15 Nov 2005
Posts: 22

PostPosted: Tue Feb 28, 2006 3:58 pm    Post subject:
Reply with quote

YES C WILL HAVE THE VALUE 'AB'
FROM POSITION 1 TO CHAR(2) I.E 'AB'

C SHOULS ALWAYS DECLARE LESS THA OR EQUAL TO B.

Muralee
Back to top
View user's profile Send private message
mythili.m

New User


Joined: 23 Feb 2006
Posts: 12

PostPosted: Wed Mar 01, 2006 10:20 am    Post subject: Define attribute
Reply with quote

Hi ,

I tried it already.It is not working. I don't think it is possible within a structure as with individual variables.It works if it is declared in lvl 1 defined in terms of another variable like:

dcl x pic'(6)9' init(123456);
dcl 1 struct def x position(1),
2 a pic '99' ,
2 b pic '99' ,
2 c pic '99' ;

but what if i have to define between members ? Is that possible ?

Mythili.
Back to top
View user's profile Send private message
jawadshaik
Warnings : 1

New User


Joined: 27 Sep 2005
Posts: 16

PostPosted: Wed Mar 01, 2006 12:57 pm    Post subject:
Reply with quote

Yes the element of a structure cant be defined over the other element of same structure.

if iam wrong let me know
Back to top
View user's profile Send private message
mythili.m

New User


Joined: 23 Feb 2006
Posts: 12

PostPosted: Thu Mar 09, 2006 5:50 pm    Post subject:
Reply with quote

Hi,

Can anyone tell me if it is possible to use 'defined' or 'union' attribute in a structure (having different data types) other than level 1 .I tried using it but i get an error of 8 saying that the 'defined' or 'union' attribute is getting ignored.
Awaiting reply eagerly.
Pls let me know..............
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 Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am


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