| 2234 | // |
| 2235 | |
| 2236 | static void gen_fetch(const act* action) |
| 2237 | { |
| 2238 | SCHAR s[MAX_REF_SIZE]; |
| 2239 | |
| 2240 | const gpre_req* request = action->act_request; |
| 2241 | if (request->req_sync) |
| 2242 | { |
| 2243 | gen_send(action, request->req_sync); |
| 2244 | printa(COLUMN, "IF (SQLCODE .EQ. 0) THEN"); |
| 2245 | } |
| 2246 | |
| 2247 | gen_receive(action, request->req_primary); |
| 2248 | printa(COLUMN, "IF (%s .NE. 0) THEN", gen_name(s, request->req_eof, true)); |
| 2249 | printa(COLUMN, "SQLCODE = 0"); |
| 2250 | |
| 2251 | gpre_nod* var_list = (gpre_nod*) action->act_object; |
| 2252 | if (var_list) |
| 2253 | { |
| 2254 | for (int i = 0; i < var_list->nod_count; i++) { |
| 2255 | asgn_to(action, (const ref*) var_list->nod_arg[i]); |
| 2256 | } |
| 2257 | } |
| 2258 | printa(COLUMN, "ELSE"); |
| 2259 | printa(COLUMN, "SQLCODE = 100"); |
| 2260 | printa(COLUMN, "END IF"); |
| 2261 | |
| 2262 | if (request->req_sync) |
| 2263 | printa(COLUMN, "END IF"); |
| 2264 | } |
| 2265 | |
| 2266 | |
| 2267 | //____________________________________________________________ |
no test coverage detected