getToolContext().getPortfolioMaster(),
getToolContext().getPositionMaster(),
getToolContext().getSecuritySource());
int positionCount = 0;
while (portfolioReader.readNext() != null) {
positionCount++;
}
System.out.println("Number of positions in " + getCommandLine().getOptionValue(PORTFOLIO_NAME) + ": " + positionCount);
}