Calling a stored procedure from a COBOL program,bind errorSQLSTATE=42884

Robert J. Milonas

Calling a stored procedure from a COBOL program,bind errorSQLSTATE=42884
This is a good point. We ran into the situation where the person that did the compile and bind on the cobol stored procedure could call it from his batch cobol program but several other people were getting errors trying to call the stored procedure, until they were granted authority.



Timothy Brocke <[login to unmask email]> wrote:

>Have you done all your GRANTS ?
>
>example
>
>GRANT BIND, EXECUTE ON PACKAGE UNIT.DBASPERR TO PUBLIC;
>GRANT EXECUTE ON PROCEDURE SYSPROC.DBASPERR TO PUBLIC;
>
>Tim Brocke
>Sr. Database Administrator
>Navy Federal Credit Union
>703-255-8382 (office)
>703-206-3543 (fax)
>
>
>
> kadir guray meric
> <[login to unmask email] To: [login to unmask email]
> IL.COM> cc:
> Sent by: DB2 Data Subject: Calling a stored procedure from a COBOL
> Base Discussion program,bind error SQLSTATE=42884
> List
> <[login to unmask email]
> LASSOC.COM>
>
>
> 11/15/2002 02:11
> PM
> Please respond to
> DB2 Data Base
> Discussion List
>
>
>
>
>
>
>Hi to everyone in the list,
>We are using DB2 for OS/390 V 6.1.
>We have a working COBOL stored procedure. We connect to OS/390 with stored
>procedure builder, give an input value, it gives me result the set and an
>output value. It works fine there.Now, We are trying to call this procedure
>from a batch cobol program. We have precompiled and compiled the batch
>cobol program with no erros. But when we try to bind cobol program, it gets
>an error like shown below:
>DSNX200I +DB1T BIND SQL ERROR
> USING D000 AUTHORITY PLAN=(NOT APPLICABLE) DBRM=BATPRG
>
> STATEMENT=87 SQLCODE=-440 SQLSTATE=42884
> TOKENS=PROCEDURE RSLTSET
> CSECT NAME=DSNXOSTP
> RDS CODE=-120
>DSNT233I +DB1T UNSUCCESSFUL BIND FOR PACKAGE = DB0T.CDDB299.BATPRG.()
>
>SQLSTATE=42884 means that number of parameters in the parameter list for
>a stored procedure does not match the number of expected. We have checked
>this, parm_count filed of sysroutines is 2.
>When We look at STATEMENT=87 at precompile step, it is
>EXEC SQL CALL RSLTSET (:IN-AUTH, :OUT-CODE) END-EXEC
>It gets error at this point.
>
>Our input and output variables are defined to be:
>01 IN-AUTH PIC X(8). (character 8)
>01 OUT-CODE PIC S9(9) USAGE BINARY. (integer)
>We have one input and one output parameter. What is wrong with this? We are
>giving 2 params when We call our procedure.
>
>We are using script shown below to define the RSLTSET stored procedure to
>sysroutines and sysparms.
>CREATE PROCEDURE SYSPROC.RSLTSET
>(IN AUTHID CHAR(8), OUT OUTCODE INTEGER)
> LANGUAGE COBOL MODIFIES SQL DATA COLLID RSLTSET EXTERNAL NAME
>'RSLTSET'
> NO WLM ENVIRONMENT ASUTIME NO LIMIT
> RESULT SETS 1 PROGRAM TYPE MAIN SECURITY DB2
>
> STAY RESIDENT NO PARAMETER STYLE GENERAL WITH NULLS
> COMMIT ON RETURN NO;
>Has anayone ever faced such a problem? How can we solve this bind problem?
>What might be the problem, with paramaters or anything else?
>Thanks.
>Kadir Guray MERIC
>
>
>
>

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/



anil mathur

Bind Error
(in response to Robert J. Milonas)
Hello List,

We are DB2 v 7.1, OS/390

All are Binds are failing with the following error message:

1READY

DSN SYSTEM(DSNL)

DSN

BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
MEMBE
ACTION(ADD)
ENABLE(BATCH
LATION(CS) VALIDATE(BIND)

L(DRDA) EXPLAIN(NO)

CURRENTDATA(NO)

DYNAMICRULES(RUN)

IKJ56641I DSN ENDED DUE TO ERROR+

IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
077C10009AB5BF8A
ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091

Can anyone tell me what this error means, Thanks.

Anil Mathur



Thomas E. Faglon

Re: Bind Error
(in response to anil mathur)
00E30067
Explanation: The BIND process program abended while attempting to use a
BIND parameter. This usually indicates that the parameter list provided
to the service controller BIND function is invalid (such as invalid
addresses or incorrect key).
System Action: A record is written to SYS1.LOGREC, and an SVC dump is
requested. The BIND subcommand is terminated.
User Response: Notify the system programmer.
System Programmer Response: Obtain a copy of SYS1.LOGREC and the SVC
dump.
If you suspect an error in DB2, refer to Part 2 of DB2 Diagnosis Guide and
Reference for information on identifying and reporting the problem.
check all your bind parameters



"Mathur, Anil"
<[login to unmask email] To: [login to unmask email]
GROUP.COM> cc: (bcc: Thomas E. Faglon/Telcordia)
Subject: Bind Error
12/27/02 09:37 AM
Please respond to DB2
Data Base Discussion
List







Hello List,

We are DB2 v 7.1, OS/390

All are Binds are failing with the following error message:

1READY

DSN SYSTEM(DSNL)

DSN

BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
MEMBE
ACTION(ADD)
ENABLE(BATCH
LATION(CS) VALIDATE(BIND)

L(DRDA) EXPLAIN(NO)

CURRENTDATA(NO)

DYNAMICRULES(RUN)

IKJ56641I DSN ENDED DUE TO ERROR+

IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
077C10009AB5BF8A
ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091

Can anyone tell me what this error means, Thanks.

Anil Mathur



the DB2-L webpage at http://listserv.ylassoc.com. The owners of the list
can



Dave Nance

Re: Bind Error
(in response to Thomas E. Faglon)
Anil,
Looks like only certain parts of your input are being read, take a look at the bolded sections below. Are you using a fixed block file? Do you have hyphens(-) at the end of a line to say it will be continued on the next line? Do you have non-displayed hex characters in your input? The reason code states that you have passed bad data to the bind process, correct your input and bind it again.
1READY

DSN SYSTEM(DSNL)

DSN

BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
MEMBE
ACTION(ADD)
ENABLE(BATCH
LATION(CS) VALIDATE(BIND)

L(DRDA) EXPLAIN(NO)

CURRENTDATA(NO)

DYNAMICRULES(RUN)

IKJ56641I DSN ENDED DUE TO ERROR+

IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
077C10009AB5BF8A
ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091


Dave Nance
First Health Services, Corp.
(804)527-6841

>>> [login to unmask email] 12/27/02 9:37:26 AM >>>
Hello List,

We are DB2 v 7.1, OS/390

All are Binds are failing with the following error message:

1READY

DSN SYSTEM(DSNL)

DSN

BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
MEMBE
ACTION(ADD)
ENABLE(BATCH
LATION(CS) VALIDATE(BIND)

L(DRDA) EXPLAIN(NO)

CURRENTDATA(NO)

DYNAMICRULES(RUN)

IKJ56641I DSN ENDED DUE TO ERROR+

IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
077C10009AB5BF8A
ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091

Can anyone tell me what this error means, Thanks.

Anil Mathur




This message, including any attachments, is intended solely for the use
of the named recipient(s) and may contain confidential and/or
privileged information. Any unauthorized review, use, disclosure or
distribution of this communication(s) is expressly prohibited.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy any and all copies of the original message.
Thank you.

[login to unmask email]

Re: Bind Error
(in response to Dave Nance)
If you are using Bind statements generated from the CA-RC/Migrator tool you
need to check for hex zeros in the statements.

Depending on your maintenance level, there may be hex zeros.

Carol Sutfin
Corporate DBA
AmSouth Bank
(205)326-5214 Fax:(205)326-5613
[login to unmask email]




"Mathur, Anil"
<[login to unmask email] To: [login to unmask email]
EGROUP.COM> cc:
Sent by: DB2 Data Subject: Bind Error
Base Discussion List
<[login to unmask email]
SOC.COM>


12/27/02 08:37 AM
Please respond to
DB2 Data Base
Discussion List





Hello List,

We are DB2 v 7.1, OS/390

All are Binds are failing with the following error message:

1READY

DSN SYSTEM(DSNL)

DSN

BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
MEMBE
ACTION(ADD)
ENABLE(BATCH
LATION(CS) VALIDATE(BIND)

L(DRDA) EXPLAIN(NO)

CURRENTDATA(NO)

DYNAMICRULES(RUN)

IKJ56641I DSN ENDED DUE TO ERROR+

IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
077C10009AB5BF8A
ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091

Can anyone tell me what this error means, Thanks.

Anil Mathur



the DB2-L webpage at http://listserv.ylassoc.com. The owners of the list
can



michael bell

Re: Bind Error
(in response to csutfin@AMSOUTH.COM)
The rules for BIND input are the same as TSO commands
1. data in cols 1 thru 72 only
2. - hyphen for the last non-blank character is continuation
3. must be LRECL=80 - My first guess if the bind commands worked previously
is that someone changed the LRECL on the PDS. It is amazingly easy to do.
To reset use IEBGENER and specify LRECL=80 on the sysut2 dd. It is very
common for the blksize to blasted also in which case you need to know the
old blksize. You might be better off restoring from a backup and then
identify the changes to the current PDS. SMF will give you all the jobs
that touch a DSN if you want to find out how it happened.

Mike Bell
HLS Technologies

----- Original Message -----
From: "Mathur, Anil" <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Friday, December 27, 2002 8:37 AM
Subject: Bind Error


> Hello List,
>
> We are DB2 v 7.1, OS/390
>
> All are Binds are failing with the following error message:
>
> 1READY
>
> DSN SYSTEM(DSNL)
>
> DSN
>
> BIND PACKAGE(CDVL02BH) OWNER(@DBIDL02) QUALIFIER(DVLT02)
> MEMBE
> ACTION(ADD)
> ENABLE(BATCH
> LATION(CS)
VALIDATE(BIND)
>
> L(DRDA) EXPLAIN(NO)
>
> CURRENTDATA(NO)
>
> DYNAMICRULES(RUN)
>
> IKJ56641I DSN ENDED DUE TO ERROR+
>
> IKJ56641I SYSTEM ABEND CODE 04E REASON CODE 00E30067 PSW
> 077C10009AB5BF8A
> ASIDS: HOME = 01A8 PRIMARY = 01A8 SECONDARY = 0091
>
> Can anyone tell me what this error means, Thanks.
>
> Anil Mathur
>
>
>