Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1