Daily_QC
tcandidate.c
Go to the documentation of this file.
1 #include <sqlhdr.h>
2 #include <sqliapi.h>
3 static const char *_Cn1 = "stncursor";
4 #line 1 "tcandidate.ec"
5 #include "prototypes_new.h"
6 /*
7  * EXEC SQL include sqlca.h;
8  */
9 #line 2 "tcandidate.ec"
10 
11 #line 2 "tcandidate.ec"
12 #line 1 "/opt/informix_cli/incl/esql/sqlca.h"
13 /***************************************************************************
14  *
15  * INFORMIX SOFTWARE, INC.
16  *
17  * PROPRIETARY DATA
18  *
19  * THIS DOCUMENT CONTAINS TRADE SECRET DATA WHICH IS THE PROPERTY OF
20  * INFORMIX SOFTWARE, INC. THIS DOCUMENT IS SUBMITTED TO RECIPIENT IN
21  * CONFIDENCE. INFORMATION CONTAINED HEREIN MAY NOT BE USED, COPIED OR
22  * DISCLOSED IN WHOLE OR IN PART EXCEPT AS PERMITTED BY WRITTEN AGREEMENT
23  * SIGNED BY AN OFFICER OF INFORMIX SOFTWARE, INC.
24  *
25  * THIS MATERIAL IS ALSO COPYRIGHTED AS AN UNPUBLISHED WORK UNDER
26  * SECTIONS 104 AND 408 OF TITLE 17 OF THE UNITED STATES CODE.
27  * UNAUTHORIZED USE, COPYING OR OTHER REPRODUCTION IS PROHIBITED BY LAW.
28  *
29  *
30  * Title: sqlca.h
31  * Sccsid: @(#)sqlca.h 9.4 1/18/93 11:09:48
32  * Description:
33  * SQL Control Area
34  *
35  ***************************************************************************
36  */
37 
38 #ifndef SQLCA_INCL
39 #define SQLCA_INCL
40 
41 #include "ifxtypes.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 typedef struct sqlca_s
48  {
49  int4 sqlcode;
50  char sqlerrm[72]; /* error message parameters */
51  char sqlerrp[8];
52  int4 sqlerrd[6];
53  /* 0 - estimated number of rows returned */
54  /* 1 - serial value after insert or ISAM error code */
55  /* 2 - number of rows processed */
56  /* 3 - estimated cost */
57  /* 4 - offset of the error into the SQL statement */
58  /* 5 - rowid after insert */
59 #ifdef _FGL_
60  char sqlawarn[8];
61 #else
62  struct sqlcaw_s
63  {
64  char sqlwarn0; /* = W if any of sqlwarn[1-7] = W */
65  char sqlwarn1; /* = W if any truncation occurred or
66  database has transactions or
67  no privileges revoked */
68  char sqlwarn2; /* = W if a null value returned or
69  ANSI database */
70  char sqlwarn3; /* = W if no. in select list != no. in into list or
71  turbo backend or no privileges granted */
72  char sqlwarn4; /* = W if no where clause on prepared update, delete or
73  incompatible float format */
74  char sqlwarn5; /* = W if non-ANSI statement */
75  char sqlwarn6; /* = W if server is in data replication secondary mode */
76  char sqlwarn7; /* = W if database locale is different from proc_locale
77  */
78  } sqlwarn;
79 #endif
81 
82 /* NOTE: 4gl assumes that the sqlwarn structure can be defined as
83  * sqlawarn -- an 8 character string, because single-char
84  * variables are not recognized in 4gl.
85  *
86  * If this structure should change, the code generated by 4gl compiler
87  * must also change
88  */
89 
90 #ifdef VMS
91 noshare
92 #endif /* VMS */
93 
94 #define SQLNOTFOUND 100
95 
96 #ifndef IFX_THREAD
97 extern struct sqlca_s sqlca;
98 
99 extern int4 SQLCODE;
100 
101 extern char SQLSTATE[];
102 #else /* IFX_THREAD */
103 extern int4 * ifx_sqlcode();
104 extern struct sqlca_s * ifx_sqlca();
105 #define SQLCODE (*(ifx_sqlcode()))
106 #define SQLSTATE ((char *)(ifx_sqlstate()))
107 #define sqlca (*(ifx_sqlca()))
108 #endif /* IFX_THREAD */
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* SQLCA_INCL */
115 
116 #line 103 "/opt/informix_cli/incl/esql/sqlca.h"
117 #line 3 "tcandidate.ec"
118 
119 /*
120  * EXEC SQL BEGIN DECLARE SECTION;
121  */
122 #line 4 "tcandidate.ec"
123 #line 5 "tcandidate.ec"
124 #line 6 "tcandidate.ec"
125  char t, s, pe1, pe2, dur;
126 #line 7 "tcandidate.ec"
127 struct etn_rec
128  {
129  char id[6];
130  char plat[9];
131  char des[51];
132  char det[41];
133  char init[9];
134  char lat[7];
135  char lng[8];
136  int elev;
137  char stat[3];
138  char huc[9];
139  char cou[4];
140  char zon[5];
141  char hsa[4];
142  char cwa[4];
143  int post;
144  char dbsource[4];
146 #line 28 "tcandidate.ec"
147 struct gage_info
148  {
149  char id[6];
150  char pe1[2];
151  char pe2[2];
152  char dur[2];
153  char t[2];
154  char s[2];
155  char e[2];
156  char p[2];
157  char mode[2];
158  } info;
159 #line 42 "tcandidate.ec"
160 struct pro_hrly_rec
161  {
162  char id[6];
163  char pe1[2];
164  char pe2[2];
165  char dur[2];
166  char t[2];
167  char s[2];
168  char e[2];
169  char p[2];
170  int cal_yr;
171  int mon;
172  int zday;
173  double zhr00;
174  double zhr01;
175  double zhr02;
176  double zhr03;
177  double zhr04;
178  double zhr05;
179  double zhr06;
180  double zhr07;
181  double zhr08;
182  double zhr09;
183  double zhr10;
184  double zhr11;
185  double zhr12;
186  double zhr13;
187  double zhr14;
188  double zhr15;
189  double zhr16;
190  double zhr17;
191  double zhr18;
192  double zhr19;
193  double zhr20;
194  double zhr21;
195  double zhr22;
196  double zhr23;
197  char qzhr00[2];
198  char qzhr01[2];
199  char qzhr02[2];
200  char qzhr03[2];
201  char qzhr04[2];
202  char qzhr05[2];
203  char qzhr06[2];
204  char qzhr07[2];
205  char qzhr08[2];
206  char qzhr09[2];
207  char qzhr10[2];
208  char qzhr11[2];
209  char qzhr12[2];
210  char qzhr13[2];
211  char qzhr14[2];
212  char qzhr15[2];
213  char qzhr16[2];
214  char qzhr17[2];
215  char qzhr18[2];
216  char qzhr19[2];
217  char qzhr20[2];
218  char qzhr21[2];
219  char qzhr22[2];
220  char qzhr23[2];
222 #line 106 "tcandidate.ec"
223 struct pro_dly_rec
224  {
225  char id[6];
226  char pe1[2];
227  char pe2[2];
228  char dur[2];
229  char t[2];
230  char s[2];
231  char e[2];
232  char p[2];
233  int cal_yr;
234  int mon;
235  double zday01;
236  double zday02;
237  double zday03;
238  double zday04;
239  double zday05;
240  double zday06;
241  double zday07;
242  double zday08;
243  double zday09;
244  double zday10;
245  double zday11;
246  double zday12;
247  double zday13;
248  double zday14;
249  double zday15;
250  double zday16;
251  double zday17;
252  double zday18;
253  double zday19;
254  double zday20;
255  double zday21;
256  double zday22;
257  double zday23;
258  double zday24;
259  double zday25;
260  double zday26;
261  double zday27;
262  double zday28;
263  double zday29;
264  double zday30;
265  double zday31;
266  char qzday01[2];
267  char qzday02[2];
268  char qzday03[2];
269  char qzday04[2];
270  char qzday05[2];
271  char qzday06[2];
272  char qzday07[2];
273  char qzday08[2];
274  char qzday09[2];
275  char qzday10[2];
276  char qzday11[2];
277  char qzday12[2];
278  char qzday13[2];
279  char qzday14[2];
280  char qzday15[2];
281  char qzday16[2];
282  char qzday17[2];
283  char qzday18[2];
284  char qzday19[2];
285  char qzday20[2];
286  char qzday21[2];
287  char qzday22[2];
288  char qzday23[2];
289  char qzday24[2];
290  char qzday25[2];
291  char qzday26[2];
292  char qzday27[2];
293  char qzday28[2];
294  char qzday29[2];
295  char qzday30[2];
296  char qzday31[2];
298 #line 182 "tcandidate.ec"
299 struct eens_rec
300  {
301  char id[6];
302  char pe1[2];
303  char pe2[2];
304  char dur[2];
305  char t[2];
306  char s[2];
307  char e[2];
308  char p[2];
309  char type[2];
310  char des[51];
311  char det[41];
312  int post;
313  char new_report[2];
314  char active[2];
315  char rfs[2];
316  int obstime;
317  char prod[10];
318  char prod2ary[10];
319  char obsag[7];
320  char obsloc[4];
321  char prov_avail[2];
322  char final_avail[8];
323  char ownag[7];
324  char ownloc[4];
325  char maintag[7];
326  char maintloc[4];
327  char init[9];
328  char dbsource[4];
330 /*
331  * EXEC SQL END DECLARE SECTION;
332  */
333 #line 216 "tcandidate.ec"
334 
335 
336 struct data_rec {
337  char id[9];
338  char source[9];
339  char pe1;
340  char pe2;
341  char dur;
342  char t;
343  char s;
344  char e;
345  char p;
346  int zdate;
347  int ztime;
348  int czdate;
349  int cztime;
350  int idur;
351  double codp;
352  char lwal;
353  int idote;
354  int irev;
355  double value;
356  double values[96];
357  char lwals[96];
358  char pedtsep[8];
360 int mday[]={31,28,31,30,31,30,31,31,30,31,30,31} ;
361 void main(int argc, char **argv)
362 
363 {
364 struct stn_values *dtn_values;
365 struct stn_values *qtn_values;
366 time_t tim,tim1;
367 struct tm *gmtim;
368 struct tm *ltim;
369 int i,j,h;
370 struct stim btim;
371 struct stim etim;
372 struct stim btim1;
373 struct stim etim1;
374 struct stim etim2;
375 char oldstat[10];
376 char *s[5];
377 FILE *fp;
378 char pc[10];
379 char qual[10];
380 int k;
381 char mbuf[100];
382 char dbuf[80],ts1[80];
383 char ozon[20];
384 char zbuf[1000],abuf[100];
385 char name[60];
386 int zdate[10],ztime[10];
387 int bflag;
388 char *add,file[50],*key;
389 int maxdays;
390 time_t itime[20];
391 int qtotal,dtotal;
392 extern int optind,opterr,optopt;
393 extern char *optarg;
394 int c;
395 char *p,*q;
396 int month,day,year,hour,idflag;
397 char *directory,fname[50];
398 int fflag;
399 time_t tim2;
400 int qual_flag;
401 char qbuf[10];
402 double flng,flat;
403 int itemp,itemp1,itemp2,ival,len;
404 int l,ii;
405 int tip;
406 
407 t='1';
408 fp=fopen("junkfile","w");
409 
410 qbuf[1]=0;
411 
412 strcpy(qual,"SAVFZ");
413 qual_flag=0;
414 maxdays=100;
415 
416 while((c=getopt(argc,argv,"d:h:n:f:q:v"))!=-1){
417 
418  switch(c) {
419 
420  case 'f':
421 
422  strcpy(fname,optarg);
423  fflag=1;
424  break;
425 
426 
427  default:
428 
429  exit(1);
430 
431  }
432 
433  }
434 
436 
437 dtn_values=calloc(1000,sizeof(struct stn_values));
438 qtn_values=calloc(1000,sizeof(struct stn_values));
439 
440 
441 tim=time(NULL);
442 gmtim=gmtime(&tim);
443 btim.year=gmtim->tm_year+1900;
444 btim.month=gmtim->tm_mon+1;
445 btim.day=gmtim->tm_mday;
446 btim.hour=gmtim->tm_hour;
447 btim.minute=0;
448 
449 tim1=tim-(maxdays-1)*86400L;
450 gmtim=gmtime(&tim1);
451 
452 etim.year=gmtim->tm_year+1900;
453 etim.month=gmtim->tm_mon+1;
454 etim.day=gmtim->tm_mday;
455 etim.hour=12;
456 etim.minute=0;
457 
458 tim1=tim-maxdays*86400L;
459 gmtim=gmtime(&tim1);
460 
461 etim2.year=gmtim->tm_year+1900;
462 etim2.month=gmtim->tm_mon+1;
463 etim2.day=gmtim->tm_mday;
464 etim2.hour=12;
465 etim2.minute=0;
466 
467 /*
468  * EXEC SQL open stncursor;
469  */
470 #line 349 "tcandidate.ec"
471  {
472 #line 349 "tcandidate.ec"
473 #line 349 "tcandidate.ec"
474  sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, (char *) _Cn1, 768), (ifx_sqlda_t *) 0, (char *) 0, (struct value *) 0, 0, 0);
475 #line 349 "tcandidate.ec"
476  }
477 
478 if(sqlca.sqlcode < 0){
479 
480  printf("informix error %d\n",sqlca.sqlcode);
481  exit(1);
482 
483  }
484 
485 for(i=0;i<5000;i++) {
486 
487  mbuf[0]=0;
488  tip=0;
489 
490  bflag=0;
491 /*
492  * EXEC SQL fetch stncursor into :btn_rec;
493  */
494 #line 364 "tcandidate.ec"
495  {
496 #line 364 "tcandidate.ec"
497  static ifx_sqlvar_t _sqobind[] =
498  {
499  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
500  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
501  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
502  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
503  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
504  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
505  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
506  { 102, sizeof((btn_rec).elev), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
507  { 100, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
508  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
509  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
510  { 100, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
511  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
512  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
513  { 102, sizeof((btn_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
514  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
515 #line 364 "tcandidate.ec"
516  };
517  static ifx_sqlda_t _SD0 = { 16, _sqobind, {0}, 16, 0 };
518  static _FetchSpec _FS1 = { 0, 1, 0 };
519 #line 364 "tcandidate.ec"
520  _sqobind[0].sqldata = (btn_rec).id;
521 #line 364 "tcandidate.ec"
522  _sqobind[1].sqldata = (btn_rec).plat;
523 #line 364 "tcandidate.ec"
524  _sqobind[2].sqldata = (btn_rec).des;
525 #line 364 "tcandidate.ec"
526  _sqobind[3].sqldata = (btn_rec).det;
527 #line 364 "tcandidate.ec"
528  _sqobind[4].sqldata = (btn_rec).init;
529 #line 364 "tcandidate.ec"
530  _sqobind[5].sqldata = (btn_rec).lat;
531 #line 364 "tcandidate.ec"
532  _sqobind[6].sqldata = (btn_rec).lng;
533 #line 364 "tcandidate.ec"
534  _sqobind[7].sqldata = (char *) &(btn_rec).elev;
535 #line 364 "tcandidate.ec"
536  _sqobind[8].sqldata = (btn_rec).stat;
537 #line 364 "tcandidate.ec"
538  _sqobind[9].sqldata = (btn_rec).huc;
539 #line 364 "tcandidate.ec"
540  _sqobind[10].sqldata = (btn_rec).cou;
541 #line 364 "tcandidate.ec"
542  _sqobind[11].sqldata = (btn_rec).zon;
543 #line 364 "tcandidate.ec"
544  _sqobind[12].sqldata = (btn_rec).hsa;
545 #line 364 "tcandidate.ec"
546  _sqobind[13].sqldata = (btn_rec).cwa;
547 #line 364 "tcandidate.ec"
548  _sqobind[14].sqldata = (char *) &(btn_rec).post;
549 #line 364 "tcandidate.ec"
550  _sqobind[15].sqldata = (btn_rec).dbsource;
551 #line 364 "tcandidate.ec"
552  sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, (char *) _Cn1, 768), (ifx_sqlda_t *) 0, &_SD0, (char *) 0, &_FS1);
553 #line 364 "tcandidate.ec"
554  }
555 
556  if(sqlca.sqlcode < 0){
557 
558  printf("informix error %d\n",sqlca.sqlcode);
559  exit(1);
560 
561  }
562 
563  if(sqlca.sqlcode != 0)
564  break;
565 
566  for(l=0;l<10;l++) {
567 
568  if(l==0) {
569 
570 /*
571  * EXEC SQL select *
572  * into :bens_rec
573  * from sens
574  * where id=:btn_rec.id and
575  * pe1='T' and
576  * pe2='A' and
577  * dur='D' and
578  * t=:t and
579  * s='P' and
580  * e='X' and
581  * p='Z';
582  */
583 #line 380 "tcandidate.ec"
584  {
585 #line 390 "tcandidate.ec"
586  static const char *sqlcmdtxt[] =
587 #line 390 "tcandidate.ec"
588  {
589 #line 390 "tcandidate.ec"
590  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'D' and t = ? and s = 'P' and e = 'X' and p = 'Z'",
591  0
592  };
593 #line 390 "tcandidate.ec"
594 static ifx_cursor_t _SQ0 = {0};
595  static ifx_sqlvar_t _sqibind[] =
596  {
597  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
598  { 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
599 #line 390 "tcandidate.ec"
600  };
601  static ifx_sqlvar_t _sqobind[] =
602  {
603  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
604  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
605  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
606  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
607  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
608  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
609  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
610  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
611  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
612  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
613  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
614  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
615  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
616  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
617  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
618  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
619  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
620  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
621  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
622  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
623  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
624  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
625  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
626  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
627  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
628  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
629  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
630  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
631 #line 390 "tcandidate.ec"
632  };
633 #line 390 "tcandidate.ec"
634  _sqibind[0].sqldata = btn_rec.id;
635 #line 390 "tcandidate.ec"
636  _sqibind[1].sqldata = &t;
637 #line 390 "tcandidate.ec"
638  _sqobind[0].sqldata = (bens_rec).id;
639 #line 390 "tcandidate.ec"
640  _sqobind[1].sqldata = (bens_rec).pe1;
641 #line 390 "tcandidate.ec"
642  _sqobind[2].sqldata = (bens_rec).pe2;
643 #line 390 "tcandidate.ec"
644  _sqobind[3].sqldata = (bens_rec).dur;
645 #line 390 "tcandidate.ec"
646  _sqobind[4].sqldata = (bens_rec).t;
647 #line 390 "tcandidate.ec"
648  _sqobind[5].sqldata = (bens_rec).s;
649 #line 390 "tcandidate.ec"
650  _sqobind[6].sqldata = (bens_rec).e;
651 #line 390 "tcandidate.ec"
652  _sqobind[7].sqldata = (bens_rec).p;
653 #line 390 "tcandidate.ec"
654  _sqobind[8].sqldata = (bens_rec).type;
655 #line 390 "tcandidate.ec"
656  _sqobind[9].sqldata = (bens_rec).des;
657 #line 390 "tcandidate.ec"
658  _sqobind[10].sqldata = (bens_rec).det;
659 #line 390 "tcandidate.ec"
660  _sqobind[11].sqldata = (char *) &(bens_rec).post;
661 #line 390 "tcandidate.ec"
662  _sqobind[12].sqldata = (bens_rec).new_report;
663 #line 390 "tcandidate.ec"
664  _sqobind[13].sqldata = (bens_rec).active;
665 #line 390 "tcandidate.ec"
666  _sqobind[14].sqldata = (bens_rec).rfs;
667 #line 390 "tcandidate.ec"
668  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
669 #line 390 "tcandidate.ec"
670  _sqobind[16].sqldata = (bens_rec).prod;
671 #line 390 "tcandidate.ec"
672  _sqobind[17].sqldata = (bens_rec).prod2ary;
673 #line 390 "tcandidate.ec"
674  _sqobind[18].sqldata = (bens_rec).obsag;
675 #line 390 "tcandidate.ec"
676  _sqobind[19].sqldata = (bens_rec).obsloc;
677 #line 390 "tcandidate.ec"
678  _sqobind[20].sqldata = (bens_rec).prov_avail;
679 #line 390 "tcandidate.ec"
680  _sqobind[21].sqldata = (bens_rec).final_avail;
681 #line 390 "tcandidate.ec"
682  _sqobind[22].sqldata = (bens_rec).ownag;
683 #line 390 "tcandidate.ec"
684  _sqobind[23].sqldata = (bens_rec).ownloc;
685 #line 390 "tcandidate.ec"
686  _sqobind[24].sqldata = (bens_rec).maintag;
687 #line 390 "tcandidate.ec"
688  _sqobind[25].sqldata = (bens_rec).maintloc;
689 #line 390 "tcandidate.ec"
690  _sqobind[26].sqldata = (bens_rec).init;
691 #line 390 "tcandidate.ec"
692  _sqobind[27].sqldata = (bens_rec).dbsource;
693 #line 390 "tcandidate.ec"
694  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,2,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
695 #line 390 "tcandidate.ec"
696  }
697 
698  }
699 
700 
701  else if(l==1) {
702 
703 /*
704  * EXEC SQL select *
705  * into :bens_rec
706  * from sens
707  * where id=:btn_rec.id and
708  * pe1='T' and
709  * pe2='A' and
710  * dur='D' and
711  * t=:t and
712  * s='G' and
713  * e='X' and
714  * p='Z';
715  */
716 #line 397 "tcandidate.ec"
717  {
718 #line 407 "tcandidate.ec"
719  static const char *sqlcmdtxt[] =
720 #line 407 "tcandidate.ec"
721  {
722 #line 407 "tcandidate.ec"
723  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'D' and t = ? and s = 'G' and e = 'X' and p = 'Z'",
724  0
725  };
726 #line 407 "tcandidate.ec"
727 static ifx_cursor_t _SQ0 = {0};
728  static ifx_sqlvar_t _sqibind[] =
729  {
730  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
731  { 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
732 #line 407 "tcandidate.ec"
733  };
734  static ifx_sqlvar_t _sqobind[] =
735  {
736  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
737  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
738  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
739  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
740  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
741  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
742  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
743  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
744  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
745  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
746  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
747  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
748  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
749  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
750  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
751  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
752  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
753  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
754  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
755  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
756  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
757  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
758  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
759  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
760  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
761  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
762  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
763  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
764 #line 407 "tcandidate.ec"
765  };
766 #line 407 "tcandidate.ec"
767  _sqibind[0].sqldata = btn_rec.id;
768 #line 407 "tcandidate.ec"
769  _sqibind[1].sqldata = &t;
770 #line 407 "tcandidate.ec"
771  _sqobind[0].sqldata = (bens_rec).id;
772 #line 407 "tcandidate.ec"
773  _sqobind[1].sqldata = (bens_rec).pe1;
774 #line 407 "tcandidate.ec"
775  _sqobind[2].sqldata = (bens_rec).pe2;
776 #line 407 "tcandidate.ec"
777  _sqobind[3].sqldata = (bens_rec).dur;
778 #line 407 "tcandidate.ec"
779  _sqobind[4].sqldata = (bens_rec).t;
780 #line 407 "tcandidate.ec"
781  _sqobind[5].sqldata = (bens_rec).s;
782 #line 407 "tcandidate.ec"
783  _sqobind[6].sqldata = (bens_rec).e;
784 #line 407 "tcandidate.ec"
785  _sqobind[7].sqldata = (bens_rec).p;
786 #line 407 "tcandidate.ec"
787  _sqobind[8].sqldata = (bens_rec).type;
788 #line 407 "tcandidate.ec"
789  _sqobind[9].sqldata = (bens_rec).des;
790 #line 407 "tcandidate.ec"
791  _sqobind[10].sqldata = (bens_rec).det;
792 #line 407 "tcandidate.ec"
793  _sqobind[11].sqldata = (char *) &(bens_rec).post;
794 #line 407 "tcandidate.ec"
795  _sqobind[12].sqldata = (bens_rec).new_report;
796 #line 407 "tcandidate.ec"
797  _sqobind[13].sqldata = (bens_rec).active;
798 #line 407 "tcandidate.ec"
799  _sqobind[14].sqldata = (bens_rec).rfs;
800 #line 407 "tcandidate.ec"
801  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
802 #line 407 "tcandidate.ec"
803  _sqobind[16].sqldata = (bens_rec).prod;
804 #line 407 "tcandidate.ec"
805  _sqobind[17].sqldata = (bens_rec).prod2ary;
806 #line 407 "tcandidate.ec"
807  _sqobind[18].sqldata = (bens_rec).obsag;
808 #line 407 "tcandidate.ec"
809  _sqobind[19].sqldata = (bens_rec).obsloc;
810 #line 407 "tcandidate.ec"
811  _sqobind[20].sqldata = (bens_rec).prov_avail;
812 #line 407 "tcandidate.ec"
813  _sqobind[21].sqldata = (bens_rec).final_avail;
814 #line 407 "tcandidate.ec"
815  _sqobind[22].sqldata = (bens_rec).ownag;
816 #line 407 "tcandidate.ec"
817  _sqobind[23].sqldata = (bens_rec).ownloc;
818 #line 407 "tcandidate.ec"
819  _sqobind[24].sqldata = (bens_rec).maintag;
820 #line 407 "tcandidate.ec"
821  _sqobind[25].sqldata = (bens_rec).maintloc;
822 #line 407 "tcandidate.ec"
823  _sqobind[26].sqldata = (bens_rec).init;
824 #line 407 "tcandidate.ec"
825  _sqobind[27].sqldata = (bens_rec).dbsource;
826 #line 407 "tcandidate.ec"
827  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,2,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
828 #line 407 "tcandidate.ec"
829  }
830 
831  }
832 
833 
834  else if(l==2) {
835 
836 /*
837  * EXEC SQL select *
838  * into :bens_rec
839  * from sens
840  * where id=:btn_rec.id and
841  * pe1='T' and
842  * pe2='A' and
843  * dur='D' and
844  * t=:t and
845  * s='M' and
846  * e='X' and
847  * p='Z';
848  */
849 #line 414 "tcandidate.ec"
850  {
851 #line 424 "tcandidate.ec"
852  static const char *sqlcmdtxt[] =
853 #line 424 "tcandidate.ec"
854  {
855 #line 424 "tcandidate.ec"
856  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'D' and t = ? and s = 'M' and e = 'X' and p = 'Z'",
857  0
858  };
859 #line 424 "tcandidate.ec"
860 static ifx_cursor_t _SQ0 = {0};
861  static ifx_sqlvar_t _sqibind[] =
862  {
863  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
864  { 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
865 #line 424 "tcandidate.ec"
866  };
867  static ifx_sqlvar_t _sqobind[] =
868  {
869  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
870  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
871  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
872  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
873  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
874  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
875  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
876  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
877  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
878  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
879  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
880  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
881  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
882  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
883  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
884  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
885  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
886  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
887  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
888  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
889  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
890  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
891  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
892  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
893  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
894  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
895  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
896  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
897 #line 424 "tcandidate.ec"
898  };
899 #line 424 "tcandidate.ec"
900  _sqibind[0].sqldata = btn_rec.id;
901 #line 424 "tcandidate.ec"
902  _sqibind[1].sqldata = &t;
903 #line 424 "tcandidate.ec"
904  _sqobind[0].sqldata = (bens_rec).id;
905 #line 424 "tcandidate.ec"
906  _sqobind[1].sqldata = (bens_rec).pe1;
907 #line 424 "tcandidate.ec"
908  _sqobind[2].sqldata = (bens_rec).pe2;
909 #line 424 "tcandidate.ec"
910  _sqobind[3].sqldata = (bens_rec).dur;
911 #line 424 "tcandidate.ec"
912  _sqobind[4].sqldata = (bens_rec).t;
913 #line 424 "tcandidate.ec"
914  _sqobind[5].sqldata = (bens_rec).s;
915 #line 424 "tcandidate.ec"
916  _sqobind[6].sqldata = (bens_rec).e;
917 #line 424 "tcandidate.ec"
918  _sqobind[7].sqldata = (bens_rec).p;
919 #line 424 "tcandidate.ec"
920  _sqobind[8].sqldata = (bens_rec).type;
921 #line 424 "tcandidate.ec"
922  _sqobind[9].sqldata = (bens_rec).des;
923 #line 424 "tcandidate.ec"
924  _sqobind[10].sqldata = (bens_rec).det;
925 #line 424 "tcandidate.ec"
926  _sqobind[11].sqldata = (char *) &(bens_rec).post;
927 #line 424 "tcandidate.ec"
928  _sqobind[12].sqldata = (bens_rec).new_report;
929 #line 424 "tcandidate.ec"
930  _sqobind[13].sqldata = (bens_rec).active;
931 #line 424 "tcandidate.ec"
932  _sqobind[14].sqldata = (bens_rec).rfs;
933 #line 424 "tcandidate.ec"
934  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
935 #line 424 "tcandidate.ec"
936  _sqobind[16].sqldata = (bens_rec).prod;
937 #line 424 "tcandidate.ec"
938  _sqobind[17].sqldata = (bens_rec).prod2ary;
939 #line 424 "tcandidate.ec"
940  _sqobind[18].sqldata = (bens_rec).obsag;
941 #line 424 "tcandidate.ec"
942  _sqobind[19].sqldata = (bens_rec).obsloc;
943 #line 424 "tcandidate.ec"
944  _sqobind[20].sqldata = (bens_rec).prov_avail;
945 #line 424 "tcandidate.ec"
946  _sqobind[21].sqldata = (bens_rec).final_avail;
947 #line 424 "tcandidate.ec"
948  _sqobind[22].sqldata = (bens_rec).ownag;
949 #line 424 "tcandidate.ec"
950  _sqobind[23].sqldata = (bens_rec).ownloc;
951 #line 424 "tcandidate.ec"
952  _sqobind[24].sqldata = (bens_rec).maintag;
953 #line 424 "tcandidate.ec"
954  _sqobind[25].sqldata = (bens_rec).maintloc;
955 #line 424 "tcandidate.ec"
956  _sqobind[26].sqldata = (bens_rec).init;
957 #line 424 "tcandidate.ec"
958  _sqobind[27].sqldata = (bens_rec).dbsource;
959 #line 424 "tcandidate.ec"
960  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,2,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
961 #line 424 "tcandidate.ec"
962  }
963 
964  }
965 
966  else if(l==3) {
967 
968 /*
969  * EXEC SQL select *
970  * into :bens_rec
971  * from sens
972  * where id=:btn_rec.id and
973  * pe1='T' and
974  * pe2='A' and
975  * dur='D' and
976  * t=:t and
977  * s='Z' and
978  * e='X' and
979  * p='Z';
980  */
981 #line 430 "tcandidate.ec"
982  {
983 #line 440 "tcandidate.ec"
984  static const char *sqlcmdtxt[] =
985 #line 440 "tcandidate.ec"
986  {
987 #line 440 "tcandidate.ec"
988  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'D' and t = ? and s = 'Z' and e = 'X' and p = 'Z'",
989  0
990  };
991 #line 440 "tcandidate.ec"
992 static ifx_cursor_t _SQ0 = {0};
993  static ifx_sqlvar_t _sqibind[] =
994  {
995  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
996  { 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
997 #line 440 "tcandidate.ec"
998  };
999  static ifx_sqlvar_t _sqobind[] =
1000  {
1001  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1002  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1003  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1004  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1005  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1006  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1007  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1008  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1009  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1010  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1011  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1012  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1013  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1014  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1015  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1016  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1017  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1018  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1019  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1020  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1021  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1022  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1023  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1024  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1025  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1026  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1027  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1028  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1029 #line 440 "tcandidate.ec"
1030  };
1031 #line 440 "tcandidate.ec"
1032  _sqibind[0].sqldata = btn_rec.id;
1033 #line 440 "tcandidate.ec"
1034  _sqibind[1].sqldata = &t;
1035 #line 440 "tcandidate.ec"
1036  _sqobind[0].sqldata = (bens_rec).id;
1037 #line 440 "tcandidate.ec"
1038  _sqobind[1].sqldata = (bens_rec).pe1;
1039 #line 440 "tcandidate.ec"
1040  _sqobind[2].sqldata = (bens_rec).pe2;
1041 #line 440 "tcandidate.ec"
1042  _sqobind[3].sqldata = (bens_rec).dur;
1043 #line 440 "tcandidate.ec"
1044  _sqobind[4].sqldata = (bens_rec).t;
1045 #line 440 "tcandidate.ec"
1046  _sqobind[5].sqldata = (bens_rec).s;
1047 #line 440 "tcandidate.ec"
1048  _sqobind[6].sqldata = (bens_rec).e;
1049 #line 440 "tcandidate.ec"
1050  _sqobind[7].sqldata = (bens_rec).p;
1051 #line 440 "tcandidate.ec"
1052  _sqobind[8].sqldata = (bens_rec).type;
1053 #line 440 "tcandidate.ec"
1054  _sqobind[9].sqldata = (bens_rec).des;
1055 #line 440 "tcandidate.ec"
1056  _sqobind[10].sqldata = (bens_rec).det;
1057 #line 440 "tcandidate.ec"
1058  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1059 #line 440 "tcandidate.ec"
1060  _sqobind[12].sqldata = (bens_rec).new_report;
1061 #line 440 "tcandidate.ec"
1062  _sqobind[13].sqldata = (bens_rec).active;
1063 #line 440 "tcandidate.ec"
1064  _sqobind[14].sqldata = (bens_rec).rfs;
1065 #line 440 "tcandidate.ec"
1066  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1067 #line 440 "tcandidate.ec"
1068  _sqobind[16].sqldata = (bens_rec).prod;
1069 #line 440 "tcandidate.ec"
1070  _sqobind[17].sqldata = (bens_rec).prod2ary;
1071 #line 440 "tcandidate.ec"
1072  _sqobind[18].sqldata = (bens_rec).obsag;
1073 #line 440 "tcandidate.ec"
1074  _sqobind[19].sqldata = (bens_rec).obsloc;
1075 #line 440 "tcandidate.ec"
1076  _sqobind[20].sqldata = (bens_rec).prov_avail;
1077 #line 440 "tcandidate.ec"
1078  _sqobind[21].sqldata = (bens_rec).final_avail;
1079 #line 440 "tcandidate.ec"
1080  _sqobind[22].sqldata = (bens_rec).ownag;
1081 #line 440 "tcandidate.ec"
1082  _sqobind[23].sqldata = (bens_rec).ownloc;
1083 #line 440 "tcandidate.ec"
1084  _sqobind[24].sqldata = (bens_rec).maintag;
1085 #line 440 "tcandidate.ec"
1086  _sqobind[25].sqldata = (bens_rec).maintloc;
1087 #line 440 "tcandidate.ec"
1088  _sqobind[26].sqldata = (bens_rec).init;
1089 #line 440 "tcandidate.ec"
1090  _sqobind[27].sqldata = (bens_rec).dbsource;
1091 #line 440 "tcandidate.ec"
1092  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,2,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1093 #line 440 "tcandidate.ec"
1094  }
1095 
1096  }
1097 
1098  else if(l==4) {
1099 
1100 /*
1101  * EXEC SQL select *
1102  * into :bens_rec
1103  * from sens
1104  * where id=:btn_rec.id and
1105  * pe1='T' and
1106  * pe2='A' and
1107  * dur='D' and
1108  * t=:t and
1109  * s='R' and
1110  * e='X' and
1111  * p='Z';
1112  */
1113 #line 446 "tcandidate.ec"
1114  {
1115 #line 456 "tcandidate.ec"
1116  static const char *sqlcmdtxt[] =
1117 #line 456 "tcandidate.ec"
1118  {
1119 #line 456 "tcandidate.ec"
1120  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'D' and t = ? and s = 'R' and e = 'X' and p = 'Z'",
1121  0
1122  };
1123 #line 456 "tcandidate.ec"
1124 static ifx_cursor_t _SQ0 = {0};
1125  static ifx_sqlvar_t _sqibind[] =
1126  {
1127  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1128  { 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1129 #line 456 "tcandidate.ec"
1130  };
1131  static ifx_sqlvar_t _sqobind[] =
1132  {
1133  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1134  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1135  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1136  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1137  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1138  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1139  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1140  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1141  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1142  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1143  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1144  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1145  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1146  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1147  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1148  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1149  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1150  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1151  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1152  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1153  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1154  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1155  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1156  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1157  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1158  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1159  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1160  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1161 #line 456 "tcandidate.ec"
1162  };
1163 #line 456 "tcandidate.ec"
1164  _sqibind[0].sqldata = btn_rec.id;
1165 #line 456 "tcandidate.ec"
1166  _sqibind[1].sqldata = &t;
1167 #line 456 "tcandidate.ec"
1168  _sqobind[0].sqldata = (bens_rec).id;
1169 #line 456 "tcandidate.ec"
1170  _sqobind[1].sqldata = (bens_rec).pe1;
1171 #line 456 "tcandidate.ec"
1172  _sqobind[2].sqldata = (bens_rec).pe2;
1173 #line 456 "tcandidate.ec"
1174  _sqobind[3].sqldata = (bens_rec).dur;
1175 #line 456 "tcandidate.ec"
1176  _sqobind[4].sqldata = (bens_rec).t;
1177 #line 456 "tcandidate.ec"
1178  _sqobind[5].sqldata = (bens_rec).s;
1179 #line 456 "tcandidate.ec"
1180  _sqobind[6].sqldata = (bens_rec).e;
1181 #line 456 "tcandidate.ec"
1182  _sqobind[7].sqldata = (bens_rec).p;
1183 #line 456 "tcandidate.ec"
1184  _sqobind[8].sqldata = (bens_rec).type;
1185 #line 456 "tcandidate.ec"
1186  _sqobind[9].sqldata = (bens_rec).des;
1187 #line 456 "tcandidate.ec"
1188  _sqobind[10].sqldata = (bens_rec).det;
1189 #line 456 "tcandidate.ec"
1190  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1191 #line 456 "tcandidate.ec"
1192  _sqobind[12].sqldata = (bens_rec).new_report;
1193 #line 456 "tcandidate.ec"
1194  _sqobind[13].sqldata = (bens_rec).active;
1195 #line 456 "tcandidate.ec"
1196  _sqobind[14].sqldata = (bens_rec).rfs;
1197 #line 456 "tcandidate.ec"
1198  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1199 #line 456 "tcandidate.ec"
1200  _sqobind[16].sqldata = (bens_rec).prod;
1201 #line 456 "tcandidate.ec"
1202  _sqobind[17].sqldata = (bens_rec).prod2ary;
1203 #line 456 "tcandidate.ec"
1204  _sqobind[18].sqldata = (bens_rec).obsag;
1205 #line 456 "tcandidate.ec"
1206  _sqobind[19].sqldata = (bens_rec).obsloc;
1207 #line 456 "tcandidate.ec"
1208  _sqobind[20].sqldata = (bens_rec).prov_avail;
1209 #line 456 "tcandidate.ec"
1210  _sqobind[21].sqldata = (bens_rec).final_avail;
1211 #line 456 "tcandidate.ec"
1212  _sqobind[22].sqldata = (bens_rec).ownag;
1213 #line 456 "tcandidate.ec"
1214  _sqobind[23].sqldata = (bens_rec).ownloc;
1215 #line 456 "tcandidate.ec"
1216  _sqobind[24].sqldata = (bens_rec).maintag;
1217 #line 456 "tcandidate.ec"
1218  _sqobind[25].sqldata = (bens_rec).maintloc;
1219 #line 456 "tcandidate.ec"
1220  _sqobind[26].sqldata = (bens_rec).init;
1221 #line 456 "tcandidate.ec"
1222  _sqobind[27].sqldata = (bens_rec).dbsource;
1223 #line 456 "tcandidate.ec"
1224  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,2,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1225 #line 456 "tcandidate.ec"
1226  }
1227 
1228  }
1229 
1230  else if(l==5) {
1231 
1232 /*
1233  * EXEC SQL select *
1234  * into :bens_rec
1235  * from sens
1236  * where id=:btn_rec.id and
1237  * pe1='T' and
1238  * pe2='A' and
1239  * dur='I' and
1240  * t='F' and
1241  * s='P' and
1242  * e='X' and
1243  * p='Z';
1244  */
1245 #line 462 "tcandidate.ec"
1246  {
1247 #line 472 "tcandidate.ec"
1248  static const char *sqlcmdtxt[] =
1249 #line 472 "tcandidate.ec"
1250  {
1251 #line 472 "tcandidate.ec"
1252  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'I' and t = 'F' and s = 'P' and e = 'X' and p = 'Z'",
1253  0
1254  };
1255 #line 472 "tcandidate.ec"
1256 static ifx_cursor_t _SQ0 = {0};
1257  static ifx_sqlvar_t _sqibind[] =
1258  {
1259  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1260 #line 472 "tcandidate.ec"
1261  };
1262  static ifx_sqlvar_t _sqobind[] =
1263  {
1264  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1265  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1266  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1267  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1268  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1269  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1270  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1271  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1272  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1273  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1274  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1275  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1276  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1277  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1278  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1279  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1280  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1281  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1282  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1283  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1284  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1285  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1286  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1287  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1288  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1289  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1290  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1291  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1292 #line 472 "tcandidate.ec"
1293  };
1294 #line 472 "tcandidate.ec"
1295  _sqibind[0].sqldata = btn_rec.id;
1296 #line 472 "tcandidate.ec"
1297  _sqobind[0].sqldata = (bens_rec).id;
1298 #line 472 "tcandidate.ec"
1299  _sqobind[1].sqldata = (bens_rec).pe1;
1300 #line 472 "tcandidate.ec"
1301  _sqobind[2].sqldata = (bens_rec).pe2;
1302 #line 472 "tcandidate.ec"
1303  _sqobind[3].sqldata = (bens_rec).dur;
1304 #line 472 "tcandidate.ec"
1305  _sqobind[4].sqldata = (bens_rec).t;
1306 #line 472 "tcandidate.ec"
1307  _sqobind[5].sqldata = (bens_rec).s;
1308 #line 472 "tcandidate.ec"
1309  _sqobind[6].sqldata = (bens_rec).e;
1310 #line 472 "tcandidate.ec"
1311  _sqobind[7].sqldata = (bens_rec).p;
1312 #line 472 "tcandidate.ec"
1313  _sqobind[8].sqldata = (bens_rec).type;
1314 #line 472 "tcandidate.ec"
1315  _sqobind[9].sqldata = (bens_rec).des;
1316 #line 472 "tcandidate.ec"
1317  _sqobind[10].sqldata = (bens_rec).det;
1318 #line 472 "tcandidate.ec"
1319  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1320 #line 472 "tcandidate.ec"
1321  _sqobind[12].sqldata = (bens_rec).new_report;
1322 #line 472 "tcandidate.ec"
1323  _sqobind[13].sqldata = (bens_rec).active;
1324 #line 472 "tcandidate.ec"
1325  _sqobind[14].sqldata = (bens_rec).rfs;
1326 #line 472 "tcandidate.ec"
1327  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1328 #line 472 "tcandidate.ec"
1329  _sqobind[16].sqldata = (bens_rec).prod;
1330 #line 472 "tcandidate.ec"
1331  _sqobind[17].sqldata = (bens_rec).prod2ary;
1332 #line 472 "tcandidate.ec"
1333  _sqobind[18].sqldata = (bens_rec).obsag;
1334 #line 472 "tcandidate.ec"
1335  _sqobind[19].sqldata = (bens_rec).obsloc;
1336 #line 472 "tcandidate.ec"
1337  _sqobind[20].sqldata = (bens_rec).prov_avail;
1338 #line 472 "tcandidate.ec"
1339  _sqobind[21].sqldata = (bens_rec).final_avail;
1340 #line 472 "tcandidate.ec"
1341  _sqobind[22].sqldata = (bens_rec).ownag;
1342 #line 472 "tcandidate.ec"
1343  _sqobind[23].sqldata = (bens_rec).ownloc;
1344 #line 472 "tcandidate.ec"
1345  _sqobind[24].sqldata = (bens_rec).maintag;
1346 #line 472 "tcandidate.ec"
1347  _sqobind[25].sqldata = (bens_rec).maintloc;
1348 #line 472 "tcandidate.ec"
1349  _sqobind[26].sqldata = (bens_rec).init;
1350 #line 472 "tcandidate.ec"
1351  _sqobind[27].sqldata = (bens_rec).dbsource;
1352 #line 472 "tcandidate.ec"
1353  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,1,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1354 #line 472 "tcandidate.ec"
1355  }
1356 
1357  }
1358 
1359 
1360  else if(l==6) {
1361 
1362 /*
1363  * EXEC SQL select *
1364  * into :bens_rec
1365  * from sens
1366  * where id=:btn_rec.id and
1367  * pe1='T' and
1368  * pe2='A' and
1369  * dur='I' and
1370  * t='F' and
1371  * s='G' and
1372  * e='X' and
1373  * p='Z';
1374  */
1375 #line 479 "tcandidate.ec"
1376  {
1377 #line 489 "tcandidate.ec"
1378  static const char *sqlcmdtxt[] =
1379 #line 489 "tcandidate.ec"
1380  {
1381 #line 489 "tcandidate.ec"
1382  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'I' and t = 'F' and s = 'G' and e = 'X' and p = 'Z'",
1383  0
1384  };
1385 #line 489 "tcandidate.ec"
1386 static ifx_cursor_t _SQ0 = {0};
1387  static ifx_sqlvar_t _sqibind[] =
1388  {
1389  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1390 #line 489 "tcandidate.ec"
1391  };
1392  static ifx_sqlvar_t _sqobind[] =
1393  {
1394  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1395  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1396  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1397  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1398  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1399  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1400  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1401  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1402  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1403  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1404  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1405  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1406  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1407  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1408  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1409  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1410  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1411  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1412  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1413  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1414  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1415  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1416  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1417  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1418  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1419  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1420  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1421  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1422 #line 489 "tcandidate.ec"
1423  };
1424 #line 489 "tcandidate.ec"
1425  _sqibind[0].sqldata = btn_rec.id;
1426 #line 489 "tcandidate.ec"
1427  _sqobind[0].sqldata = (bens_rec).id;
1428 #line 489 "tcandidate.ec"
1429  _sqobind[1].sqldata = (bens_rec).pe1;
1430 #line 489 "tcandidate.ec"
1431  _sqobind[2].sqldata = (bens_rec).pe2;
1432 #line 489 "tcandidate.ec"
1433  _sqobind[3].sqldata = (bens_rec).dur;
1434 #line 489 "tcandidate.ec"
1435  _sqobind[4].sqldata = (bens_rec).t;
1436 #line 489 "tcandidate.ec"
1437  _sqobind[5].sqldata = (bens_rec).s;
1438 #line 489 "tcandidate.ec"
1439  _sqobind[6].sqldata = (bens_rec).e;
1440 #line 489 "tcandidate.ec"
1441  _sqobind[7].sqldata = (bens_rec).p;
1442 #line 489 "tcandidate.ec"
1443  _sqobind[8].sqldata = (bens_rec).type;
1444 #line 489 "tcandidate.ec"
1445  _sqobind[9].sqldata = (bens_rec).des;
1446 #line 489 "tcandidate.ec"
1447  _sqobind[10].sqldata = (bens_rec).det;
1448 #line 489 "tcandidate.ec"
1449  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1450 #line 489 "tcandidate.ec"
1451  _sqobind[12].sqldata = (bens_rec).new_report;
1452 #line 489 "tcandidate.ec"
1453  _sqobind[13].sqldata = (bens_rec).active;
1454 #line 489 "tcandidate.ec"
1455  _sqobind[14].sqldata = (bens_rec).rfs;
1456 #line 489 "tcandidate.ec"
1457  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1458 #line 489 "tcandidate.ec"
1459  _sqobind[16].sqldata = (bens_rec).prod;
1460 #line 489 "tcandidate.ec"
1461  _sqobind[17].sqldata = (bens_rec).prod2ary;
1462 #line 489 "tcandidate.ec"
1463  _sqobind[18].sqldata = (bens_rec).obsag;
1464 #line 489 "tcandidate.ec"
1465  _sqobind[19].sqldata = (bens_rec).obsloc;
1466 #line 489 "tcandidate.ec"
1467  _sqobind[20].sqldata = (bens_rec).prov_avail;
1468 #line 489 "tcandidate.ec"
1469  _sqobind[21].sqldata = (bens_rec).final_avail;
1470 #line 489 "tcandidate.ec"
1471  _sqobind[22].sqldata = (bens_rec).ownag;
1472 #line 489 "tcandidate.ec"
1473  _sqobind[23].sqldata = (bens_rec).ownloc;
1474 #line 489 "tcandidate.ec"
1475  _sqobind[24].sqldata = (bens_rec).maintag;
1476 #line 489 "tcandidate.ec"
1477  _sqobind[25].sqldata = (bens_rec).maintloc;
1478 #line 489 "tcandidate.ec"
1479  _sqobind[26].sqldata = (bens_rec).init;
1480 #line 489 "tcandidate.ec"
1481  _sqobind[27].sqldata = (bens_rec).dbsource;
1482 #line 489 "tcandidate.ec"
1483  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,1,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1484 #line 489 "tcandidate.ec"
1485  }
1486 
1487  }
1488 
1489 
1490  else if(l==7) {
1491 
1492 /*
1493  * EXEC SQL select *
1494  * into :bens_rec
1495  * from sens
1496  * where id=:btn_rec.id and
1497  * pe1='T' and
1498  * pe2='A' and
1499  * dur='I' and
1500  * t='F' and
1501  * s='M' and
1502  * e='X' and
1503  * p='Z';
1504  */
1505 #line 496 "tcandidate.ec"
1506  {
1507 #line 506 "tcandidate.ec"
1508  static const char *sqlcmdtxt[] =
1509 #line 506 "tcandidate.ec"
1510  {
1511 #line 506 "tcandidate.ec"
1512  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'I' and t = 'F' and s = 'M' and e = 'X' and p = 'Z'",
1513  0
1514  };
1515 #line 506 "tcandidate.ec"
1516 static ifx_cursor_t _SQ0 = {0};
1517  static ifx_sqlvar_t _sqibind[] =
1518  {
1519  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1520 #line 506 "tcandidate.ec"
1521  };
1522  static ifx_sqlvar_t _sqobind[] =
1523  {
1524  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1525  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1526  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1527  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1528  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1529  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1530  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1531  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1532  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1533  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1534  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1535  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1536  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1537  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1538  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1539  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1540  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1541  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1542  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1543  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1544  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1545  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1546  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1547  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1548  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1549  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1550  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1551  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1552 #line 506 "tcandidate.ec"
1553  };
1554 #line 506 "tcandidate.ec"
1555  _sqibind[0].sqldata = btn_rec.id;
1556 #line 506 "tcandidate.ec"
1557  _sqobind[0].sqldata = (bens_rec).id;
1558 #line 506 "tcandidate.ec"
1559  _sqobind[1].sqldata = (bens_rec).pe1;
1560 #line 506 "tcandidate.ec"
1561  _sqobind[2].sqldata = (bens_rec).pe2;
1562 #line 506 "tcandidate.ec"
1563  _sqobind[3].sqldata = (bens_rec).dur;
1564 #line 506 "tcandidate.ec"
1565  _sqobind[4].sqldata = (bens_rec).t;
1566 #line 506 "tcandidate.ec"
1567  _sqobind[5].sqldata = (bens_rec).s;
1568 #line 506 "tcandidate.ec"
1569  _sqobind[6].sqldata = (bens_rec).e;
1570 #line 506 "tcandidate.ec"
1571  _sqobind[7].sqldata = (bens_rec).p;
1572 #line 506 "tcandidate.ec"
1573  _sqobind[8].sqldata = (bens_rec).type;
1574 #line 506 "tcandidate.ec"
1575  _sqobind[9].sqldata = (bens_rec).des;
1576 #line 506 "tcandidate.ec"
1577  _sqobind[10].sqldata = (bens_rec).det;
1578 #line 506 "tcandidate.ec"
1579  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1580 #line 506 "tcandidate.ec"
1581  _sqobind[12].sqldata = (bens_rec).new_report;
1582 #line 506 "tcandidate.ec"
1583  _sqobind[13].sqldata = (bens_rec).active;
1584 #line 506 "tcandidate.ec"
1585  _sqobind[14].sqldata = (bens_rec).rfs;
1586 #line 506 "tcandidate.ec"
1587  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1588 #line 506 "tcandidate.ec"
1589  _sqobind[16].sqldata = (bens_rec).prod;
1590 #line 506 "tcandidate.ec"
1591  _sqobind[17].sqldata = (bens_rec).prod2ary;
1592 #line 506 "tcandidate.ec"
1593  _sqobind[18].sqldata = (bens_rec).obsag;
1594 #line 506 "tcandidate.ec"
1595  _sqobind[19].sqldata = (bens_rec).obsloc;
1596 #line 506 "tcandidate.ec"
1597  _sqobind[20].sqldata = (bens_rec).prov_avail;
1598 #line 506 "tcandidate.ec"
1599  _sqobind[21].sqldata = (bens_rec).final_avail;
1600 #line 506 "tcandidate.ec"
1601  _sqobind[22].sqldata = (bens_rec).ownag;
1602 #line 506 "tcandidate.ec"
1603  _sqobind[23].sqldata = (bens_rec).ownloc;
1604 #line 506 "tcandidate.ec"
1605  _sqobind[24].sqldata = (bens_rec).maintag;
1606 #line 506 "tcandidate.ec"
1607  _sqobind[25].sqldata = (bens_rec).maintloc;
1608 #line 506 "tcandidate.ec"
1609  _sqobind[26].sqldata = (bens_rec).init;
1610 #line 506 "tcandidate.ec"
1611  _sqobind[27].sqldata = (bens_rec).dbsource;
1612 #line 506 "tcandidate.ec"
1613  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,1,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1614 #line 506 "tcandidate.ec"
1615  }
1616 
1617  }
1618 
1619  else if(l==8) {
1620 
1621 /*
1622  * EXEC SQL select *
1623  * into :bens_rec
1624  * from sens
1625  * where id=:btn_rec.id and
1626  * pe1='T' and
1627  * pe2='A' and
1628  * dur='I' and
1629  * t='F' and
1630  * s='Z' and
1631  * e='X' and
1632  * p='Z';
1633  */
1634 #line 512 "tcandidate.ec"
1635  {
1636 #line 522 "tcandidate.ec"
1637  static const char *sqlcmdtxt[] =
1638 #line 522 "tcandidate.ec"
1639  {
1640 #line 522 "tcandidate.ec"
1641  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'I' and t = 'F' and s = 'Z' and e = 'X' and p = 'Z'",
1642  0
1643  };
1644 #line 522 "tcandidate.ec"
1645 static ifx_cursor_t _SQ0 = {0};
1646  static ifx_sqlvar_t _sqibind[] =
1647  {
1648  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1649 #line 522 "tcandidate.ec"
1650  };
1651  static ifx_sqlvar_t _sqobind[] =
1652  {
1653  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1654  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1655  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1656  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1657  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1658  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1659  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1660  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1661  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1662  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1663  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1664  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1665  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1666  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1667  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1668  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1669  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1670  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1671  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1672  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1673  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1674  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1675  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1676  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1677  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1678  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1679  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1680  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1681 #line 522 "tcandidate.ec"
1682  };
1683 #line 522 "tcandidate.ec"
1684  _sqibind[0].sqldata = btn_rec.id;
1685 #line 522 "tcandidate.ec"
1686  _sqobind[0].sqldata = (bens_rec).id;
1687 #line 522 "tcandidate.ec"
1688  _sqobind[1].sqldata = (bens_rec).pe1;
1689 #line 522 "tcandidate.ec"
1690  _sqobind[2].sqldata = (bens_rec).pe2;
1691 #line 522 "tcandidate.ec"
1692  _sqobind[3].sqldata = (bens_rec).dur;
1693 #line 522 "tcandidate.ec"
1694  _sqobind[4].sqldata = (bens_rec).t;
1695 #line 522 "tcandidate.ec"
1696  _sqobind[5].sqldata = (bens_rec).s;
1697 #line 522 "tcandidate.ec"
1698  _sqobind[6].sqldata = (bens_rec).e;
1699 #line 522 "tcandidate.ec"
1700  _sqobind[7].sqldata = (bens_rec).p;
1701 #line 522 "tcandidate.ec"
1702  _sqobind[8].sqldata = (bens_rec).type;
1703 #line 522 "tcandidate.ec"
1704  _sqobind[9].sqldata = (bens_rec).des;
1705 #line 522 "tcandidate.ec"
1706  _sqobind[10].sqldata = (bens_rec).det;
1707 #line 522 "tcandidate.ec"
1708  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1709 #line 522 "tcandidate.ec"
1710  _sqobind[12].sqldata = (bens_rec).new_report;
1711 #line 522 "tcandidate.ec"
1712  _sqobind[13].sqldata = (bens_rec).active;
1713 #line 522 "tcandidate.ec"
1714  _sqobind[14].sqldata = (bens_rec).rfs;
1715 #line 522 "tcandidate.ec"
1716  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1717 #line 522 "tcandidate.ec"
1718  _sqobind[16].sqldata = (bens_rec).prod;
1719 #line 522 "tcandidate.ec"
1720  _sqobind[17].sqldata = (bens_rec).prod2ary;
1721 #line 522 "tcandidate.ec"
1722  _sqobind[18].sqldata = (bens_rec).obsag;
1723 #line 522 "tcandidate.ec"
1724  _sqobind[19].sqldata = (bens_rec).obsloc;
1725 #line 522 "tcandidate.ec"
1726  _sqobind[20].sqldata = (bens_rec).prov_avail;
1727 #line 522 "tcandidate.ec"
1728  _sqobind[21].sqldata = (bens_rec).final_avail;
1729 #line 522 "tcandidate.ec"
1730  _sqobind[22].sqldata = (bens_rec).ownag;
1731 #line 522 "tcandidate.ec"
1732  _sqobind[23].sqldata = (bens_rec).ownloc;
1733 #line 522 "tcandidate.ec"
1734  _sqobind[24].sqldata = (bens_rec).maintag;
1735 #line 522 "tcandidate.ec"
1736  _sqobind[25].sqldata = (bens_rec).maintloc;
1737 #line 522 "tcandidate.ec"
1738  _sqobind[26].sqldata = (bens_rec).init;
1739 #line 522 "tcandidate.ec"
1740  _sqobind[27].sqldata = (bens_rec).dbsource;
1741 #line 522 "tcandidate.ec"
1742  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,1,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1743 #line 522 "tcandidate.ec"
1744  }
1745 
1746  }
1747 
1748  else if(l==9) {
1749 
1750 /*
1751  * EXEC SQL select *
1752  * into :bens_rec
1753  * from sens
1754  * where id=:btn_rec.id and
1755  * pe1='T' and
1756  * pe2='A' and
1757  * dur='I' and
1758  * t='F' and
1759  * s='R' and
1760  * e='X' and
1761  * p='Z';
1762  */
1763 #line 528 "tcandidate.ec"
1764  {
1765 #line 538 "tcandidate.ec"
1766  static const char *sqlcmdtxt[] =
1767 #line 538 "tcandidate.ec"
1768  {
1769 #line 538 "tcandidate.ec"
1770  " select * from sens where id = ? and pe1 = 'T' and pe2 = 'A' and dur = 'I' and t = 'F' and s = 'R' and e = 'X' and p = 'Z'",
1771  0
1772  };
1773 #line 538 "tcandidate.ec"
1774 static ifx_cursor_t _SQ0 = {0};
1775  static ifx_sqlvar_t _sqibind[] =
1776  {
1777  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1778 #line 538 "tcandidate.ec"
1779  };
1780  static ifx_sqlvar_t _sqobind[] =
1781  {
1782  { 100, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1783  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1784  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1785  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1786  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1787  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1788  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1789  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1790  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1791  { 100, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1792  { 100, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1793  { 102, sizeof((bens_rec).post), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1794  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1795  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1796  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1797  { 102, sizeof((bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1798  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1799  { 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1800  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1801  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1802  { 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1803  { 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1804  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1805  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1806  { 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1807  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1808  { 100, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1809  { 100, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
1810 #line 538 "tcandidate.ec"
1811  };
1812 #line 538 "tcandidate.ec"
1813  _sqibind[0].sqldata = btn_rec.id;
1814 #line 538 "tcandidate.ec"
1815  _sqobind[0].sqldata = (bens_rec).id;
1816 #line 538 "tcandidate.ec"
1817  _sqobind[1].sqldata = (bens_rec).pe1;
1818 #line 538 "tcandidate.ec"
1819  _sqobind[2].sqldata = (bens_rec).pe2;
1820 #line 538 "tcandidate.ec"
1821  _sqobind[3].sqldata = (bens_rec).dur;
1822 #line 538 "tcandidate.ec"
1823  _sqobind[4].sqldata = (bens_rec).t;
1824 #line 538 "tcandidate.ec"
1825  _sqobind[5].sqldata = (bens_rec).s;
1826 #line 538 "tcandidate.ec"
1827  _sqobind[6].sqldata = (bens_rec).e;
1828 #line 538 "tcandidate.ec"
1829  _sqobind[7].sqldata = (bens_rec).p;
1830 #line 538 "tcandidate.ec"
1831  _sqobind[8].sqldata = (bens_rec).type;
1832 #line 538 "tcandidate.ec"
1833  _sqobind[9].sqldata = (bens_rec).des;
1834 #line 538 "tcandidate.ec"
1835  _sqobind[10].sqldata = (bens_rec).det;
1836 #line 538 "tcandidate.ec"
1837  _sqobind[11].sqldata = (char *) &(bens_rec).post;
1838 #line 538 "tcandidate.ec"
1839  _sqobind[12].sqldata = (bens_rec).new_report;
1840 #line 538 "tcandidate.ec"
1841  _sqobind[13].sqldata = (bens_rec).active;
1842 #line 538 "tcandidate.ec"
1843  _sqobind[14].sqldata = (bens_rec).rfs;
1844 #line 538 "tcandidate.ec"
1845  _sqobind[15].sqldata = (char *) &(bens_rec).obstime;
1846 #line 538 "tcandidate.ec"
1847  _sqobind[16].sqldata = (bens_rec).prod;
1848 #line 538 "tcandidate.ec"
1849  _sqobind[17].sqldata = (bens_rec).prod2ary;
1850 #line 538 "tcandidate.ec"
1851  _sqobind[18].sqldata = (bens_rec).obsag;
1852 #line 538 "tcandidate.ec"
1853  _sqobind[19].sqldata = (bens_rec).obsloc;
1854 #line 538 "tcandidate.ec"
1855  _sqobind[20].sqldata = (bens_rec).prov_avail;
1856 #line 538 "tcandidate.ec"
1857  _sqobind[21].sqldata = (bens_rec).final_avail;
1858 #line 538 "tcandidate.ec"
1859  _sqobind[22].sqldata = (bens_rec).ownag;
1860 #line 538 "tcandidate.ec"
1861  _sqobind[23].sqldata = (bens_rec).ownloc;
1862 #line 538 "tcandidate.ec"
1863  _sqobind[24].sqldata = (bens_rec).maintag;
1864 #line 538 "tcandidate.ec"
1865  _sqobind[25].sqldata = (bens_rec).maintloc;
1866 #line 538 "tcandidate.ec"
1867  _sqobind[26].sqldata = (bens_rec).init;
1868 #line 538 "tcandidate.ec"
1869  _sqobind[27].sqldata = (bens_rec).dbsource;
1870 #line 538 "tcandidate.ec"
1871  sqli_slct(ESQLINTVERSION, &_SQ0,(char **) sqlcmdtxt,1,_sqibind,28,_sqobind,0,(ifx_literal_t *) 0,(ifx_namelist_t *) 0,0);
1872 #line 538 "tcandidate.ec"
1873  }
1874 
1875  }
1876 
1877 
1878 
1879  if(sqlca.sqlcode < 0) {
1880 
1881  printf("database error\n %d",sqlca.sqlcode);
1882  exit(1);
1883 
1884  }
1885 
1886  if(sqlca.sqlcode == 100)
1887  continue;
1888 
1889  pc[0]=bens_rec.pe1[0];
1890  pc[1]=bens_rec.pe2[0];
1891  pc[2]=bens_rec.dur[0];
1892  pc[3]=bens_rec.t[0];
1893  pc[4]=bens_rec.s[0];
1894  pc[5]=bens_rec.e[0];
1895  pc[6]=bens_rec.p[0];
1896  pc[7]=0;
1897 
1898 
1899 
1900  if(toupper(bens_rec.rfs[0])=='1') {
1901 
1902  printf("skipping %s %s\n",btn_rec.id,pc);
1903  tip=1;
1904  goto skip;
1905 
1906  }
1907  pc[0]=bens_rec.pe1[0];
1908  pc[1]=bens_rec.pe2[0];
1909  pc[2]=bens_rec.dur[0];
1910  pc[3]=bens_rec.t[0];
1911  pc[4]=bens_rec.s[0];
1912  pc[5]=bens_rec.e[0];
1913  pc[6]=bens_rec.p[0];
1914  pc[7]=0;
1915 
1916 
1917  if(toupper(bens_rec.active[0])!='Y')
1918  continue;
1919 
1920 
1921 
1922 
1923  strcpy(name,btn_rec.des);
1924 
1925  dtotal=pro_dly(btn_rec.id,pc,btim,etim,qual,dtn_values);
1926 
1927 
1928 
1929  if(btn_rec.elev <= 0)
1930  printf("no elevation %s %d %d\n",btn_rec.id,btn_rec.elev,tip);
1931 
1932  if(dtotal==0) {
1933 
1934  /* printf("no data %s %s\n",btn_rec.id,pc); */
1935  continue;
1936 
1937  }
1938 
1939  skip:
1940  ival=atoi(btn_rec.lat);
1941  len=strlen(btn_rec.lat);
1942 
1943  if(ival < 10000) {
1944 
1945  itemp=ival/100;
1946 
1947  itemp1=ival-itemp*100;
1948 
1949  flat=(float)itemp+(float)itemp1/60;
1950 
1951 
1952  }
1953 
1954  else if(ival > 10000) {
1955 
1956  itemp=ival/10000;
1957 
1958  itemp1=(ival-itemp*10000)/100;
1959 
1960  itemp2=ival-itemp*10000-itemp1*100;
1961 
1962  flat=(float)itemp+(float)itemp1/60 + (float)itemp2/3600;
1963 
1964 
1965 
1966  }
1967 
1968  else {
1969 
1970  printf("error\n");
1971 
1972  continue;
1973 
1974  }
1975 
1976 
1977  ival=atoi(btn_rec.lng);
1978  len=strlen(btn_rec.lng);
1979 
1980  if(ival < 100000) {
1981 
1982  itemp=ival/100;
1983 
1984  itemp1=ival-itemp*100;
1985 
1986  flng=(float)itemp+(float)itemp1/60;
1987 
1988 
1989  }
1990 
1991  else if(ival >=100000) {
1992 
1993  itemp=ival/10000;
1994 
1995  itemp1=(ival-itemp*10000)/100;
1996 
1997  itemp2=ival-itemp*10000-itemp1*100;
1998 
1999  flng=(float)itemp+(float)itemp1/60 + (float)itemp2/3600;
2000 
2001  }
2002 
2003  else {
2004 
2005  printf("error\n");
2006 
2007  continue;
2008 
2009  }
2010 
2011 
2012 /*if(flat > 45 || flng < 105 || flng > 118)
2013  continue;
2014 
2015 */
2016 
2017 
2018 
2019  pc[0]=bens_rec.pe1[0];
2020  pc[1]=bens_rec.pe2[0];
2021  pc[2]=bens_rec.dur[0];
2022  pc[3]=bens_rec.t[0];
2023  pc[4]=bens_rec.s[0];
2024  pc[5]=bens_rec.e[0];
2025  pc[6]=bens_rec.p[0];
2026  pc[7]=0;
2027 
2028 
2029  for(ii=0;ii<49;ii++) {
2030 
2031  if(btn_rec.des[ii]== ' ' &&
2032  btn_rec.des[ii+1]==' ') {
2033 
2034  btn_rec.des[ii]=0;
2035  break;
2036 
2037  }
2038 
2039  }
2040 
2041  fprintf(fp,"%s %s %f %f %d %d %s\n",
2042  btn_rec.id,pc,flat,flng,btn_rec.elev,tip,btn_rec.des);
2043 
2044 
2045  }
2046 
2047 
2048 }
2049 
2050 
2051 }
2052 
2053 #line 716 "tcandidate.ec"
int maxdays
Definition: daily_qc.c:85
time_t btim
Definition: daily_qc.c:140
time_t tim
Definition: daily_qc.c:154
char type[5]
Definition: daily_qc.c:98
int hour
Definition: display_data.c:30
char qual[10]
Definition: display_data.c:29
int day
Definition: display_data.c:30
struct stim etim
Definition: display_data.c:21
int year
Definition: display_data.c:30
int month
Definition: display_data.c:30
void init_candidate()
Definition: init_candidate.c:9
printf("pcp %d\n", pcp_in_use[103])
exit(1)
int pro_dly(char *hb5, char *parm, struct stim begin_date, struct stim end_date, char *qual, struct stn_values *stn_values)
Definition: pro_dly.c:208
int rfs(int)
Definition: can.c:329
int idote
Definition: can.c:346
int cztime
Definition: can.c:342
char source[9]
Definition: can.c:331
char pe2
Definition: can.c:333
char t
Definition: can.c:335
char s
Definition: can.c:336
int irev
Definition: can.c:347
char p
Definition: can.c:338
double values[96]
Definition: can.c:349
char lwal
Definition: can.c:345
int zdate
Definition: can.c:339
char lwals[96]
Definition: can.c:350
int idur
Definition: can.c:343
int ztime
Definition: can.c:340
char pedtsep[8]
Definition: can.c:351
double codp
Definition: can.c:344
char dur
Definition: can.c:334
char pe1
Definition: can.c:332
double value
Definition: can.c:348
char e
Definition: can.c:337
int czdate
Definition: can.c:341
Definition: can.c:293
char dbsource[4]
Definition: can.c:321
char maintag[7]
Definition: can.c:318
char maintloc[4]
Definition: can.c:319
char obsag[7]
Definition: can.c:312
char pe1[2]
Definition: can.c:295
char e[2]
Definition: can.c:300
char det[41]
Definition: can.c:304
char active[2]
Definition: can.c:307
char p[2]
Definition: can.c:301
char init[9]
Definition: can.c:320
char pe2[2]
Definition: can.c:296
char des[51]
Definition: can.c:303
char prod[10]
Definition: can.c:310
char prov_avail[2]
Definition: can.c:314
char prod2ary[10]
Definition: can.c:311
char rfs[2]
Definition: can.c:308
char type[2]
Definition: can.c:302
char obsloc[4]
Definition: can.c:313
char t[2]
Definition: can.c:298
char dur[2]
Definition: can.c:297
char new_report[2]
Definition: can.c:306
char s[2]
Definition: can.c:299
char ownag[7]
Definition: can.c:316
char final_avail[8]
Definition: can.c:315
int obstime
Definition: can.c:309
char ownloc[4]
Definition: can.c:317
int post
Definition: can.c:305
char det[41]
Definition: build_list.c:129
char huc[9]
Definition: build_list.c:135
char init[9]
Definition: build_list.c:130
int elev
Definition: build_list.c:133
char plat[9]
Definition: build_list.c:127
char des[51]
Definition: build_list.c:128
char id[6]
Definition: build_list.c:126
char lng[8]
Definition: build_list.c:132
char cwa[4]
Definition: build_list.c:139
char dbsource[4]
Definition: build_list.c:141
char lat[7]
Definition: build_list.c:131
char cou[4]
Definition: build_list.c:136
char zon[5]
Definition: build_list.c:137
int post
Definition: build_list.c:140
char hsa[4]
Definition: build_list.c:138
char stat[3]
Definition: build_list.c:134
Definition: can.c:144
char pe2[2]
Definition: can.c:147
char dur[2]
Definition: can.c:148
char p[2]
Definition: can.c:152
char s[2]
Definition: can.c:150
char pe1[2]
Definition: can.c:146
char t[2]
Definition: can.c:149
char mode[2]
Definition: can.c:153
char e[2]
Definition: can.c:151
char qzday06[2]
Definition: can.c:265
double zday10
Definition: can.c:238
double zday04
Definition: can.c:232
char qzday19[2]
Definition: can.c:278
char qzday17[2]
Definition: can.c:276
double zday17
Definition: can.c:245
char qzday29[2]
Definition: can.c:288
double zday11
Definition: can.c:239
double zday08
Definition: can.c:236
double zday28
Definition: can.c:256
char qzday01[2]
Definition: can.c:260
char e[2]
Definition: can.c:225
double zday26
Definition: can.c:254
char pe2[2]
Definition: can.c:221
char qzday13[2]
Definition: can.c:272
char t[2]
Definition: can.c:223
double zday18
Definition: can.c:246
char qzday04[2]
Definition: can.c:263
int cal_yr
Definition: can.c:227
double zday15
Definition: can.c:243
char qzday05[2]
Definition: can.c:264
char qzday16[2]
Definition: can.c:275
char qzday26[2]
Definition: can.c:285
double zday22
Definition: can.c:250
double zday31
Definition: can.c:259
double zday09
Definition: can.c:237
char qzday30[2]
Definition: can.c:289
char qzday28[2]
Definition: can.c:287
char qzday08[2]
Definition: can.c:267
char qzday25[2]
Definition: can.c:284
double zday30
Definition: can.c:258
double zday05
Definition: can.c:233
double zday14
Definition: can.c:242
double zday01
Definition: can.c:229
char pe1[2]
Definition: can.c:220
double zday23
Definition: can.c:251
double zday20
Definition: can.c:248
double zday27
Definition: can.c:255
double zday07
Definition: can.c:235
char qzday14[2]
Definition: can.c:273
char qzday15[2]
Definition: can.c:274
double zday06
Definition: can.c:234
char qzday09[2]
Definition: can.c:268
char qzday21[2]
Definition: can.c:280
double zday19
Definition: can.c:247
char qzday23[2]
Definition: can.c:282
char qzday31[2]
Definition: can.c:290
char qzday27[2]
Definition: can.c:286
char qzday07[2]
Definition: can.c:266
double zday02
Definition: can.c:230
char p[2]
Definition: can.c:226
double zday24
Definition: can.c:252
char qzday22[2]
Definition: can.c:281
double zday12
Definition: can.c:240
double zday13
Definition: can.c:241
char qzday12[2]
Definition: can.c:271
double zday03
Definition: can.c:231
char s[2]
Definition: can.c:224
double zday21
Definition: can.c:249
char qzday24[2]
Definition: can.c:283
double zday16
Definition: can.c:244
int mon
Definition: can.c:228
char qzday20[2]
Definition: can.c:279
double zday29
Definition: can.c:257
double zday25
Definition: can.c:253
char qzday02[2]
Definition: can.c:261
char dur[2]
Definition: can.c:222
char qzday18[2]
Definition: can.c:277
char qzday10[2]
Definition: can.c:269
char qzday03[2]
Definition: can.c:262
char qzday11[2]
Definition: can.c:270
char qzhr05[2]
Definition: can.c:197
double zhr02
Definition: can.c:170
char qzhr14[2]
Definition: can.c:206
double zhr01
Definition: can.c:169
double zhr16
Definition: can.c:184
double zhr21
Definition: can.c:189
char qzhr11[2]
Definition: can.c:203
double zhr15
Definition: can.c:183
char qzhr21[2]
Definition: can.c:213
char dur[2]
Definition: can.c:160
char qzhr10[2]
Definition: can.c:202
char p[2]
Definition: can.c:164
double zhr22
Definition: can.c:190
char qzhr01[2]
Definition: can.c:193
char qzhr20[2]
Definition: can.c:212
char qzhr02[2]
Definition: can.c:194
int mon
Definition: can.c:166
double zhr05
Definition: can.c:173
double zhr11
Definition: can.c:179
char qzhr12[2]
Definition: can.c:204
double zhr00
Definition: can.c:168
double zhr23
Definition: can.c:191
double zhr12
Definition: can.c:180
char qzhr23[2]
Definition: can.c:215
char qzhr00[2]
Definition: can.c:192
double zhr03
Definition: can.c:171
double zhr17
Definition: can.c:185
char pe1[2]
Definition: can.c:158
char qzhr08[2]
Definition: can.c:200
double zhr14
Definition: can.c:182
double zhr06
Definition: can.c:174
double zhr10
Definition: can.c:178
char qzhr13[2]
Definition: can.c:205
char qzhr15[2]
Definition: can.c:207
double zhr13
Definition: can.c:181
char qzhr17[2]
Definition: can.c:209
char qzhr16[2]
Definition: can.c:208
int zday
Definition: can.c:167
char s[2]
Definition: can.c:162
char t[2]
Definition: can.c:161
int cal_yr
Definition: can.c:165
char qzhr03[2]
Definition: can.c:195
double zhr20
Definition: can.c:188
char qzhr06[2]
Definition: can.c:198
double zhr08
Definition: can.c:176
double zhr19
Definition: can.c:187
char pe2[2]
Definition: can.c:159
double zhr18
Definition: can.c:186
char qzhr18[2]
Definition: can.c:210
double zhr04
Definition: can.c:172
char qzhr19[2]
Definition: can.c:211
double zhr09
Definition: can.c:177
char qzhr04[2]
Definition: can.c:196
char qzhr09[2]
Definition: can.c:201
char e[2]
Definition: can.c:163
char qzhr22[2]
Definition: can.c:214
double zhr07
Definition: can.c:175
char qzhr07[2]
Definition: can.c:199
long sqlerrd[6]
Definition: build_list.c:50
long sqlcode
Definition: build_list.c:47
struct sqlca_s::sqlcaw_s sqlwarn
char sqlerrm[72]
Definition: build_list.c:48
char sqlerrp[8]
Definition: build_list.c:49
Definition: misc.h:55
int minute
Definition: misc.h:61
int day
Definition: misc.h:59
int year
Definition: misc.h:57
int hour
Definition: misc.h:60
int month
Definition: misc.h:58
struct data_rec data_record
char pe2
Definition: tcandidate.c:125
static const char * _Cn1
Definition: tcandidate.c:3
int mday[]
Definition: tcandidate.c:360
char s
Definition: tcandidate.c:125
void main(int argc, char **argv)
Definition: tcandidate.c:361
struct eens_rec bens_rec
char pe1
Definition: tcandidate.c:125
int4 SQLCODE
struct sqlca_s ifx_sqlca_t
struct pro_dly_rec dly_rec
char SQLSTATE[]
struct sqlca_s sqlca
struct pro_hrly_rec hrly_rec
char dur
Definition: tcandidate.c:125
struct gage_info info
char t
Definition: tcandidate.c:125
struct etn_rec btn_rec