Page 1 of 1

Need help in assembler, get S0C4.

Posted: Tue Jul 21, 2015 9:38 am
by Ali Asgar
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?

Code: Select all

COBOL program(compile with IBM Enterprise COBOL for z/OS 4.2.0): 
CALL 'QSAMIOA1' USING PASS-AREA 

Code: Select all

Assembler program(compile with HLASM R6.0): 
OPEN (QSAMFILE,(INPUT)) 
..... 
QSAMFILE DCB DSORG=PS,MACRF=GL,EODAD=EODRTN,SYNAD=ERROR1, 
DDNAME=QSAMFILE

Re: Need help in assembler, get S0C4.

Posted: Tue Jul 21, 2015 6:06 pm
by Robert Sample
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.

Re: Need help in assembler, get S0C4.

Posted: Thu Aug 13, 2015 4:51 pm
by Ali Asgar
Thanks Robert, your guess was right. Assembling the assembler program with correct options helped in resolving the problem.

Re: Need help in assembler, get S0C4.

Posted: Thu Aug 13, 2015 6:24 pm
by Robert Sample
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.

Re: Need help in assembler, get S0C4.

Posted: Wed Aug 19, 2015 8:26 am
by Ali Asgar
Thanks Robert.