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

sql code 927 abend


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shaktieswararao.Hazaru

New User


Joined: 25 Sep 2010
Posts: 20
Location: Hyderabad

PostPosted: Tue Jul 15, 2014 1:18 am
Reply with quote

Hi,

For one of my project requirement, I have to invoke a db2 sp. The flow is like below.

A(main module) -> calling submodule B -> calling new submodule c-> invoking db2 sp.

I have compiled the new submodule C with bind parm as DYNAM.

In BAU we have IMS and the batch job is using DFSRRC00 utility, this is the first time we are invoking a db2 sp from batch.

I have created the plan for main module A with pckg list of new submodule C and the DB2 sp bind pacakge.

Modified the LCT card for main module as below
INCLUDE RESLIB(DFSLI000)
NAME Mainmodule(R)

When i submit the job it is failing as the sqlcode is 927.
can someone help me with the issue if there is anything i should take care when compiling the modules/LCT cards/changes to the the proc for DFSRRC00 ?

Thanks,
shakti.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Jul 15, 2014 2:26 am
Reply with quote

You could be self reviewed the below links, please have a look.
ibmmainframes.com/about56480.html
ibmmainframes.com/about24955.html
ibmmainframes.com/about23571.html
Back to top
View user's profile Send private message
shaktieswararao.Hazaru

New User


Joined: 25 Sep 2010
Posts: 20
Location: Hyderabad

PostPosted: Tue Jul 15, 2014 2:49 am
Reply with quote

Hi Rohit,

Before posting my query i went through al the links which you have shared.
The solution for my problem is not there in the above links.

The above links tells us on how to resolve the abend for Ikjeft01 utility, but i'm using DFSRRC00 utility.

//STEP200 EXEC PGM=DFSRRC00,COND=(0,NE),REGION=3M,
// PARM=(BMP,OFCNT,OFCNT,,,,,,,0,0,,,
// &IMSID,&IMSID.BMP)

I checked few components using DFSRRC00 for db2 but their parm is as below.

//STEP010 EXEC PGM=DFSRRC00,REGION=&CORE,
// PARM='DLI,DSNMTV01,EH004&CYC,,,,,&CKPID,,,,,,&DBRC'


I dont have any idea if I have to make any changes to the parms to call db2.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Tue Jul 15, 2014 6:20 pm
Reply with quote

Where is the job failing? Are there any DB2 calls prior to the call to the stored procedure?

Is the stored procedure a Cobol program? If so, was it compiled and linked to use DSNRLI (RRSAF attachment)?

If these questions make no sense to you, contact your local site support and/or DBA for advice.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Jul 15, 2014 7:12 pm
Reply with quote

And the code you received is -927, not 927
icon_evil.gif icon_evil.gif icon_evil.gif
Back to top
View user's profile Send private message
shaktieswararao.Hazaru

New User


Joined: 25 Sep 2010
Posts: 20
Location: Hyderabad

PostPosted: Tue Jul 15, 2014 11:40 pm
Reply with quote

Hi,

Where is the job failing? The step where i'm trying to connect to db2 server from my sub module.

Are there any DB2 calls prior to the call to the stored procedure? No, there are no calls prior to this.

Is the stored procedure a Cobol program? Yes
was it compiled and linked to use DSNRLI (RRSAF attachment)? yes, I compiled it and used DSNRLI.

I have also inlcuded the db2 stored proc load lib in my step.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Jul 16, 2014 12:02 am
Reply with quote

Can you also verify to have a plan name as your Run Unit ( Program) name? in addition also ensure that DFSLI000 is picked from IMS Libraries and not from DSN library.
Back to top
View user's profile Send private message
shaktieswararao.Hazaru

New User


Joined: 25 Sep 2010
Posts: 20
Location: Hyderabad

PostPosted: Wed Jul 16, 2014 12:24 am
Reply with quote

Hi Rohit,

The DFSRRC00 parm is as below

PGM=DFSRRC00,COND=(0,NE),REGION=3M,
PARM=(BMP,OFCNT,OFCNT,,,,,,,0,0,,,
&IMSID,&IMSID.BMP)

OFCNTCTL is the main module name but in the parm it is as OFCNT.
I have created the plan name as OFCNT.

I have given the LCT in chgman as below.

INCLUDE RESLIB(DFSLI000)
NAME OFCNT(R)

please advise.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Jul 16, 2014 1:28 am
Reply with quote

Quote:
OFCNTCTL is the main module name but in the parm it is as OFCNT.
I have created the plan name as OFCNT

Can you please try to have plan and the program name same and give a try?

Also below is the sample JCL, MAke sure you give IMS Libs in your JCL(STEPLIB)

Code:
//G      EXEC PGM=DFSRRC00,REGION=&RGN,
//            PARM=(BMP,&MBR,&PSB,&IN,&OUT,
//            &OPT&SPIE&TEST&DIRCA,&PRLD,
//            &STIMER,&CKPTID,&PARDLI,&CPUTIME,
//            &NBA,&OBA,&IMSID,&AGN,&SSM,
//             &PREINIT,&ALTID,
//             '&APARM',&LOCKMAX,,,&IMSPLEX)
//STEPLIB  DD DSN=IMS.&SYS2.SDFSRESL,DISP=SHR
//         DD DSN=IMS.&SYS2.PGMLIB,DISP=SHR
//PROCLIB  DD DSN=IMS.&SYS2.PROCLIB,DISP=SHR
//SYSUDUMP DD SYSOUT=&SOUT,
//         DCB=(LRECL=121,RECFM=VBA,BLKSIZE=3129),
//         SPACE=(125,(2500,100),RLSE,,ROUND)
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Jul 16, 2014 7:27 pm
Reply with quote

A stored procedure does not run in the same address space as your BMP. It runs in a separate WLM controlled address space. Your local support people or DBA should be able to tell you the name.
Back to top
View user's profile Send private message
shaktieswararao.Hazaru

New User


Joined: 25 Sep 2010
Posts: 20
Location: Hyderabad

PostPosted: Tue Jul 22, 2014 10:50 pm
Reply with quote

Hi,

Our application DBA advised to use the IMS-DB2 ATTACH as Y for the calling module.
It got resolved by changing the Chgman compile options in calling module with IMS-DB2 attach as Y.

But when i run the job it is throwing U3042 abend.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top