Have you considered using objects ?
In reply to Re: subroutine and good practices by poj in thread subroutine and good practices by jmsnet