3 static const char _Cn5[] =
"democursor";
4 static const char _Cn4[] =
"namecursor";
5 static const char _Cn3[] =
"selectname";
6 static const char _Cn2[] =
"hb5cursor";
7 static const char _Cn1[] =
"selecthb5";
16 #line 1 "/opt/informix/incl/esql/sqlca.h"
90 #define SQLNOTFOUND 100
94 #define sqlca ifmxsqlca
106 extern int4 * ifx_sqlcode(
void);
107 extern struct sqlca_s * ifx_sqlca(
void);
109 #define SQLCODE (*(ifx_sqlcode()))
110 #define SQLSTATE ((char *)(ifx_sqlstate()))
111 #define sqlca (*(ifx_sqlca()))
120 #line 103 "/opt/informix/incl/esql/sqlca.h"
121 #line 3 "get_data.ec"
131 #line 9 "get_data.ec"
132 #line 10 "get_data.ec"
163 #line 39 "get_data.ec"
169 #line 41 "get_data.ec"
171 #line 41 "get_data.ec"
172 sqli_db_open(
"rawdb", 0);
173 #line 41 "get_data.ec"
192 #line 53 "get_data.ec"
194 #line 56 "get_data.ec"
195 sqli_prep(ESQLINTVERSION,
_Cn1,
"select * from stn where id matches ?",(ifx_literal_t *)0, (ifx_namelist_t *)0, 2, 0, 0 );
196 #line 56 "get_data.ec"
204 #line 60 "get_data.ec"
206 #line 60 "get_data.ec"
207 sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 512),
_Cn2, sqli_curs_locate(ESQLINTVERSION,
_Cn1, 513), 0, 0);
208 #line 60 "get_data.ec"
216 #line 64 "get_data.ec"
218 #line 64 "get_data.ec"
219 static ifx_sqlvar_t _sqibind[] =
221 { 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
222 #line 64 "get_data.ec"
224 static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
225 #line 64 "get_data.ec"
227 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 768), &_SD0, (
char *)0, (
struct value *)0, 1, 0);
228 #line 64 "get_data.ec"
243 #line 72 "get_data.ec"
245 #line 75 "get_data.ec"
246 sqli_prep(ESQLINTVERSION,
_Cn3,
"select * from stn where des matches ?",(ifx_literal_t *)0, (ifx_namelist_t *)0, 2, 0, 0 );
247 #line 75 "get_data.ec"
255 #line 79 "get_data.ec"
257 #line 79 "get_data.ec"
258 sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 512),
_Cn4, sqli_curs_locate(ESQLINTVERSION,
_Cn3, 513), 0, 0);
259 #line 79 "get_data.ec"
267 #line 83 "get_data.ec"
269 #line 83 "get_data.ec"
270 static ifx_sqlvar_t _sqibind[] =
272 { 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
273 #line 83 "get_data.ec"
275 static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
276 #line 83 "get_data.ec"
278 sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn4, 768), &_SD0, (
char *)0, (
struct value *)0, 1, 0);
279 #line 83 "get_data.ec"
292 #line 92 "get_data.ec"
294 #line 92 "get_data.ec"
295 static ifx_sqlvar_t _sqobind[] =
297 { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
298 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
299 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
300 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
301 { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
302 { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
303 { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
304 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
305 { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
306 { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
307 { 102,
sizeof((
stn_rec).
elev), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
308 { 100, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
309 { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
310 { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
311 { 100, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
312 { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
313 { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
314 { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
315 { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
316 { 102,
sizeof((
stn_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
317 #line 92 "get_data.ec"
319 static ifx_sqlda_t _SD0 = { 20, _sqobind, {0}, 20, 0 };
320 static _FetchSpec _FS1 = { 0, 1, 0 };
321 #line 92 "get_data.ec"
322 _sqobind[0].sqldata = (
stn_rec).
id;
323 #line 92 "get_data.ec"
324 _sqobind[1].sqldata = (
stn_rec).plat;
325 #line 92 "get_data.ec"
326 _sqobind[2].sqldata = (
stn_rec).aid;
327 #line 92 "get_data.ec"
328 _sqobind[3].sqldata = (
stn_rec).aid2;
329 #line 92 "get_data.ec"
330 _sqobind[4].sqldata = (
stn_rec).type;
331 #line 92 "get_data.ec"
332 _sqobind[5].sqldata = (
stn_rec).des;
333 #line 92 "get_data.ec"
334 _sqobind[6].sqldata = (
stn_rec).det;
335 #line 92 "get_data.ec"
336 _sqobind[7].sqldata = (
stn_rec).init;
337 #line 92 "get_data.ec"
339 #line 92 "get_data.ec"
340 _sqobind[9].sqldata = (
stn_rec).lng;
341 #line 92 "get_data.ec"
342 _sqobind[10].sqldata = (
char *) &(
stn_rec).elev;
343 #line 92 "get_data.ec"
344 _sqobind[11].sqldata = (
stn_rec).stat;
345 #line 92 "get_data.ec"
346 _sqobind[12].sqldata = (
stn_rec).huc1;
347 #line 92 "get_data.ec"
348 _sqobind[13].sqldata = (
stn_rec).cou;
349 #line 92 "get_data.ec"
350 _sqobind[14].sqldata = (
stn_rec).zon;
351 #line 92 "get_data.ec"
352 _sqobind[15].sqldata = (
stn_rec).ownag;
353 #line 92 "get_data.ec"
354 _sqobind[16].sqldata = (
stn_rec).ownloc;
355 #line 92 "get_data.ec"
356 _sqobind[17].sqldata = (
stn_rec).maintag;
357 #line 92 "get_data.ec"
358 _sqobind[18].sqldata = (
stn_rec).mainloc;
359 #line 92 "get_data.ec"
360 _sqobind[19].sqldata = (
char *) &(
stn_rec).post;
361 sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn2, 768), (ifx_sqlda_t *)0, &_SD0, (
char *)0, &_FS1);
362 #line 92 "get_data.ec"
375 printf(
"%s %s %s %s %s %s\n%s %s %s %s\n",
386 #line 112 "get_data.ec"
388 #line 112 "get_data.ec"
389 sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION,
_Cn5, 768));
390 #line 112 "get_data.ec"
401 #line 120 "get_data.ec"
get_data(char month[4], FILE *fp, FILE *fq, int year, char id[9], int numpe, int s_day, int e_day, int divide[10], int conver[10])
struct sqlca_s ifx_sqlca_t
printf("fbuf is %s\n", fbuf)
struct sqlca_s::sqlcaw_s sqlwarn