System Verilog Program Block

In reply to vardhana:

Extern declarations are associated with classes, not program blocks.

Use a module and completely define all tasks within the module.