The NPTESTS procedure can do this. From the Algorithms doc
"The Kruskal-Wallis, Friedman and Kendall, and Cochran tests use the procedure proposed by Dunn (1964) (originally designed for the Kruskal-Wallis test). The procedure uses ranks(or successes for the Cochran test) based"
NPTESTS was introduced in V18, but there were some enhancements in V22.
#SPSSStatistics#Support#SupportMigration