7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
9 #line 1 "char_array.pgc"
21 #ifdef _ECPG_INFORMIX_H
37 #line 7 "char_array.pgc"
41 #line 1 "regression.h"
48 #line 9 "char_array.pgc"
53 fprintf(stderr,
"Warning: At least one column was truncated\n");
63 #line 22 "char_array.pgc"
66 #line 23 "char_array.pgc"
69 const char *ppppp =
"XXXXX";
79 #line 30 "char_array.pgc"
82 #line 31 "char_array.pgc"
85 #line 32 "char_array.pgc"
88 #line 33 "char_array.pgc"
89 short bigstr_ind = 0 ;
91 #line 34 "char_array.pgc"
95 {
ECPGconnect(__LINE__, 3,
"ecpg1_regression" , NULL, NULL , NULL, 0);
96 #line 37 "char_array.pgc"
99 #line 37 "char_array.pgc"
102 #line 37 "char_array.pgc"
106 #line 39 "char_array.pgc"
109 #line 39 "char_array.pgc"
112 #line 39 "char_array.pgc"
115 #line 40 "char_array.pgc"
118 #line 40 "char_array.pgc"
121 #line 40 "char_array.pgc"
124 #line 41 "char_array.pgc"
127 #line 41 "char_array.pgc"
130 #line 41 "char_array.pgc"
133 #line 42 "char_array.pgc"
136 #line 42 "char_array.pgc"
139 #line 42 "char_array.pgc"
142 #line 43 "char_array.pgc"
145 #line 43 "char_array.pgc"
148 #line 43 "char_array.pgc"
151 #line 44 "char_array.pgc"
154 #line 44 "char_array.pgc"
157 #line 44 "char_array.pgc"
160 #line 45 "char_array.pgc"
163 #line 45 "char_array.pgc"
166 #line 45 "char_array.pgc"
170 #line 47 "char_array.pgc"
173 #line 48 "char_array.pgc"
176 #line 48 "char_array.pgc"
179 #line 48 "char_array.pgc"
183 #line 50 "char_array.pgc"
186 printf(
"Full Str. : Short Ind.\n");
187 for (loopcount = 0; loopcount < 100; loopcount++) {
188 strncpy(shortstr, ppppp,
sizeof shortstr);
189 memset(bigstr, 0,
sizeof bigstr);
191 ECPGt_char,(bigstr),(
long)11,(
long)1,(11)*
sizeof(
char),
192 ECPGt_short,&(bigstr_ind),(
long)1,(
long)1,
sizeof(
short),
193 ECPGt_char,(shortstr),(
long)5,(
long)1,(5)*
sizeof(
char),
195 #line 56 "char_array.pgc"
198 #line 56 "char_array.pgc"
201 #line 56 "char_array.pgc"
204 #line 56 "char_array.pgc"
206 printf(
"\"%s\": \"%s\" %d\n", bigstr, shortstr, shstr_ind);
210 #line 60 "char_array.pgc"
213 #line 60 "char_array.pgc"
216 #line 60 "char_array.pgc"
219 #line 61 "char_array.pgc"
222 #line 61 "char_array.pgc"
225 #line 61 "char_array.pgc"
227 {
ECPGtrans(__LINE__, NULL,
"commit work");
228 #line 62 "char_array.pgc"
231 #line 62 "char_array.pgc"
234 #line 62 "char_array.pgc"
239 #line 65 "char_array.pgc"
242 #line 66 "char_array.pgc"
244 {
ECPGprepare(__LINE__, NULL, 0,
"stmt1",
"SELECT 123::numeric(3,0), 't'::varchar(2)");
245 #line 67 "char_array.pgc"
248 #line 67 "char_array.pgc"
251 #line 67 "char_array.pgc"
254 #line 68 "char_array.pgc"
259 #line 69 "char_array.pgc"
262 #line 69 "char_array.pgc"
265 #line 69 "char_array.pgc"
270 #line 70 "char_array.pgc"
273 #line 70 "char_array.pgc"
276 #line 70 "char_array.pgc"
279 #line 70 "char_array.pgc"
282 printf(
"\n-----------------\ntype : data\n");
283 for (
int i = 0 ;
i < sqlda->
sqld ;
i++)
296 #line 85 "char_array.pgc"
299 #line 85 "char_array.pgc"
302 #line 85 "char_array.pgc"
304 {
ECPGtrans(__LINE__, NULL,
"commit work");
305 #line 86 "char_array.pgc"
308 #line 86 "char_array.pgc"
311 #line 86 "char_array.pgc"
314 printf(
"\nGOOD-BYE!!\n\n");
317 #line 90 "char_array.pgc"
320 #line 90 "char_array.pgc"
323 #line 90 "char_array.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
char * ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
char * PGTYPESnumeric_to_asc(numeric *num, int dscale)
struct sqlvar_struct sqlvar[1]