Its a little late for this answer, but I was recently working on this requirement and found almost nothing helpful, until I found this, hope this will help someone in need:
** This excerpt is taken from Programming Pig book.
For a long time in Pig Latin, the entire script needed to be in one file. This produced
some rather unpleasant multithousand-line Pig Latin scripts. Starting in 0.9, the preprocessor
can be used to include one Pig Latin script in another. Taken together with
the macros, it is now possible to write
modular Pig Latin that is easier to debug and reuse:
import is used to include one Pig Latin script in another:
--main.pig
import '../examples/ch6/dividend_analysis.pig';
daily = load 'NYSE_daily' as (exchange:chararray, symbol:chararray,
date:chararray, open:float, high:float, low:float, close:float,
volume:int, adj_close:float);
results = dividend_analysis(daily, '2009', 'symbol', 'open', 'close');
import writes the imported file directly into your Pig Latin script in place of the
import statement. In the preceding example, the contents of dividend_analysis.pig will
be placed immediately before the load statement. Note that a file cannot be imported
twice. If you wish to use the same functionality multiple times, you should write it as
a macro and import the file with that macro.