|
D Yestmnt1R PI
D itestNum 9a Const
D**
D iTaxYear 4a Const
D iReqSystem 6a Const
D iTo_TaxYr 4a Const
D iLendFlag 4a Const
D iService_ID 6a Const
Greetings.the
I am calling a Stored Procedure passing four character parameters. The
first parameter is of 9 bytes. When passing the value of '000001204',
Stored Procedure shows the value '000001200'. Here is my CLI code::%Addr(Frm_TXYear)
D testNum S 9a
D Frm_TXYear S 4a
D ReqSystem S 6a
D Too_TXYear S 4a inz(*blanks) Optional
D LenDFlag S 4a inz(*blanks) Optional
D Service_ID S 6a inz(*blanks) Optional
/free
EvalR testNum = '000000000' + %Trim('1204') ;
Eval Frm_TXYear = '2007' ;
Eval ReqSystem = 'SPEECH' ;
SQLAllocEnv(env);
SQLAllocConnect(env: conn);
SQLSetConnectAttrI( conn
: SQL_ATTR_DBC_SYS_NAMING
: SQL_TRUE
: %size(SQLINTEGER) );
SQLConnect( conn
: '*LOCAL'
: SQL_NTS
: *NULL
: SQL_NTS
: *NULL
: SQL_NTS );
SQLAllocStmt( conn : stmt );
SQLPrepare(stmt :'Call YESTMNT1R(?,?,?,?,?,?)' :SQL_NTS) ;
SQLBindParameter(stmt :1 :SQL_PARAM_INPUT
:SQL_CHAR
:SQL_CHAR
:9 :0
:%Addr(testNum)
:%Size(testNum)
:%len(testNum));
SQLBindParameter(stmt :2 :SQL_PARAM_INPUT
:SQL_CHAR :SQL_CHAR :4 :0
:%Size(Frm_TXYear) :%len(Frm_TXYear));:%Addr(Too_TXYear)
SQLBindParameter(stmt :3 :SQL_PARAM_INPUT
:SQL_CHAR :SQL_CHAR :6 :0 :%Addr(ReqSystem)
:%Size(ReqSystem) :%len(ReqSystem));
SQLBindParameter(stmt :4 :SQL_PARAM_INPUT
:SQL_CHAR :SQL_CHAR :4 :0
:%Size(Too_TXYear) :%len(Too_TXYear));:%Addr(Service_ID)
SQLBindParameter(stmt :5 :SQL_PARAM_INPUT
:SQL_CHAR :SQL_CHAR :4 :0 :%Addr(LenDFlag)
:%Size(LenDFlag) :%len(LenDFlag));
SQLBindParameter(stmt :6 :SQL_PARAM_INPUT
:SQL_CHAR :SQL_CHAR :6 :0
:%Size(Service_ID) :%len(Service_ID));'000001204'?
SQLExecute(stmt);
...
The prototype for the called procedure is
D Yestmnt1R PI
D itestNum 9a Const
D**
D iTaxYear 4a Const
D iReqSystem 6a Const
D iTo_TaxYr 4a Const
D iLendFlag 4a Const
D iService_ID 6a Const
Why is the value of testNum passing as '000001200' instead of
with this communication is strictly confidential, is intended only for the
Thank you
Art Duarte
======================================================================
Confidentiality Notice: The information contained in and transmitted
======================================================================
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.