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;