| 2319 | // |
| 2320 | |
| 2321 | static void gen_for(const act* action) |
| 2322 | { |
| 2323 | gen_s_start(action); |
| 2324 | gpre_req* request = action->act_request; |
| 2325 | request->req_top_label = next_label(); |
| 2326 | request->req_btm_label = next_label(); |
| 2327 | if (action->act_error || (action->act_flags & ACT_sql)) |
| 2328 | printa(COLUMN, "IF (ISC_STATUS(2) .NE. 0) GOTO %d\n", request->req_btm_label); |
| 2329 | |
| 2330 | printa("", "%-6dCONTINUE", request->req_top_label); |
| 2331 | |
| 2332 | SCHAR s[MAX_REF_SIZE]; |
| 2333 | gen_receive(action, request->req_primary); |
| 2334 | if (action->act_error || (action->act_flags & ACT_sql)) |
| 2335 | printa(COLUMN, "IF (%s .EQ. 0 .OR. ISC_STATUS(2) .NE. 0) GOTO %d\n", |
| 2336 | gen_name(s, request->req_eof, true), request->req_btm_label); |
| 2337 | else |
| 2338 | printa(COLUMN, "IF (%s .EQ. 0) GOTO %d\n", |
| 2339 | gen_name(s, request->req_eof, true), request->req_btm_label); |
| 2340 | |
| 2341 | const gpre_port* port = action->act_request->req_primary; |
| 2342 | if (port) |
| 2343 | { |
| 2344 | for (const ref* reference = port->por_references; reference; reference = reference->ref_next) |
| 2345 | { |
| 2346 | if (reference->ref_flags & REF_fetch_array) |
| 2347 | gen_get_or_put_slice(action, reference, true); |
| 2348 | } |
| 2349 | } |
| 2350 | } |
| 2351 | |
| 2352 | |
| 2353 | //____________________________________________________________ |
no test coverage detected