If you have MPEX from Vesoft you should be able to do something like this:
PURGE LISTID1,TEMP
listf @.chas.hmocorp,6;nopagehead >> listid1
REPEAT
setvar id_prefix "![currentrec]"[0:3]
setvar id_mm "![currentrec]"[3:2]
setvar id_dd "![currentrec]"[5:2]
setvar id_account ntoken("![currentrec]",2,".")
setvar id_eof vefinfo("!currentrec").eof
run aprogram;lib=p;info='!currentrec !id_mm !id_dd
!id_account'
FORRECS CURRENTREC=LISTID1,OLDTEMP
Each record in the file LISTID1 (which happens to contain fully qualified file
names) is read and the contents set to the variable CURRENTREC. Other
variables are set to various byte offsets of CURRENTREC. Then a program is run
with an info string set to the contents of some of the variables.