55{
57#line 23 "variable.pgc"
59
60#line 23 "variable.pgc"
61 short age ;
62 } ;
63#line 23 "variable.pgc"
64
65
66
67
68
69
70
71
72
73
74
75
76
77#line 27 "variable.pgc"
79#line 25 "variable.pgc"
81
82#line 26 "variable.pgc"
85
86#line 30 "variable.pgc"
88#line 28 "variable.pgc"
90
91#line 29 "variable.pgc"
94
95#line 31 "variable.pgc"
98#line 32 "variable.pgc"
101#line 32 "variable.pgc"
103 } ;
104#line 33 "variable.pgc"
106
107#line 34 "variable.pgc"
108 static int i1 , i2 ,
i3 ;
109
110#line 35 "variable.pgc"
111
112
113
114#line 37 "variable.pgc"
116
117#line 37 "variable.pgc"
118
119
120#line 38 "variable.pgc"
122
123#line 38 "variable.pgc"
124
125
126#line 39 "variable.pgc"
128
129#line 39 "variable.pgc"
130
132 char msg[128];
133
135
138#line 46 "variable.pgc"
139
141#line 46 "variable.pgc"
142
143
146#line 49 "variable.pgc"
147
149#line 49 "variable.pgc"
150
151
153 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer )",
ECPGt_EOIT,
ECPGt_EORT);
154#line 52 "variable.pgc"
155
157#line 52 "variable.pgc"
158
159
161 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 )",
ECPGt_EOIT,
ECPGt_EORT);
162#line 55 "variable.pgc"
163
165#line 55 "variable.pgc"
166
167 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 )",
ECPGt_EOIT,
ECPGt_EORT);
168#line 56 "variable.pgc"
169
171#line 56 "variable.pgc"
172
173 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into family ( name , age ) values ( 'Child 1' , 16 )",
ECPGt_EOIT,
ECPGt_EORT);
174#line 57 "variable.pgc"
175
177#line 57 "variable.pgc"
178
179 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into family ( name , age ) values ( 'Child 2' , 14 )",
ECPGt_EOIT,
ECPGt_EORT);
180#line 58 "variable.pgc"
181
183#line 58 "variable.pgc"
184
185 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into family ( name , age ) values ( 'Child 3' , 9 )",
ECPGt_EOIT,
ECPGt_EORT);
186#line 59 "variable.pgc"
187
189#line 59 "variable.pgc"
190
191
194#line 62 "variable.pgc"
195
197#line 62 "variable.pgc"
198
199
201 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"declare cur cursor for select name , born , age , married , children from family",
ECPGt_EOIT,
ECPGt_EORT);
202#line 65 "variable.pgc"
203
205#line 65 "variable.pgc"
206
207
208
209#line 67 "variable.pgc"
210
211
228#line 74 "variable.pgc"
229
231#line 74 "variable.pgc"
232
234#line 74 "variable.pgc"
235
237 if (
i->ind_birth.born >= 0)
239 if (
i->ind_birth.age >= 0)
246
249 }
250
253#line 91 "variable.pgc"
254
256#line 91 "variable.pgc"
257
258
261#line 94 "variable.pgc"
262
264#line 94 "variable.pgc"
265
266
269#line 97 "variable.pgc"
270
272#line 97 "variable.pgc"
273
274
275 strcpy(msg,
"disconnect");
277#line 100 "variable.pgc"
278
280#line 100 "variable.pgc"
281
282
283
286 printf(
"%d %d %d %d %d %d\n",
289
290 return 0;
291}
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)