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 

Attach statement in PL/I

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


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Mon May 03, 2004 5:49 am    Post subject: Attach statement in PL/I Reply with quote

Hi,
I have written a snippet to see the funtioning of attach statement in pl/i
in mainframe but its not working, giving error messages. Anybody help
me by correcting the following code or can provide a small example in
pl/1 in mainframes


/* PROGRAM TO DEMONSTRATE MULTITHREADING */
/* */
threads : procedure options(main);
dcl a float decimal(5) init(10);
dcl b float decimal(5) init(20);
dcl sum float decimal(5) init(0);
dcl sub float decimal(5) init(0);
attach sum_para thread(t1);
attach sub_para thread(t2);

call sum_para;
call sub_para;
/* */
sum_para : procedure ;
wait(thread(t2));
sum = a + b;
put list(a,b,sum);
end sum_para;
/* */
/* */
sub_para : procedure ;
sub = a - b;
put list(a,b,sub);
end sub_para;
end threads;




Thanks
Kris
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