8 #line 1 "build_list.ec"
13 #line 2 "build_list.ec"
14 #line 2 "build_list.ec"
15 #line 1 "/opt/informix/incl/esql/sqlca.h"
101 extern long * ifx_sqlcode();
102 extern struct sqlca_s * ifx_sqlca();
105 #define SQLCODE (*(ifx_sqlcode()))
106 #define SQLSTATE ((char *)(ifx_sqlstate()))
107 #define sqlca (*(ifx_sqlca()))
110 #define SQLNOTFOUND 100
113 #line 97 "/opt/informix/incl/esql/sqlca.h"
114 #line 3 "build_list.ec"
119 #line 4 "build_list.ec"
121 #line 5 "build_list.ec"
146 #line 30 "build_list.ec"
149 void main(
int argc,
char **argv)
165 char dbuf[80],ts1[80];
167 char zbuf[1000],abuf[100];
169 int zdate[10],ztime[10];
171 char *add,file[50],*key;
175 extern int optind,opterr,optopt;
180 char *directory,fname[50];
186 int itemp,itemp1,itemp2,ival,len;
190 fp=fopen(
"junkfile",
"r");
192 fw=fopen(
"outfile",
"w");
197 #line 77 "build_list.ec"
199 #line 77 "build_list.ec"
200 _iqdbase(
"fastetc", 0);
201 #line 77 "build_list.ec"
231 #line 100 "build_list.ec"
233 #line 100 "build_list.ec"
234 static const char *sqlcmdtxt[] =
235 #line 100 "build_list.ec"
237 #line 100 "build_list.ec"
238 " select * from stn where id = ?",
241 #line 103 "build_list.ec"
242 static _SQCURSOR _SQ0 = {0};
243 static struct sqlvar_struct _sqibind[] =
245 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
246 #line 103 "build_list.ec"
248 static struct sqlvar_struct _sqobind[] =
250 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
251 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
252 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
253 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
254 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
255 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
256 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
257 { 102,
sizeof((
btn_rec).elev), 0, 0, 0, 0, 0, 0, 0 },
258 { 100, 3, 0, 0, 0, 0, 0, 0, 0 },
259 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
260 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
261 { 100, 5, 0, 0, 0, 0, 0, 0, 0 },
262 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
263 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
264 { 102,
sizeof((
btn_rec).post), 0, 0, 0, 0, 0, 0, 0 },
265 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
266 #line 103 "build_list.ec"
268 #line 103 "build_list.ec"
269 _sqibind[0].sqldata =
sbuf;
270 #line 103 "build_list.ec"
271 _sqobind[0].sqldata = (
btn_rec).
id;
272 #line 103 "build_list.ec"
273 _sqobind[1].sqldata = (
btn_rec).plat;
274 #line 103 "build_list.ec"
275 _sqobind[2].sqldata = (
btn_rec).des;
276 #line 103 "build_list.ec"
277 _sqobind[3].sqldata = (
btn_rec).det;
278 #line 103 "build_list.ec"
279 _sqobind[4].sqldata = (
btn_rec).init;
280 #line 103 "build_list.ec"
281 _sqobind[5].sqldata = (
btn_rec).lat;
282 #line 103 "build_list.ec"
283 _sqobind[6].sqldata = (
btn_rec).lng;
284 #line 103 "build_list.ec"
285 _sqobind[7].sqldata = (
char *) &(
btn_rec).elev;
286 #line 103 "build_list.ec"
287 _sqobind[8].sqldata = (
btn_rec).stat;
288 #line 103 "build_list.ec"
289 _sqobind[9].sqldata = (
btn_rec).huc;
290 #line 103 "build_list.ec"
291 _sqobind[10].sqldata = (
btn_rec).cou;
292 #line 103 "build_list.ec"
293 _sqobind[11].sqldata = (
btn_rec).zon;
294 #line 103 "build_list.ec"
295 _sqobind[12].sqldata = (
btn_rec).hsa;
296 #line 103 "build_list.ec"
297 _sqobind[13].sqldata = (
btn_rec).cwa;
298 #line 103 "build_list.ec"
299 _sqobind[14].sqldata = (
char *) &(
btn_rec).post;
300 #line 103 "build_list.ec"
301 _sqobind[15].sqldata = (
btn_rec).dbsource;
302 #line 103 "build_list.ec"
303 _iqslct(&_SQ0, (
char **) sqlcmdtxt, 1, _sqibind, 16, _sqobind, 0);
304 #line 103 "build_list.ec"
330 itemp1=ival-itemp*100;
332 flat=(float)itemp+(
float)itemp1/60;
337 else if(ival > 10000) {
341 itemp1=(ival-itemp*10000)/100;
343 itemp2=ival-itemp*10000-itemp1*100;
345 flat=(float)itemp+(
float)itemp1/60 + (float)itemp2/3600;
367 itemp1=ival-itemp*100;
369 flng=(float)itemp+(
float)itemp1/60;
374 else if(ival >=100000) {
378 itemp1=(ival-itemp*10000)/100;
380 itemp2=ival-itemp*10000-itemp1*100;
382 flng=(float)itemp+(
float)itemp1/60 + (float)itemp2/3600;
389 fprintf(fw,
"%s %5.2f %6.2f %4d. 01 CARD %s\n",
392 fprintf(fw,
"lasvegas/%s.PPH5RZZ\n",
sbuf);
404 #line 200 "build_list.ec"
void main(int argc, char **argv)
printf("pcp %d\n", pcp_in_use[103])
struct sqlca_s::sqlcaw_s sqlwarn