Need help in assembler, get S0C4.

HLASM for MVS. PL/I for MVS & Enterprise PL/I for z/OS.
Post Reply
Ali Asgar
New Member
Posts: 4
Joined: Sat Jun 20, 2015 8:47 pm

Need help in assembler, get S0C4.

Post 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
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Need help in assembler, get S0C4.

Post 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.
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 »

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: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Need help in assembler, get S0C4.

Post 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.
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 »

Thanks Robert.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Assembler & PL/I.”