8 static const char *
_Cn1 =
"stncursor";
static _SQCURSOR *
_SQ1 = 0;
14 #line 2 "candidate.ec"
15 #line 1 "/usr/informix/incl/esql/sqlca.h"
89 #define SQLNOTFOUND 100
92 #line 3 "candidate.ec"
97 #line 4 "candidate.ec"
302 #line 216 "candidate.ec"
329 int mday[]={31,28,31,30,31,30,31,31,30,31,30,31} ;
330 void main(
int argc,
char **argv)
351 char dbuf[80],ts1[80];
353 char zbuf[1000],abuf[100];
355 int zdate[10],ztime[10];
357 char *add,file[50],*key;
361 extern int optind,opterr,optopt;
366 char *directory,fname[50];
372 int itemp,itemp1,itemp2,ival,len;
377 fp=fopen(
"junkfile",
"w");
385 while((c=getopt(argc,argv,
"d:h:n:f:q:v"))!=-1){
391 strcpy(fname,optarg);
406 dtn_values=calloc(1000,
sizeof(
struct stn_values));
407 qtn_values=calloc(1000,
sizeof(
struct stn_values));
412 btim.year=gmtim->tm_year+1900;
413 btim.month=gmtim->tm_mon+1;
414 btim.day=gmtim->tm_mday;
415 btim.hour=gmtim->tm_hour;
430 etim2.
year=gmtim->tm_year+1900;
431 etim2.
month=gmtim->tm_mon+1;
432 etim2.
day=gmtim->tm_mday;
439 #line 349 "candidate.ec"
441 #line 349 "candidate.ec"
442 #line 349 "candidate.ec"
443 _SQ1 = _iqlocate_cursor(
_Cn1, 0, 0);
444 #line 349 "candidate.ec"
445 _iqdcopen(
_SQ1, (
struct sqlda *)0, (
char *)0, (
char *)0, 0);
446 #line 349 "candidate.ec"
456 for(i=0;i<5000;i++) {
464 #line 363 "candidate.ec"
466 #line 363 "candidate.ec"
467 static struct sqlvar_struct _sqobind[] =
469 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
470 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
471 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
472 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
473 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
474 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
475 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
476 { 102,
sizeof((
btn_rec).elev), 0, 0, 0, 0, 0, 0, 0 },
477 { 100, 3, 0, 0, 0, 0, 0, 0, 0 },
478 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
479 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
480 { 100, 5, 0, 0, 0, 0, 0, 0, 0 },
481 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
482 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
483 { 102,
sizeof((
btn_rec).post), 0, 0, 0, 0, 0, 0, 0 },
484 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
485 #line 363 "candidate.ec"
487 static struct sqlda _SD0 = { 16, _sqobind, 0, 16, 0 };
488 static _FetchSpec _FS1 = { 0, 1, 0 };
489 #line 363 "candidate.ec"
490 _sqobind[0].sqldata = (
btn_rec).
id;
491 #line 363 "candidate.ec"
492 _sqobind[1].sqldata = (
btn_rec).plat;
493 #line 363 "candidate.ec"
494 _sqobind[2].sqldata = (
btn_rec).des;
495 #line 363 "candidate.ec"
496 _sqobind[3].sqldata = (
btn_rec).det;
497 #line 363 "candidate.ec"
498 _sqobind[4].sqldata = (
btn_rec).init;
499 #line 363 "candidate.ec"
500 _sqobind[5].sqldata = (
btn_rec).lat;
501 #line 363 "candidate.ec"
502 _sqobind[6].sqldata = (
btn_rec).lng;
503 #line 363 "candidate.ec"
504 _sqobind[7].sqldata = (
char *) &(
btn_rec).elev;
505 #line 363 "candidate.ec"
506 _sqobind[8].sqldata = (
btn_rec).stat;
507 #line 363 "candidate.ec"
508 _sqobind[9].sqldata = (
btn_rec).huc;
509 #line 363 "candidate.ec"
510 _sqobind[10].sqldata = (
btn_rec).cou;
511 #line 363 "candidate.ec"
512 _sqobind[11].sqldata = (
btn_rec).zon;
513 #line 363 "candidate.ec"
514 _sqobind[12].sqldata = (
btn_rec).hsa;
515 #line 363 "candidate.ec"
516 _sqobind[13].sqldata = (
btn_rec).cwa;
517 #line 363 "candidate.ec"
518 _sqobind[14].sqldata = (
char *) &(
btn_rec).post;
519 #line 363 "candidate.ec"
520 _sqobind[15].sqldata = (
btn_rec).dbsource;
521 #line 363 "candidate.ec"
522 _SQ1 = _iqlocate_cursor(
_Cn1, 0, 0);
523 #line 363 "candidate.ec"
524 _iqcftch(
_SQ1, (
struct sqlda *)0, &_SD0, (
char *)0, &_FS1);
525 #line 363 "candidate.ec"
555 #line 379 "candidate.ec"
557 #line 379 "candidate.ec"
558 static const char *sqlcmdtxt[] =
559 #line 379 "candidate.ec"
561 #line 379 "candidate.ec"
562 " select * from sens where id = ? and pe1 = 'P' and pe2 = 'P' and dur = 'D' and t = ? and s = 'P' and e = 'Z' and p = 'Z'",
565 #line 389 "candidate.ec"
566 static _SQCURSOR _SQ0 = {0};
567 static struct sqlvar_struct _sqibind[] =
569 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
570 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
571 #line 389 "candidate.ec"
573 static struct sqlvar_struct _sqobind[] =
575 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
576 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
577 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
578 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
579 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
580 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
581 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
582 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
583 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
584 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
585 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
586 { 102,
sizeof((
bens_rec).post), 0, 0, 0, 0, 0, 0, 0 },
587 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
588 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
589 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
590 { 102,
sizeof((
bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0 },
591 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
592 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
593 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
594 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
595 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
596 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
597 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
598 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
599 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
600 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
601 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
602 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
603 #line 389 "candidate.ec"
605 #line 389 "candidate.ec"
607 #line 389 "candidate.ec"
608 _sqibind[1].sqldata = &
t;
609 #line 389 "candidate.ec"
610 _sqobind[0].sqldata = (
bens_rec).
id;
611 #line 389 "candidate.ec"
613 #line 389 "candidate.ec"
615 #line 389 "candidate.ec"
617 #line 389 "candidate.ec"
619 #line 389 "candidate.ec"
621 #line 389 "candidate.ec"
623 #line 389 "candidate.ec"
625 #line 389 "candidate.ec"
627 #line 389 "candidate.ec"
628 _sqobind[9].sqldata = (
bens_rec).des;
629 #line 389 "candidate.ec"
630 _sqobind[10].sqldata = (
bens_rec).det;
631 #line 389 "candidate.ec"
632 _sqobind[11].sqldata = (
char *) &(
bens_rec).post;
633 #line 389 "candidate.ec"
634 _sqobind[12].sqldata = (
bens_rec).new_report;
635 #line 389 "candidate.ec"
636 _sqobind[13].sqldata = (
bens_rec).active;
637 #line 389 "candidate.ec"
639 #line 389 "candidate.ec"
640 _sqobind[15].sqldata = (
char *) &(
bens_rec).obstime;
641 #line 389 "candidate.ec"
642 _sqobind[16].sqldata = (
bens_rec).prod;
643 #line 389 "candidate.ec"
644 _sqobind[17].sqldata = (
bens_rec).prod2ary;
645 #line 389 "candidate.ec"
646 _sqobind[18].sqldata = (
bens_rec).obsag;
647 #line 389 "candidate.ec"
648 _sqobind[19].sqldata = (
bens_rec).obsloc;
649 #line 389 "candidate.ec"
650 _sqobind[20].sqldata = (
bens_rec).prov_avail;
651 #line 389 "candidate.ec"
652 _sqobind[21].sqldata = (
bens_rec).final_avail;
653 #line 389 "candidate.ec"
654 _sqobind[22].sqldata = (
bens_rec).ownag;
655 #line 389 "candidate.ec"
656 _sqobind[23].sqldata = (
bens_rec).ownloc;
657 #line 389 "candidate.ec"
658 _sqobind[24].sqldata = (
bens_rec).maintag;
659 #line 389 "candidate.ec"
660 _sqobind[25].sqldata = (
bens_rec).maintloc;
661 #line 389 "candidate.ec"
662 _sqobind[26].sqldata = (
bens_rec).init;
663 #line 389 "candidate.ec"
664 _sqobind[27].sqldata = (
bens_rec).dbsource;
665 #line 389 "candidate.ec"
666 _iqslct(&_SQ0, sqlcmdtxt, 2, _sqibind, 28, _sqobind, 0);
667 #line 389 "candidate.ec"
688 #line 396 "candidate.ec"
690 #line 396 "candidate.ec"
691 static const char *sqlcmdtxt[] =
692 #line 396 "candidate.ec"
694 #line 396 "candidate.ec"
695 " select * from sens where id = ? and pe1 = 'P' and pe2 = 'P' and dur = 'D' and t = ? and s = 'G' and e = 'Z' and p = 'Z'",
698 #line 406 "candidate.ec"
699 static _SQCURSOR _SQ0 = {0};
700 static struct sqlvar_struct _sqibind[] =
702 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
703 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
704 #line 406 "candidate.ec"
706 static struct sqlvar_struct _sqobind[] =
708 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
709 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
710 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
711 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
712 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
713 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
714 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
715 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
716 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
717 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
718 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
719 { 102,
sizeof((
bens_rec).post), 0, 0, 0, 0, 0, 0, 0 },
720 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
721 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
722 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
723 { 102,
sizeof((
bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0 },
724 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
725 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
726 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
727 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
728 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
729 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
730 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
731 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
732 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
733 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
734 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
735 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
736 #line 406 "candidate.ec"
738 #line 406 "candidate.ec"
740 #line 406 "candidate.ec"
741 _sqibind[1].sqldata = &
t;
742 #line 406 "candidate.ec"
743 _sqobind[0].sqldata = (
bens_rec).
id;
744 #line 406 "candidate.ec"
746 #line 406 "candidate.ec"
748 #line 406 "candidate.ec"
750 #line 406 "candidate.ec"
752 #line 406 "candidate.ec"
754 #line 406 "candidate.ec"
756 #line 406 "candidate.ec"
758 #line 406 "candidate.ec"
760 #line 406 "candidate.ec"
761 _sqobind[9].sqldata = (
bens_rec).des;
762 #line 406 "candidate.ec"
763 _sqobind[10].sqldata = (
bens_rec).det;
764 #line 406 "candidate.ec"
765 _sqobind[11].sqldata = (
char *) &(
bens_rec).post;
766 #line 406 "candidate.ec"
767 _sqobind[12].sqldata = (
bens_rec).new_report;
768 #line 406 "candidate.ec"
769 _sqobind[13].sqldata = (
bens_rec).active;
770 #line 406 "candidate.ec"
772 #line 406 "candidate.ec"
773 _sqobind[15].sqldata = (
char *) &(
bens_rec).obstime;
774 #line 406 "candidate.ec"
775 _sqobind[16].sqldata = (
bens_rec).prod;
776 #line 406 "candidate.ec"
777 _sqobind[17].sqldata = (
bens_rec).prod2ary;
778 #line 406 "candidate.ec"
779 _sqobind[18].sqldata = (
bens_rec).obsag;
780 #line 406 "candidate.ec"
781 _sqobind[19].sqldata = (
bens_rec).obsloc;
782 #line 406 "candidate.ec"
783 _sqobind[20].sqldata = (
bens_rec).prov_avail;
784 #line 406 "candidate.ec"
785 _sqobind[21].sqldata = (
bens_rec).final_avail;
786 #line 406 "candidate.ec"
787 _sqobind[22].sqldata = (
bens_rec).ownag;
788 #line 406 "candidate.ec"
789 _sqobind[23].sqldata = (
bens_rec).ownloc;
790 #line 406 "candidate.ec"
791 _sqobind[24].sqldata = (
bens_rec).maintag;
792 #line 406 "candidate.ec"
793 _sqobind[25].sqldata = (
bens_rec).maintloc;
794 #line 406 "candidate.ec"
795 _sqobind[26].sqldata = (
bens_rec).init;
796 #line 406 "candidate.ec"
797 _sqobind[27].sqldata = (
bens_rec).dbsource;
798 #line 406 "candidate.ec"
799 _iqslct(&_SQ0, sqlcmdtxt, 2, _sqibind, 28, _sqobind, 0);
800 #line 406 "candidate.ec"
821 #line 413 "candidate.ec"
823 #line 413 "candidate.ec"
824 static const char *sqlcmdtxt[] =
825 #line 413 "candidate.ec"
827 #line 413 "candidate.ec"
828 " select * from sens where id = ? and pe1 = 'P' and pe2 = 'P' and dur = 'D' and t = ? and s = 'M' and e = 'Z' and p = 'Z'",
831 #line 423 "candidate.ec"
832 static _SQCURSOR _SQ0 = {0};
833 static struct sqlvar_struct _sqibind[] =
835 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
836 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
837 #line 423 "candidate.ec"
839 static struct sqlvar_struct _sqobind[] =
841 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
842 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
843 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
844 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
845 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
846 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
847 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
848 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
849 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
850 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
851 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
852 { 102,
sizeof((
bens_rec).post), 0, 0, 0, 0, 0, 0, 0 },
853 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
854 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
855 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
856 { 102,
sizeof((
bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0 },
857 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
858 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
859 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
860 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
861 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
862 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
863 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
864 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
865 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
866 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
867 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
868 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
869 #line 423 "candidate.ec"
871 #line 423 "candidate.ec"
873 #line 423 "candidate.ec"
874 _sqibind[1].sqldata = &
t;
875 #line 423 "candidate.ec"
876 _sqobind[0].sqldata = (
bens_rec).
id;
877 #line 423 "candidate.ec"
879 #line 423 "candidate.ec"
881 #line 423 "candidate.ec"
883 #line 423 "candidate.ec"
885 #line 423 "candidate.ec"
887 #line 423 "candidate.ec"
889 #line 423 "candidate.ec"
891 #line 423 "candidate.ec"
893 #line 423 "candidate.ec"
894 _sqobind[9].sqldata = (
bens_rec).des;
895 #line 423 "candidate.ec"
896 _sqobind[10].sqldata = (
bens_rec).det;
897 #line 423 "candidate.ec"
898 _sqobind[11].sqldata = (
char *) &(
bens_rec).post;
899 #line 423 "candidate.ec"
900 _sqobind[12].sqldata = (
bens_rec).new_report;
901 #line 423 "candidate.ec"
902 _sqobind[13].sqldata = (
bens_rec).active;
903 #line 423 "candidate.ec"
905 #line 423 "candidate.ec"
906 _sqobind[15].sqldata = (
char *) &(
bens_rec).obstime;
907 #line 423 "candidate.ec"
908 _sqobind[16].sqldata = (
bens_rec).prod;
909 #line 423 "candidate.ec"
910 _sqobind[17].sqldata = (
bens_rec).prod2ary;
911 #line 423 "candidate.ec"
912 _sqobind[18].sqldata = (
bens_rec).obsag;
913 #line 423 "candidate.ec"
914 _sqobind[19].sqldata = (
bens_rec).obsloc;
915 #line 423 "candidate.ec"
916 _sqobind[20].sqldata = (
bens_rec).prov_avail;
917 #line 423 "candidate.ec"
918 _sqobind[21].sqldata = (
bens_rec).final_avail;
919 #line 423 "candidate.ec"
920 _sqobind[22].sqldata = (
bens_rec).ownag;
921 #line 423 "candidate.ec"
922 _sqobind[23].sqldata = (
bens_rec).ownloc;
923 #line 423 "candidate.ec"
924 _sqobind[24].sqldata = (
bens_rec).maintag;
925 #line 423 "candidate.ec"
926 _sqobind[25].sqldata = (
bens_rec).maintloc;
927 #line 423 "candidate.ec"
928 _sqobind[26].sqldata = (
bens_rec).init;
929 #line 423 "candidate.ec"
930 _sqobind[27].sqldata = (
bens_rec).dbsource;
931 #line 423 "candidate.ec"
932 _iqslct(&_SQ0, sqlcmdtxt, 2, _sqibind, 28, _sqobind, 0);
933 #line 423 "candidate.ec"
953 #line 429 "candidate.ec"
955 #line 429 "candidate.ec"
956 static const char *sqlcmdtxt[] =
957 #line 429 "candidate.ec"
959 #line 429 "candidate.ec"
960 " select * from sens where id = ? and pe1 = 'P' and pe2 = 'P' and dur = 'D' and t = ? and s = 'Z' and e = 'Z' and p = 'Z'",
963 #line 439 "candidate.ec"
964 static _SQCURSOR _SQ0 = {0};
965 static struct sqlvar_struct _sqibind[] =
967 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
968 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
969 #line 439 "candidate.ec"
971 static struct sqlvar_struct _sqobind[] =
973 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
974 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
975 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
976 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
977 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
978 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
979 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
980 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
981 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
982 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
983 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
984 { 102,
sizeof((
bens_rec).post), 0, 0, 0, 0, 0, 0, 0 },
985 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
986 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
987 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
988 { 102,
sizeof((
bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0 },
989 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
990 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
991 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
992 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
993 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
994 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
995 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
996 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
997 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
998 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
999 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
1000 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
1001 #line 439 "candidate.ec"
1003 #line 439 "candidate.ec"
1005 #line 439 "candidate.ec"
1006 _sqibind[1].sqldata = &
t;
1007 #line 439 "candidate.ec"
1008 _sqobind[0].sqldata = (
bens_rec).
id;
1009 #line 439 "candidate.ec"
1011 #line 439 "candidate.ec"
1013 #line 439 "candidate.ec"
1015 #line 439 "candidate.ec"
1017 #line 439 "candidate.ec"
1019 #line 439 "candidate.ec"
1020 _sqobind[6].sqldata = (
bens_rec).e;
1021 #line 439 "candidate.ec"
1022 _sqobind[7].sqldata = (
bens_rec).p;
1023 #line 439 "candidate.ec"
1025 #line 439 "candidate.ec"
1026 _sqobind[9].sqldata = (
bens_rec).des;
1027 #line 439 "candidate.ec"
1028 _sqobind[10].sqldata = (
bens_rec).det;
1029 #line 439 "candidate.ec"
1030 _sqobind[11].sqldata = (
char *) &(
bens_rec).post;
1031 #line 439 "candidate.ec"
1032 _sqobind[12].sqldata = (
bens_rec).new_report;
1033 #line 439 "candidate.ec"
1034 _sqobind[13].sqldata = (
bens_rec).active;
1035 #line 439 "candidate.ec"
1037 #line 439 "candidate.ec"
1038 _sqobind[15].sqldata = (
char *) &(
bens_rec).obstime;
1039 #line 439 "candidate.ec"
1040 _sqobind[16].sqldata = (
bens_rec).prod;
1041 #line 439 "candidate.ec"
1042 _sqobind[17].sqldata = (
bens_rec).prod2ary;
1043 #line 439 "candidate.ec"
1044 _sqobind[18].sqldata = (
bens_rec).obsag;
1045 #line 439 "candidate.ec"
1046 _sqobind[19].sqldata = (
bens_rec).obsloc;
1047 #line 439 "candidate.ec"
1048 _sqobind[20].sqldata = (
bens_rec).prov_avail;
1049 #line 439 "candidate.ec"
1050 _sqobind[21].sqldata = (
bens_rec).final_avail;
1051 #line 439 "candidate.ec"
1052 _sqobind[22].sqldata = (
bens_rec).ownag;
1053 #line 439 "candidate.ec"
1054 _sqobind[23].sqldata = (
bens_rec).ownloc;
1055 #line 439 "candidate.ec"
1056 _sqobind[24].sqldata = (
bens_rec).maintag;
1057 #line 439 "candidate.ec"
1058 _sqobind[25].sqldata = (
bens_rec).maintloc;
1059 #line 439 "candidate.ec"
1060 _sqobind[26].sqldata = (
bens_rec).init;
1061 #line 439 "candidate.ec"
1062 _sqobind[27].sqldata = (
bens_rec).dbsource;
1063 #line 439 "candidate.ec"
1064 _iqslct(&_SQ0, sqlcmdtxt, 2, _sqibind, 28, _sqobind, 0);
1065 #line 439 "candidate.ec"
1085 #line 445 "candidate.ec"
1087 #line 445 "candidate.ec"
1088 static const char *sqlcmdtxt[] =
1089 #line 445 "candidate.ec"
1091 #line 445 "candidate.ec"
1092 " select * from sens where id = ? and pe1 = 'P' and pe2 = 'P' and dur = 'D' and t = ? and s = 'R' and e = 'Z' and p = 'Z'",
1095 #line 455 "candidate.ec"
1096 static _SQCURSOR _SQ0 = {0};
1097 static struct sqlvar_struct _sqibind[] =
1099 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1100 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
1101 #line 455 "candidate.ec"
1103 static struct sqlvar_struct _sqobind[] =
1105 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1106 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1107 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1108 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1109 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1110 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1111 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1112 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1113 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1114 { 100, 51, 0, 0, 0, 0, 0, 0, 0 },
1115 { 100, 41, 0, 0, 0, 0, 0, 0, 0 },
1116 { 102,
sizeof((
bens_rec).post), 0, 0, 0, 0, 0, 0, 0 },
1117 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1118 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1119 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1120 { 102,
sizeof((
bens_rec).obstime), 0, 0, 0, 0, 0, 0, 0 },
1121 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
1122 { 100, 10, 0, 0, 0, 0, 0, 0, 0 },
1123 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
1124 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
1125 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1126 { 100, 8, 0, 0, 0, 0, 0, 0, 0 },
1127 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
1128 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
1129 { 100, 7, 0, 0, 0, 0, 0, 0, 0 },
1130 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
1131 { 100, 9, 0, 0, 0, 0, 0, 0, 0 },
1132 { 100, 4, 0, 0, 0, 0, 0, 0, 0 },
1133 #line 455 "candidate.ec"
1135 #line 455 "candidate.ec"
1137 #line 455 "candidate.ec"
1138 _sqibind[1].sqldata = &
t;
1139 #line 455 "candidate.ec"
1140 _sqobind[0].sqldata = (
bens_rec).
id;
1141 #line 455 "candidate.ec"
1143 #line 455 "candidate.ec"
1145 #line 455 "candidate.ec"
1147 #line 455 "candidate.ec"
1149 #line 455 "candidate.ec"
1151 #line 455 "candidate.ec"
1152 _sqobind[6].sqldata = (
bens_rec).e;
1153 #line 455 "candidate.ec"
1154 _sqobind[7].sqldata = (
bens_rec).p;
1155 #line 455 "candidate.ec"
1157 #line 455 "candidate.ec"
1158 _sqobind[9].sqldata = (
bens_rec).des;
1159 #line 455 "candidate.ec"
1160 _sqobind[10].sqldata = (
bens_rec).det;
1161 #line 455 "candidate.ec"
1162 _sqobind[11].sqldata = (
char *) &(
bens_rec).post;
1163 #line 455 "candidate.ec"
1164 _sqobind[12].sqldata = (
bens_rec).new_report;
1165 #line 455 "candidate.ec"
1166 _sqobind[13].sqldata = (
bens_rec).active;
1167 #line 455 "candidate.ec"
1169 #line 455 "candidate.ec"
1170 _sqobind[15].sqldata = (
char *) &(
bens_rec).obstime;
1171 #line 455 "candidate.ec"
1172 _sqobind[16].sqldata = (
bens_rec).prod;
1173 #line 455 "candidate.ec"
1174 _sqobind[17].sqldata = (
bens_rec).prod2ary;
1175 #line 455 "candidate.ec"
1176 _sqobind[18].sqldata = (
bens_rec).obsag;
1177 #line 455 "candidate.ec"
1178 _sqobind[19].sqldata = (
bens_rec).obsloc;
1179 #line 455 "candidate.ec"
1180 _sqobind[20].sqldata = (
bens_rec).prov_avail;
1181 #line 455 "candidate.ec"
1182 _sqobind[21].sqldata = (
bens_rec).final_avail;
1183 #line 455 "candidate.ec"
1184 _sqobind[22].sqldata = (
bens_rec).ownag;
1185 #line 455 "candidate.ec"
1186 _sqobind[23].sqldata = (
bens_rec).ownloc;
1187 #line 455 "candidate.ec"
1188 _sqobind[24].sqldata = (
bens_rec).maintag;
1189 #line 455 "candidate.ec"
1190 _sqobind[25].sqldata = (
bens_rec).maintloc;
1191 #line 455 "candidate.ec"
1192 _sqobind[26].sqldata = (
bens_rec).init;
1193 #line 455 "candidate.ec"
1194 _sqobind[27].sqldata = (
bens_rec).dbsource;
1195 #line 455 "candidate.ec"
1196 _iqslct(&_SQ0, sqlcmdtxt, 2, _sqibind, 28, _sqobind, 0);
1197 #line 455 "candidate.ec"
1248 itemp1=ival-itemp*100;
1250 flat=(float)itemp+(
float)itemp1/60;
1255 else if(ival > 10000) {
1259 itemp1=(ival-itemp*10000)/100;
1261 itemp2=ival-itemp*10000-itemp1*100;
1263 flat=(float)itemp+(
float)itemp1/60 + (float)itemp2/3600;
1285 itemp1=ival-itemp*100;
1287 flng=(float)itemp+(
float)itemp1/60;
1292 else if(ival >=100000) {
1296 itemp1=(ival-itemp*10000)/100;
1298 itemp2=ival-itemp*10000-itemp1*100;
1300 flng=(float)itemp+(
float)itemp1/60 + (float)itemp2/3600;
1356 #line 601 "candidate.ec"
1358 #line 601 "candidate.ec"
1359 static const char *sqlcmdtxt[] =
1360 #line 601 "candidate.ec"
1362 #line 601 "candidate.ec"
1363 " select * from gage_p where id = ? and pe1 = 'P' and pe2 = ? and t = 'R' and s = ? and e = 'Z' and p = 'Z'",
1366 #line 610 "candidate.ec"
1367 static _SQCURSOR _SQ0 = {0};
1368 static struct sqlvar_struct _sqibind[] =
1370 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1371 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
1372 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
1373 #line 610 "candidate.ec"
1375 static struct sqlvar_struct _sqobind[] =
1377 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1378 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1379 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1380 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1381 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1382 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1383 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1384 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1385 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1386 #line 610 "candidate.ec"
1388 #line 610 "candidate.ec"
1390 #line 610 "candidate.ec"
1391 _sqibind[1].sqldata = &
pe2;
1392 #line 610 "candidate.ec"
1394 #line 610 "candidate.ec"
1395 _sqobind[0].sqldata = (
info).
id;
1396 #line 610 "candidate.ec"
1397 _sqobind[1].sqldata = (
info).
pe1;
1398 #line 610 "candidate.ec"
1399 _sqobind[2].sqldata = (
info).
pe2;
1400 #line 610 "candidate.ec"
1401 _sqobind[3].sqldata = (
info).
dur;
1402 #line 610 "candidate.ec"
1403 _sqobind[4].sqldata = (
info).
t;
1404 #line 610 "candidate.ec"
1405 _sqobind[5].sqldata = (
info).
s;
1406 #line 610 "candidate.ec"
1407 _sqobind[6].sqldata = (
info).e;
1408 #line 610 "candidate.ec"
1409 _sqobind[7].sqldata = (
info).p;
1410 #line 610 "candidate.ec"
1411 _sqobind[8].sqldata = (
info).mode;
1412 #line 610 "candidate.ec"
1413 _iqslct(&_SQ0, sqlcmdtxt, 3, _sqibind, 9, _sqobind, 0);
1414 #line 610 "candidate.ec"
1440 #line 622 "candidate.ec"
1442 #line 622 "candidate.ec"
1443 static const char *sqlcmdtxt[] =
1444 #line 622 "candidate.ec"
1446 #line 622 "candidate.ec"
1447 " select * from gage_p where id = ? and pe1 = 'P' and pe2 = ? and dur = 'Q' and t = 'R' and s = ? and e = 'Z' and p = 'Z'",
1450 #line 632 "candidate.ec"
1451 static _SQCURSOR _SQ0 = {0};
1452 static struct sqlvar_struct _sqibind[] =
1454 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1455 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
1456 { 108, 1, 0, 0, 0, 0, 0, 0, 0 },
1457 #line 632 "candidate.ec"
1459 static struct sqlvar_struct _sqobind[] =
1461 { 100, 6, 0, 0, 0, 0, 0, 0, 0 },
1462 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1463 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1464 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1465 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1466 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1467 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1468 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1469 { 100, 2, 0, 0, 0, 0, 0, 0, 0 },
1470 #line 632 "candidate.ec"
1472 #line 632 "candidate.ec"
1474 #line 632 "candidate.ec"
1475 _sqibind[1].sqldata = &
pe2;
1476 #line 632 "candidate.ec"
1478 #line 632 "candidate.ec"
1479 _sqobind[0].sqldata = (
info).
id;
1480 #line 632 "candidate.ec"
1481 _sqobind[1].sqldata = (
info).
pe1;
1482 #line 632 "candidate.ec"
1483 _sqobind[2].sqldata = (
info).
pe2;
1484 #line 632 "candidate.ec"
1485 _sqobind[3].sqldata = (
info).
dur;
1486 #line 632 "candidate.ec"
1487 _sqobind[4].sqldata = (
info).
t;
1488 #line 632 "candidate.ec"
1489 _sqobind[5].sqldata = (
info).
s;
1490 #line 632 "candidate.ec"
1491 _sqobind[6].sqldata = (
info).e;
1492 #line 632 "candidate.ec"
1493 _sqobind[7].sqldata = (
info).p;
1494 #line 632 "candidate.ec"
1495 _sqobind[8].sqldata = (
info).mode;
1496 #line 632 "candidate.ec"
1497 _iqslct(&_SQ0, sqlcmdtxt, 3, _sqibind, 9, _sqobind, 0);
1498 #line 632 "candidate.ec"
1526 if(flat >= 37 &&
btn_rec.
elev >= 7000 && tip==0) {
1528 printf(
"tipping bucket reject %s %d\n",
1535 else if(flat >= 39 &&
btn_rec.
elev >= 6000 && tip==0) {
1537 printf(
"tipping bucket reject 2 %s %d\n",
1544 else if(flat >= 41 &&
btn_rec.
elev >= 5000 && tip==0) {
1546 printf(
"tipping bucket reject 2 %s %d\n",
1553 else if(flat >= 43 &&
btn_rec.
elev >= 4000 && tip==0) {
1555 printf(
"tipping bucket reject 2 %s %d\n",
1563 for(ii=0;ii<49;ii++) {
1575 fprintf(fp,
"%s %s %f %f %d %d %s\n",
struct data_rec data_record
void main(int argc, char **argv)
struct pro_dly_rec dly_rec
struct pro_hrly_rec hrly_rec
printf("pcp %d\n", pcp_in_use[103])
int pro_dly(char *hb5, char *parm, struct stim begin_date, struct stim end_date, char *qual, struct stn_values *stn_values)
struct sqlca_s::sqlcaw_s sqlwarn