Fork within loop with join ALL

Thanks Dave! I appreciate the quick reply. Your suggestion solved my problem.

I assume that we still should declare the variable as automatic. Please correct correct me if I am wrong.