Cobol call Assembler to open file, return S0C4?
Moderators: dbzTHEdinosauer, Moderator Group
Cobol call Assembler to open file, return S0C4?
I write a COBOL program to call a Assembler program(open a QSAM file). It returns S0C4 at the SVC 19(OPEN) Instruction. When I use the Assembler program separately, it's OK. It's there anything wrong?
COBOL program(compile with IBM Enterprise COBOL for z/OS 4.2.0):
CALL 'QSAMIOA1' USING PASS-AREA
Assembler program(compile with HLASM R6.0):
OPEN (QSAMFILE,(INPUT))
.....
QSAMFILE DCB DSORG=PS,MACRF=GL,EODAD=EODRTN,SYNAD=ERROR1,
DDNAME=QSAMFILE
COBOL program(compile with IBM Enterprise COBOL for z/OS 4.2.0):
CALL 'QSAMIOA1' USING PASS-AREA
Assembler program(compile with HLASM R6.0):
OPEN (QSAMFILE,(INPUT))
.....
QSAMFILE DCB DSORG=PS,MACRF=GL,EODAD=EODRTN,SYNAD=ERROR1,
DDNAME=QSAMFILE
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
This does not explain why you want to open a file in the assembler code. . .
What JCL do you want to SUB? How do you get the "JOBID"?
Ia the file being opened in the assembler code to be read or written in the cobol code?
It may help someone help you if you more clearly explain just what you want this process to do and how the cobol relates to the assembler.
What JCL do you want to SUB? How do you get the "JOBID"?
Ia the file being opened in the assembler code to be read or written in the cobol code?
It may help someone help you if you more clearly explain just what you want this process to do and how the cobol relates to the assembler.
Have a good one
Thanks for reply.
This is just for test. You can see the sample on http://www.simotime.com/qsamio01.htm. I just can't run it right.
This is just for test. You can see the sample on http://www.simotime.com/qsamio01.htm. I just can't run it right.
Make sure that both modules are error free when compiled/assembled.
Make sure both linkedits were successful.
Make sure the run jcl reflects all of the needed dd statements.
Make a copy of the assembler code and remove the code that deals with the file. See if the cobol code can successfully invoke this code.
Make sure both linkedits were successful.
Make sure the run jcl reflects all of the needed dd statements.
Make a copy of the assembler code and remove the code that deals with the file. See if the cobol code can successfully invoke this code.
Have a good one
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page