| 2598 | // |
| 2599 | |
| 2600 | static void gen_procedure( const act* action, int column) |
| 2601 | { |
| 2602 | ObjectNotImplemented(); |
| 2603 | column += INDENT; |
| 2604 | const gpre_req* request = action->act_request; |
| 2605 | const gpre_port* in_port = request->req_vport; |
| 2606 | const gpre_port* out_port = request->req_primary; |
| 2607 | |
| 2608 | const gpre_dbb* database = request->req_database; |
| 2609 | PAT args; |
| 2610 | args.pat_database = database; |
| 2611 | args.pat_vector1 = status_vector(action); |
| 2612 | args.pat_request = request; |
| 2613 | args.pat_port = in_port; |
| 2614 | args.pat_port2 = out_port; |
| 2615 | const TEXT* pattern; |
| 2616 | if (in_port && in_port->por_length) |
| 2617 | pattern = |
| 2618 | "isc_transact_request (%V1, %RF%DH%RE, %RF%RT%RE, sizeof(%RI), %RI, (short) %PL, (char*) %RF%PI%RE, (short) %QL, (char*) %RF%QI%RE);"; |
| 2619 | else |
| 2620 | pattern = |
| 2621 | "isc_transact_request (%V1, %RF%DH%RE, %RF%RT%RE, sizeof(%RI), %RI, 0, 0, (short) %QL, (char*) %RF%QI%RE);"; |
| 2622 | |
| 2623 | // Get database attach and transaction started |
| 2624 | |
| 2625 | if (gpreGlob.sw_auto) |
| 2626 | t_start_auto(action, 0, status_vector(action), column, true); |
| 2627 | |
| 2628 | // Move in input values |
| 2629 | |
| 2630 | asgn_from(action, request->req_values, column); |
| 2631 | |
| 2632 | // Execute the procedure |
| 2633 | |
| 2634 | PATTERN_expand((USHORT) column, pattern, &args); |
| 2635 | |
| 2636 | set_sqlcode(action, column); |
| 2637 | |
| 2638 | printa(column, "if (!SQLCODE)"); |
| 2639 | column += INDENT; |
| 2640 | begin(column); |
| 2641 | |
| 2642 | // Move out output values |
| 2643 | |
| 2644 | asgn_to_proc(request->req_references, column); |
| 2645 | endp(column); |
| 2646 | } |
| 2647 | |
| 2648 | |
| 2649 | //____________________________________________________________ |
no test coverage detected