/* Result Sets Interface */ #ifndef SQL_CRSR # define SQL_CRSR struct sql_cursor { unsigned int curocn; void *ptr1; void *ptr2; unsigned long magic; }; typedef struct sql_cursor sql_cursor; typedef struct sql_cursor SQL_CURSOR; #endif /* SQL_CRSR */ /* Thread Safety */ typedef void * sql_context; typedef void * SQL_CONTEXT; /* Object support */ struct sqltvn { unsigned char *tvnvsn; unsigned short tvnvsnl; unsigned char *tvnnm; unsigned short tvnnml; unsigned char *tvnsnm; unsigned short tvnsnml; }; typedef struct sqltvn sqltvn; struct sqladts { unsigned int adtvsn; unsigned short adtmode; unsigned short adtnum; sqltvn adttvn[1]; }; typedef struct sqladts sqladts; static struct sqladts sqladt = { 1,1,0, }; /* Binding to PL/SQL Records */ struct sqltdss { unsigned int tdsvsn; unsigned short tdsnum; unsigned char *tdsval[1]; }; typedef struct sqltdss sqltdss; static struct sqltdss sqltds = { 1, 0, }; /* File name & Package Name */ struct sqlcxp { unsigned short fillen; char filnam[11]; }; static struct sqlcxp sqlfpn = { 10, "filinfo.pc" }; static unsigned long sqlctx = 73587; static struct sqlexd { unsigned int sqlvsn; unsigned int arrsiz; unsigned int iters; unsigned int offset; unsigned short selerr; unsigned short sqlety; unsigned int unused; short *cud; unsigned char *sqlest; char *stmt; sqladts *sqladtp; sqltdss *sqltdsp; void **sqphsv; unsigned int *sqphsl; int *sqphss; void **sqpind; int *sqpins; unsigned int *sqparm; unsigned int **sqparc; unsigned short *sqpadto; unsigned short *sqptdso; void *sqhstv[9]; unsigned int sqhstl[9]; int sqhsts[9]; void *sqindv[9]; int sqinds[9]; unsigned int sqharm[9]; unsigned int *sqharc[9]; unsigned short sqadto[9]; unsigned short sqtdso[9]; } sqlstm = {10,9}; /* SQLLIB Prototypes */ extern sqlcxt (/*_ void **, unsigned long *, struct sqlexd *, struct sqlcxp * _*/); extern sqlcx2t(/*_ void **, unsigned long *, struct sqlexd *, struct sqlcxp * _*/); extern sqlbuft(/*_ void **, char * _*/); extern sqlgs2t(/*_ void **, char * _*/); extern sqlorat(/*_ void **, unsigned long *, void * _*/); /* Forms Interface */ static int IAPSUCC = 0; static int IAPFAIL = 1403; static int IAPFTL = 535; extern void sqliem(/*_ char *, int * _*/); static char *sq0006 = "select resp_nb ,resp_type ,resp_id ,unit_in ,unit_out ,r_type from response\ where seqresp_id=:b0 order by resp_nb "; static char *sq0012 = "select type ,r_value ,i_value from response_pz where pz_id=:b0 order by pz_\ nb "; static char *sq0014 = "select pn_nb ,pn_value from response_pn_data where pn_id=:b0 order by pn_nb\ "; typedef struct { unsigned short len; unsigned char arr[1]; } VARCHAR; typedef struct { unsigned short len; unsigned char arr[1]; } varchar; /* CUD (Compilation Unit Data) Array */ static short sqlcud0[] = {10,4130,0,0,0, 5,0,0,1,0,0,27,113,0,0,4,4,0,1,0,1,97,0,0,1,10,0,0,1,10,0,0,1,10,0,0, 36,0,0,2,114,0,4,120,0,0,6,1,0,1,0,2,3,0,0,2,3,0,0,2,4,0,0,2,4,0,0,2,97,0,0,1, 97,0,0, 75,0,0,3,0,0,32,129,0,0,0,0,0,1,0, 90,0,0,4,92,0,4,141,0,0,3,2,0,1,0,2,3,0,0,1,3,0,0,1,3,0,0, 117,0,0,5,156,0,4,146,0,0,9,1,0,1,0,2,4,0,0,2,4,0,0,2,4,0,0,2,4,0,0,2,3,0,0,2, 4,0,0,2,4,0,0,2,3,0,0,1,3,0,0, 168,0,0,6,126,0,9,159,0,0,1,1,0,1,0,1,3,0,0, 187,0,0,6,0,0,13,165,0,0,6,0,0,1,0,2,3,0,0,2,1,0,0,2,3,0,0,2,3,0,0,2,3,0,0,2,1, 0,0, 226,0,0,7,46,0,4,167,0,0,2,1,0,1,0,2,97,0,0,1,3,0,0, 249,0,0,8,46,0,4,168,0,0,2,1,0,1,0,2,97,0,0,1,3,0,0, 272,0,0,9,78,0,4,175,0,0,4,1,0,1,0,2,97,0,0,2,1,0,0,2,4,0,0,1,3,0,0, 303,0,0,10,110,0,4,185,0,0,5,1,0,1,0,2,97,0,0,2,3,0,0,2,4,0,0,2,4,0,0,1,3,0,0, 338,0,0,11,110,0,4,194,0,0,5,1,0,1,0,2,97,0,0,2,3,0,0,2,4,0,0,2,4,0,0,1,3,0,0, 373,0,0,12,90,0,9,209,0,0,1,1,0,1,0,1,3,0,0, 392,0,0,12,0,0,13,215,0,0,3,0,0,1,0,2,1,0,0,2,4,0,0,2,4,0,0, 419,0,0,12,0,0,15,220,0,0,0,0,0,1,0, 434,0,0,13,122,0,4,224,0,0,6,1,0,1,0,2,1,0,0,2,4,0,0,2,4,0,0,2,4,0,0,2,3,0,0,1, 3,0,0, 473,0,0,14,88,0,9,237,0,0,1,1,0,1,0,1,3,0,0, 492,0,0,14,0,0,13,243,0,0,2,0,0,1,0,2,3,0,0,2,4,0,0, 515,0,0,14,0,0,15,248,0,0,0,0,0,1,0, 530,0,0,6,0,0,15,253,0,0,0,0,0,1,0, 545,0,0,15,0,0,30,260,0,0,0,0,0,1,0, 560,0,0,16,0,0,32,280,0,0,0,0,0,1,0, }; #include #include #include #include /* EXEC SQL INCLUDE sqlca.h; */ /* * $Header: sqlca.h,v 1.3 1994/12/12 19:27:27 jbasu Exp $ sqlca.h */ /* Copyright (c) 1985,1986 by Oracle Corporation. */ /* NAME SQLCA : SQL Communications Area. FUNCTION Contains no code. Oracle fills in the SQLCA with status info during the execution of a SQL stmt. NOTES ************************************************************** *** *** *** This file is SOSD. Porters must change the data types *** *** appropriately on their platform. See notes/pcport.doc *** *** for more information. *** *** *** ************************************************************** If the symbol SQLCA_STORAGE_CLASS is defined, then the SQLCA will be defined to have this storage class. For example: #define SQLCA_STORAGE_CLASS extern will define the SQLCA as an extern. If the symbol SQLCA_INIT is defined, then the SQLCA will be statically initialized. Although this is not necessary in order to use the SQLCA, it is a good pgming practice not to have unitialized variables. However, some C compilers/OS's don't allow automatic variables to be init'd in this manner. Therefore, if you are INCLUDE'ing the SQLCA in a place where it would be an automatic AND your C compiler/OS doesn't allow this style of initialization, then SQLCA_INIT should be left undefined -- all others can define SQLCA_INIT if they wish. If the symbol SQLCA_NONE is defined, then the SQLCA variable will not be defined at all. The symbol SQLCA_NONE should not be defined in source modules that have embedded SQL. However, source modules that have no embedded SQL, but need to manipulate a sqlca struct passed in as a parameter, can set the SQLCA_NONE symbol to avoid creation of an extraneous sqlca variable. MODIFIED jbasu 12/12/94 - Bug 217878: note this is an SOSD file losborne 08/11/92 - No sqlca var if SQLCA_NONE macro set Clare 12/06/84 - Ch SQLCA to not be an extern. Clare 10/21/85 - Add initialization. Bradbury 01/05/86 - Only initialize when SQLCA_INIT set Clare 06/12/86 - Add SQLCA_STORAGE_CLASS option. */ #ifndef SQLCA #define SQLCA 1 struct sqlca { /* ub1 */ char sqlcaid[8]; /* b4 */ long sqlabc; /* b4 */ long sqlcode; struct { /* ub2 */ unsigned short sqlerrml; /* ub1 */ char sqlerrmc[70]; } sqlerrm; /* ub1 */ char sqlerrp[8]; /* b4 */ long sqlerrd[6]; /* ub1 */ char sqlwarn[8]; /* ub1 */ char sqlext[8]; }; #ifndef SQLCA_NONE #ifdef SQLCA_STORAGE_CLASS SQLCA_STORAGE_CLASS struct sqlca sqlca #else struct sqlca sqlca #endif #ifdef SQLCA_INIT = { {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '}, sizeof(struct sqlca), 0, { 0, {0}}, {'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0} } #endif ; #endif #endif /* end SQLCA */ typedef char asciz[20]; typedef char vc2_arr[11]; /* EXEC SQL BEGIN DECLARE SECTION; */ /* User-defined type for null-terminated strings */ /* EXEC SQL TYPE asciz IS STRING(20) REFERENCE; */ /* User-defined type for a VARCHAR array element. */ /* EXEC SQL TYPE vc2_arr IS VARCHAR2(11) REFERENCE; */ asciz username; asciz password; char user_pwd[80]; int i; int j; int k; short ind; /* Indicator */ char name[33]; /* Sequence name */ char lddate[32]; /* Load date */ int seqresp_id; /* Sequence of responses identifier */ int resp_nb; /* Response number */ char resp_type; /* Response type */ int resp_id; /* Response identifier */ int unit_in; /* Input units */ int unit_out; /* Output units */ char unitin[81]; /* Input units */ char unitout[81]; /* Output units */ char r_type; /* Response type */ char filter_type[3]; /* Filter type */ int nb_pole; /* Number of poles */ float corner_freq; /* Corner frequency */ float damping_value; /* Damping value */ char type; float r_value; /* Real value */ float i_value; /* Imaginary value */ char poly_type; /* Type of polynomial approximation */ float lower_bound; /* Lower bound */ float upper_bound; /* Upper bound */ float max_error; /* Maximum error */ int nb_coeff; /* Number of coefficients */ int pn_nb; /* Coefficient number */ float pn_value; /* Coefficient value */ int seqfil_id; /* Sequence of filters identifier */ int nb_filter; /* Number of filters */ float gain; /* Gain */ float frequency; /* Frequency */ int filter_nb; /* Filter number */ int filter_id; /* Filter identifier */ float in_sp_rate; /* Input sample rate */ float out_sp_rate; /* Output sample rate */ int offset; /* Decimation offset */ float delay; /* Estimated delay */ float correction; /* Correction applied */ char symmetry; /* Filter symmery */ /* EXEC SQL END DECLARE SECTION; */ long SQLCODE; void sql_error(); /* Handles unrecoverable errors */ /*****************/ /* Main function */ /*****************/ main (argc, argv) int argc; char* argv[]; { /* Test of parameters */ if (argc != 2) { printf ("\n\n filinfo \n\n"); exit (0); } strcpy (name, argv[1]); for (i=0;i