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 

How to move a value to a particular position in a variable

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


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Feb 17, 2005 2:53 pm    Post subject: How to move a value to a particular position in a variable Reply with quote

I have a variable called IOAREA declared as DCL IOAREA CHAR(85) UNALIGNED INIT(' ');


1.I want to know what is the difference between UNALIGNED & ALIGNED
2.I want to move some values into specific positions of IOAREA like

i want to a move a variabe of 2 bytes which should start from 8 th bye & end in 9 th byte in the IOAREA.
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Mon Feb 21, 2005 8:07 am    Post subject: Reply with quote

Hi yadav2005,

2.i: other solution:

DCL X 1 BASED ADDR(IOAREA) UNAL,
2 FILLER1 CHAR(7) ,
2 FIELD CHAR(2),
2 FILLER3 ......

X.FILED = "AA"

Make sure that X and IOAREA have same alignment.

regards,
bauer
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