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

creating and using packages in pl/i


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jawadshaik
Warnings : 1

New User


Joined: 27 Sep 2005
Posts: 16

PostPosted: Tue Oct 18, 2005 11:07 am
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
Sridevi_C

Active User


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

PostPosted: Wed Oct 19, 2005 8:31 pm
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
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
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 Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Creating CSV file from Variable recs ... DFSORT/ICETOOL 11
No new posts Creating a VB file PL/I & Assembler 10
No new posts Creating filelist ps file JCL & VSAM 2
Search our Forums:

Back to Top