Alternatively, add DOSENUM as a stratification variable to the TABLES statement:
tables DOSENUM*TRTN*RESULT/ fisher;
With that you can use the existing (unsorted) HAVE dataset, omit the BY statement and still obtain the same result: Fisher's exact test applied separately to the three dose groups.
However, from your description ("the p-value") I'm not sure if you want three p-values or rather a single p-value, maybe from an exact test for the common odds ratio, adjusting for DOSENUM, if appropriate for your data. This would be a kind of generalization of Fisher's exact test and could be requested by an EXACT statement (exact comor;).
... View more