php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57762 Error reading an i5/OS file that has logical file with Selec/Omit option
Submitted: 2007-07-29 10:08 UTC Modified: 2015-09-03 13:42 UTC
From: sam at zend dot com Assigned:
Status: Not a bug Package: ibm_db2 (PECL)
PHP Version: 5.2.1 OS: i5/OS
Private report: No CVE-ID: None
 [2007-07-29 10:08 UTC] sam at zend dot com
Description:
------------
PHP script can not read i5/OS file that has logical with Select/Omit option. Here file datatypes:

Field      Type       Length  Length  Position        Usage    
CUSTNO     PACKED      11  0       6         1      
ZIP        CHAR           10      10         7        Both     
PLUS4      CHAR            4       4        17        Both     
LAST       CHAR           20      20        21        Both     
FIRST      CHAR           15      15        41        Both 
MI         CHAR            1       1        56        Both 
TITLE      CHAR            1       1        57        Both  
SUFFIX     CHAR            1       1        58        Both  
BUSNAM     CHAR           40      42        59        Both 
PRFTTL     CHAR           40      42       101        Both  
ADD1       CHAR           40      42       143        Both 
ADD2       CHAR           40      42       185        Both 
ADD3       CHAR           40      42       227        Both 
PHAC       PACKED       3  0       2       269        Both 
PHNO       PACKED       7  0       4       271        Both 
FAXAC      PACKED       3  0       2       275        Both 
FAXNO      PACKED       7  0       4       277        Both 
MPREF      CHAR            1       1       281        Both
STSFLG     CHAR            1       1       282        Both 
CRRT       CHAR            4       4       283 
DPBC       CHAR            2       2       287        Both 
DPBCCD     CHAR            1       1       289        Both 
ADDSTD     CHAR            1       1       290        Both  
ADRCHGDAT  DATE           10      10       291        Both  
EMAIL      CHAR           80      82       301        Both 
EPREF      CHAR            1       1       383        Both 
TELMKT     CHAR            1       1       384        Both 
FAXOPTIN   CHAR            1       1       385        Both 
CSUSPREF   CHAR            1       1       386        Both 
PHLAST     CHAR            5       5       387        Both  
ALWCON     CHAR            1       1       392        Both 
LN6        CHAR            6       6       393        Both 



 




 
  
                                                            







   

Reproduce code:
---------------
$sql = "SELECT custNo, first, last, add1, zip, stsFlg FROM DBFTEST1.CustMast WHERE custNo > ? FOR FETCH ONLY";
$stmt= db2_prepare($conn_resource, $sql);
$lower_limit = ;
db2_bind_param($stmt, 1, "lower_limit", DB2_PARAM_IN);
$result = db2_execute($stmt);

Expected result:
----------------
The $result should get TRUE value allowing to read array using  following function: db2_fetch_array($stmt)  

Actual result:
--------------
The db2 execute failed. SQLSTATE value: 22023 Message: Conversion error on host variable or parameter *N. SQLCODE=-302.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-06 12:22 UTC] Bobster52 at gmail dot com
Any update on this issue?  I'm currently hung up on this error due to a logical with select & omits.
 [2015-09-03 13:42 UTC] rangercairns@php.net
-Status: Open +Status: Not a bug
 [2015-09-03 13:42 UTC] rangercairns@php.net
If single format, access through SQL will work. If multiple format, access through SQL will not work. Closing this old bug.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 23:03:35 2021 UTC