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
 
creating and using packages in pl/i

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
jawadshaik
Warnings : 1

New User


Joined: 27 Sep 2005
Posts: 16

PostPosted: Tue Oct 18, 2005 11:07 am    Post subject: creating and using packages in pl/i
Reply with quote

hi every one,

I need details about how to create packages and how to use the created packages in other programs .

hoping responce with good example

with regards,

jawadshaik
Back to top
View user's profile Send private message
References
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 107
Location: Concord, New Hampshire, USA.

PostPosted: Wed Oct 19, 2005 8:31 pm    Post subject:
Reply with quote

Hi,
Packages in PL/I? I know we have in DB2...
Regards,
Sridevi.
Back to top
View user's profile Send private message
jawadshaik
Warnings : 1

New User


Joined: 27 Sep 2005
Posts: 16

PostPosted: Thu Oct 20, 2005 12:34 pm    Post subject:
Reply with quote

Hi,

while refeing through some site i got this code referring to package concept

*Process S A(F) LANGLVL(SAA2) LIMITS(EXTNAME(31)) NUMBER;
Package_Demo: Package exports (Factorial);

/***********************************************/
/* Common Data */
/***********************************************/

dcl N fixed bin(15);
dcl Message char(*) value('The factorial of ');

/***********************************************/
/* Main Program */
/***********************************************/

Factorial: proc options (main);
dcl Result fixed bin(31);
put skip list('Please enter a number whose factorial ' ||
'must be computed ');
get list(N);
Result = Compute_factorial(n);
put list(Message || trim(N) || ' is ' || trim(Result));
end Factorial;

/***********************************************/
/* Subroutine */
/***********************************************/

Compute_factorial: proc (Input) recursive returns (fixed bin(31));
dcl Input fixed bin(15);
if Input <= 1 then
return(1);
else
return( Input*Compute_factorial(Input-1) );
end Compute_factorial;

end Package_Demo;


here i didnt get how this package is created and used

I mean there is some thing called packeges in pl/i and my query is how to create and use them

regards,

Jawadshaik
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