I am trying to use the %BAT in A/R and A/P but it doesn't seem to work.

%PJN does but it is confusing to use %PJN since the user posting the batch can recognize the batch number more readily than the posting sequence number.