Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us