Subject to Mr. Sample's comments, it looks good to me.
The primary reason to use Assembler is Assembler programs can execute faster than comparable compiled programs. To do this, you, as a programmer, must understand how the machine works. One fundamental rule you should never forget is
storage access is much slower (and sometimes much, much slower) than the rest of the machine. Your A 4,INDEX can be done more quickly. There are at least 3 ways it can be done more quickly. Tell us at least one way.
Another rule relates to the derivation of constants. Internal IBM coding rules are quite explicit about this. Your program has NUM DC F'10'. The 10 is the number of elements in X. If you change the number of entries in X, you have to change the value in NUM. There is a better way:
INDEX DC A(L'X)
NUM DC A(XSIZE)
X DC F'1,2,3'
XSIZE EQU (*-X)/L'X
L'X tells the Assembler to use the number of bytes in the first element of X. (*-X) tells the Assembler to compute the number of bytes between the current value of the location counter and the value of the location counter for X. So what will be the value of XSIZE?
You have
SR 2,2
L 2,SUM
What's the point of the SR?