forked from ibmdb/python-ibmdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_146a_CallSPINAndOUT_Blob_Param.py
More file actions
54 lines (43 loc) · 1.25 KB
/
Copy pathtest_146a_CallSPINAndOUT_Blob_Param.py
File metadata and controls
54 lines (43 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
from __future__ import print_function
import sys
import unittest
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_146a_CallSPINAndOUT_Blob_Param(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self.run_test_146a)
def run_test_146a(self):
conn = ibm_db.connect(config.database, config.user, config.password)
server = ibm_db.server_info( conn )
if(not server.DBMS_NAME.startswith('DB2/')):
print("SKIPPED")
return 0
if conn:
p1 = bytes('1234', 'utf8')
print("Values of bound parameters _before_ CALL:")
print(" 1: %s\n" % (p1.decode('utf8')))
stmt, blob1 = ibm_db.callproc(conn, 'out_blob', (p1,))
if stmt is not None:
print("Values of bound parameters _after_ CALL:")
print(" 1: %s \n" % (blob1))
#__END__
#__LUW_EXPECTED__
#Values of bound parameters _before_ CALL:
# 1: 1234
#
#Values of bound parameters _after_ CALL:
# 1: b'1234567801234567890'
#
#__ZOS_EXPECTED__
#SKIPPED
#__SYSTEMI_EXPECTED__
#SKIPPED
#__IDS_EXPECTED__
#SKIPPED