[...] generate magic squares in SAS. My recent blog post on "How to return multiple values from a SAS/IML function" features a module that computes row sums and column sums of a matrix and could be extended check whether a matrix is a magic square. …