Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Calling a DB2 cobol program from a non-DB2 cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sameetshetty

New User


Joined: 19 Jan 2007
Posts: 11
Location: bangalore

PostPosted: Tue Feb 10, 2009 8:28 am    Post subject: Calling a DB2 cobol program from a non-DB2 cobol program
Reply with quote

Hi,

I have a non-DB2 program - TESTSTUB, which calls DB2 subroutine -SUBDB21. I have written the below JCL to execute the non-DB2 program.


//Step1 EXEC PGM=IKJEFT01,
// DYNAMNBR=20
//SYSABEND DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2_subsystem)
RUN PROGRAM(TESTSTUB) PLAN(Plan_name)
/*

Note : The JOBLIB (not shown here) contains the appropriate loadlib

But on execution I get a S0C6 error for the first SQL statement in DB2 subroutine (SUBDB21). i.e - CALL "DSNHLI" USING SQL-PLIST2

Can anyone please let me know if there is any additional changes I need to do when calling a DB2 cobol program from a non-DB2 cobol program

Regards
Sam
Back to top
View user's profile Send private message

mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Tue Feb 10, 2009 11:20 am    Post subject: Reply to: Calling a DB2 cobol program from a non-DB2 cobol p
Reply with quote

Hi,

Did you compile the non-db2 program with DB2 option.


Regards,
Mallik
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 10, 2009 3:01 pm    Post subject:
Reply with quote

Hi,

S0C6 si specification exception, well this is from the manual:
Quote:
System ABEND: S0C6

Description: This ABEND is caused by a specification exception. One of
the following occurred:

1) A data, instruction, or control-word address does not
specify the proper storage boundary alignment.

2) An instruction specifies an odd register number when it
should specify the even numbered register of an even-
odd register pair.

3) A floating point register other than 0, 2, 4, or 6 was
specified in a floating point instruction.

4) The multiplier or divisor in a decimal (packed)
arithmetic instruction exceeds 15 digits and sign.

5) The first operand field is shorter than or equal to
the second operand field in a decimal (packed)
multiplication or division instruction.

6) The block address in a SET STORAGE KEY or INSERT
STORAGE KEY instruction has the four low-order bits
not all zero.

7) A PSW with a non-zero protection key was encountered
when protection was not installed.

(Reason Code 6)

User Action: Correct the program logic error that caused the
specification exception and resubmit the job.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us