After looking at the program at http://www.simotime.com/qsamio01.htm - I have written a COBOL program to call an assembler program but it abends with S0C4 at the SVC 19(OPEN) Instruction. But as a stand alone assembler program works correctly. What can be wrong?
All sorts of things COULD be wrong. What actually is wrong, however, we cannot tell you since you did not post anything that would allow us to help you. At a minimum, we would need to see the Assembler program and the COBOL compile options in order to provide help.
My first guess (and it is only a guess since you gave us so little to work with) would be that your COBOL program has DATA(31) and your Assembler program is not coded to use a 31-bit DCB nor is it using 31-bit addressing. That combination could cause all sorts of S0C4 storage violations.
Great! Glad to hear you found the problem. Interfacing Assembler with other languages can be a very powerful tool, but you do have ensure the Assembler is set up correctly to work with the other language. Addressing / residency mode issues are a very common area for problems to show up in such an interface.