MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Moving structure to a a variable field in Pl/1

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Sat Dec 18, 2004 10:12 am    Post subject: Moving structure to a a variable field in Pl/1 Reply with quote

Hi,

I am having a problem moving a lvl - 1struture to a variable field of another structure in PL/1 .This is what I have to do.


Code:
DCL 1 Details,
   02 field_name1 char(29),
   02 field_name2 char(29),
   02 field_name3 char(29),
   02 field_name4 char(29),
   02 field_name5 char(29),
   02 field_name6 char(29);




Code:
dcl 1 log_Record
   02 program_name char(10),
   02 MESSAGE  CHAR(3000) VAR;


What I have to do is

Code:
log_record.MESSAGE = Details;


If i do the same as above I am getting the following error.


    IEL0643I S 267 INVALID USE OF STRUCTURE 'details' IN ARRAY OR ELEMENT ASSIGNMENT. STATEMENT IGNORED.


Please let me know how to proceed further.

Regards,
Rama Krishna Prayaga.
Back to top
View user's profile Send private message Yahoo Messenger
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Mon Dec 20, 2004 3:00 am    Post subject: Reply with quote

Hi,

do it like this:

DCL X CHAR(174) based(addr(details)); /* 6 * 29 Byte */


log_record.message = x ;


regards,
bauer
Back to top
View user's profile Send private message
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Mon Dec 20, 2004 3:56 am    Post subject: Reply with quote

Hi Bauer,

Thank you,

its working fine ,

Regards,
Rama_Prayaga
Back to top
View user's profile Send private message Yahoo Messenger
grajeevg
Beginner


Joined: 11 Jun 2004
Posts: 5
Topics: 2

PostPosted: Wed Jan 12, 2005 1:36 am    Post subject: Reply with quote

Rama_Prayaga,

You can try with STRING function. By using string function you can assign a group item to single string.

for exp

log_record.MESSAGE = String(Details)


Try this .

Regards,

Rajasekhar Reddy.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group