Need help in assembler, get S0C4.

HLASM for MVS. PL/I for MVS & Enterprise PL/I for z/OS.
Previous topicNext topic

Topic Author
Ali Asgar
New Member
Posts: 4
Joined: Sat Jun 20, 2015 8:47 pm

Need help in assembler, get S0C4.

Post by Ali Asgar » Tue Jul 21, 2015 9:38 am

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



User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: Need help in assembler, get S0C4.

Post by Robert Sample » Tue Jul 21, 2015 6:06 pm

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.




Topic Author
Ali Asgar
New Member
Posts: 4
Joined: Sat Jun 20, 2015 8:47 pm

Re: Need help in assembler, get S0C4.

Post by Ali Asgar » Thu Aug 13, 2015 4:51 pm

Thanks Robert, your guess was right. Assembling the assembler program with correct options helped in resolving the problem.



User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: Need help in assembler, get S0C4.

Post by Robert Sample » Thu Aug 13, 2015 6:24 pm

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.




Topic Author
Ali Asgar
New Member
Posts: 4
Joined: Sat Jun 20, 2015 8:47 pm

Re: Need help in assembler, get S0C4.

Post by Ali Asgar » Wed Aug 19, 2015 8:26 am

Thanks Robert.



Previous topicNext topic

Return to “Assembler & PL/I.”