ESQL/C does not support the UNLOAD command. How can I duplicate this functionality in ESQL/C?
Write an ESQL/C program along the lines of this one:
strcpy (select_string, "SELECT field1, field2, ...FROM tablename WHERE ....") $PREPARE my_statement from select_string; $DECLARE my_cursor CURSOR for my_statement; while () { $FETCH my_cursor INTO variable1, variable2....; if ( sqlca.sqlcode != 0 ) { $CLOSE my_cursor; $FREE my_cursor; break; } frprintf (stdout, "%s|%s|%s.... ", variable1, variable2....); }
Of course, you have to specify the select statement and declare and arrange the variables correctly, but this can allow you to achieve the needed functionality.