by steve-myers » Tue Jul 17, 2012 11:49 pm
Well, I'm certainly not going to write any code for you considering how badly the "requirement" is documented, but you can use TRT to scan a string for a blank using this table -
FINDBLNK DC 0XL256'0',(C' ')X'00',X'04',(256-(*-FINDBLNK))X'00'
TRT will leave the address of the first blank in register 1. You have to prepare for the case where there are no blanks in the string, which I will leave as an exercise for you. With the address of the first blank in register 1, it is a simple matter to compute the length of the substring and copy the substring to another storage area using MVCL or by using the EX instruction to execute an MVC instruction.
FWIW, in some of my work in the last few months I have encountered this exact problem and used this technique to extract the substring.