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

Define a member in structure with respect to another member


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
No new posts Looking For a PDS Member Without Open... PL/I & Assembler 10
No new posts Library member auto insert option TSO/ISPF 3
Search our Forums:

Back to Top