/* 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[15];
};
static struct sqlcxp sqlfpn =
{
14,
"insert_data.pc"
};
static unsigned long sqlctx = 1242499;
static struct sqlexd {
unsigned int sqlvsn;
unsigned int arrsiz;
unsigned int iters;
unsigned int offset;
unsigned short selerr;
unsigned short sqlety;
unsigned int occurs;
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[10];
unsigned int sqhstl[10];
int sqhsts[10];
void *sqindv[10];
int sqinds[10];
unsigned int sqharm[10];
unsigned int *sqharc[10];
unsigned short sqadto[10];
unsigned short sqtdso[10];
} sqlstm = {10,10};
/* 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 *sq0038 =
"select * from TABLE_COMMODITY where BAR_CODE=:b0 ";
static char *sq0039 =
"select * from TABLE_COMMODITY where COMMODITY_NAME=:b0 ";
static char *sq0040 =
"select * from TABLE_COMMODITY where BAR_CODE=:b0 ";
static char *sq0041 =
"select * from TABLE_SELL where (SELL_DATE>=to_date(:b0,'yyyymmdd ') and SE\
LL_DATE<=to_date(:b1,'yyyymmdd ')) ";
static char *sq0042 =
"select * from TABLE_SELL where EMPLOYEE_ID=:b0 ";
static char *sq0043 =
"select * from TABLE_SELL_LIST where SELL_ID=:b0 ";
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,20,0,0,4,4,0,1,0,1,97,0,0,1,97,0,0,1,10,0,0,1,10,0,0,
36,0,0,2,51,0,1,25,0,0,0,0,0,1,0,
51,0,0,3,56,0,1,27,0,0,0,0,0,1,0,
66,0,0,4,58,0,1,30,0,0,0,0,0,1,0,
81,0,0,5,46,0,1,33,0,0,0,0,0,1,0,
96,0,0,6,45,0,1,35,0,0,0,0,0,1,0,
111,0,0,7,41,0,1,37,0,0,0,0,0,1,0,
126,0,0,8,46,0,1,39,0,0,0,0,0,1,0,
141,0,0,9,26,0,1,40,0,0,0,0,0,1,0,
156,0,0,10,28,0,1,41,0,0,0,0,0,1,0,
171,0,0,11,27,0,1,42,0,0,0,0,0,1,0,
186,0,0,12,25,0,1,43,0,0,0,0,0,1,0,
201,0,0,13,30,0,1,44,0,0,0,0,0,1,0,
216,0,0,14,22,0,1,45,0,0,0,0,0,1,0,
231,0,0,15,27,0,1,46,0,0,0,0,0,1,0,
246,0,0,16,0,0,29,47,0,0,0,0,0,1,0,
261,0,0,17,0,0,17,52,0,0,1,1,0,1,0,1,97,0,0,
280,0,0,17,0,0,21,53,0,0,6,6,0,1,0,1,97,0,0,1,97,0,0,1,97,0,0,1,3,0,0,1,3,0,0,
1,97,0,0,
319,0,0,18,0,0,29,54,0,0,0,0,0,1,0,
334,0,0,19,86,0,4,63,0,0,7,1,0,1,0,2,97,0,0,2,97,0,0,2,97,0,0,2,3,0,0,2,3,0,0,
2,97,0,0,1,97,0,0,
377,0,0,20,69,0,4,111,0,0,2,1,0,1,0,2,3,0,0,1,97,0,0,
400,0,0,21,63,0,5,113,0,0,2,2,0,1,0,1,3,0,0,1,97,0,0,
423,0,0,22,0,0,29,114,0,0,0,0,0,1,0,
438,0,0,23,116,0,5,119,0,0,5,5,0,1,0,1,97,0,0,1,97,0,0,1,3,0,0,1,97,0,0,1,97,0,
0,
473,0,0,24,0,0,29,121,0,0,0,0,0,1,0,
488,0,0,25,156,0,5,125,0,0,9,9,0,1,0,1,97,0,0,1,97,0,0,1,97,0,0,1,4,0,0,1,4,0,
0,1,3,0,0,1,4,0,0,1,3,0,0,1,97,0,0,
539,0,0,26,0,0,29,128,0,0,0,0,0,1,0,
554,0,0,27,64,0,5,135,0,0,2,2,0,1,0,1,3,0,0,1,97,0,0,
577,0,0,28,0,0,29,136,0,0,0,0,0,1,0,
592,0,0,17,0,0,17,143,0,0,1,1,0,1,0,1,97,0,0,
611,0,0,17,0,0,21,144,0,0,9,9,0,1,0,1,3,0,0,1,97,0,0,1,97,0,0,1,97,0,0,1,4,0,0,
1,4,0,0,1,4,0,0,1,4,0,0,1,3,0,0,
662,0,0,29,0,0,29,146,0,0,0,0,0,1,0,
677,0,0,17,0,0,17,153,0,0,1,1,0,1,0,1,97,0,0,
696,0,0,17,0,0,21,154,0,0,5,5,0,1,0,1,3,0,0,1,97,0,0,1,3,0,0,1,3,0,0,1,4,0,0,
731,0,0,30,0,0,29,156,0,0,0,0,0,1,0,
746,0,0,31,49,0,4,161,0,0,1,0,0,1,0,2,97,0,0,
765,0,0,32,48,0,4,169,0,0,1,0,0,1,0,2,3,0,0,
784,0,0,33,50,0,4,175,0,0,1,0,0,1,0,2,3,0,0,
803,0,0,34,50,0,4,181,0,0,1,0,0,1,0,2,3,0,0,
822,0,0,35,51,0,4,187,0,0,1,0,0,1,0,2,3,0,0,
841,0,0,36,53,0,4,193,0,0,1,0,0,1,0,2,3,0,0,
860,0,0,37,86,0,4,201,0,0,7,1,0,1,0,2,97,0,0,2,97,0,0,2,97,0,0,2,3,0,0,2,3,0,0,
2,97,0,0,1,97,0,0,
903,0,0,38,60,0,9,244,0,0,1,1,0,1,0,1,97,0,0,
922,0,0,38,0,0,13,246,0,0,10,0,0,1,0,2,3,0,0,2,97,0,0,2,97,0,0,2,97,0,0,2,97,0,
0,2,4,0,0,2,4,0,0,2,3,0,0,2,4,0,0,2,3,0,0,
977,0,0,38,0,0,15,251,0,0,0,0,0,1,0,
992,0,0,38,0,0,15,256,0,0,0,0,0,1,0,
1007,0,0,39,66,0,9,271,0,0,1,1,0,1,0,1,97,0,0,
1026,0,0,39,0,0,13,273,0,0,10,0,0,1,0,2,3,0,0,2,97,0,0,2,97,0,0,2,97,0,0,2,97,
0,0,2,4,0,0,2,4,0,0,2,3,0,0,2,4,0,0,2,3,0,0,
1081,0,0,39,0,0,15,282,0,0,0,0,0,1,0,
1096,0,0,39,0,0,15,299,0,0,0,0,0,1,0,
1111,0,0,40,60,0,9,328,0,0,1,1,0,1,0,1,97,0,0,
1130,0,0,40,0,0,13,332,0,0,10,0,0,1,0,2,3,0,0,2,97,0,0,2,97,0,0,2,97,0,0,2,97,
0,0,2,4,0,0,2,4,0,0,2,3,0,0,2,4,0,0,2,3,0,0,
1185,0,0,40,0,0,15,365,0,0,0,0,0,1,0,
1200,0,0,41,120,0,9,392,0,0,2,2,0,1,0,1,97,0,0,1,97,0,0,
1223,0,0,41,0,0,13,396,0,0,9,0,0,1,0,2,3,0,0,2,97,0,0,2,97,0,0,2,97,0,0,2,4,0,
0,2,4,0,0,2,4,0,0,2,4,0,0,2,3,0,0,
1274,0,0,41,0,0,15,409,0,0,0,0,0,1,0,
1289,0,0,42,58,0,9,423,0,0,1,1,0,1,0,1,97,0,0,
1308,0,0,42,0,0,13,427,0,0,9,0,0,1,0,2,3,0,0,2,97,0,0,2,97,0,0,2,97,0,0,2,4,0,
0,2,4,0,0,2,4,0,0,2,4,0,0,2,3,0,0,
1359,0,0,42,0,0,15,440,0,0,0,0,0,1,0,
1374,0,0,43,59,0,9,453,0,0,1,1,0,1,0,1,97,0,0,
1393,0,0,43,0,0,13,457,0,0,5,0,0,1,0,2,3,0,0,2,97,0,0,2,3,0,0,2,3,0,0,2,4,0,0,
1428,0,0,43,0,0,15,467,0,0,0,0,0,1,0,
1443,0,0,44,47,0,2,473,0,0,1,1,0,1,0,1,3,0,0,
1462,0,0,45,0,0,29,474,0,0,0,0,0,1,0,
1477,0,0,46,48,0,2,479,0,0,1,1,0,1,0,1,97,0,0,
1496,0,0,47,0,0,29,480,0,0,0,0,0,1,0,
1511,0,0,48,0,0,32,568,0,0,0,0,0,1,0,
1526,0,0,49,0,0,30,574,0,0,0,0,0,1,0,
};
#include "control_db.h"
/* EXEC SQL BEGIN DECLARE SECTION; */
/* varchar username[20]; */
struct { unsigned short len; unsigned char arr[20]; } username;
/* varchar password[20]; */
struct { unsigned short len; unsigned char arr[20]; } password;
/* EXEC SQL END DECLARE SECTION; */
/* EXEC SQL INCLUDE SQLCA;
*/
/*
* $Header: sqlca.h,v 1.3 1994/12/12 19:27:27 jbasu Exp $ sqlca.h
*/
/* Copyright (c) 1985,1986, 1998 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. ***
***