IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Calling a DB2 cobol program from a non-DB2 cobol program


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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

Superior Member


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

PostPosted: Tue Feb 10, 2009 3:01 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top