Flat File Import/Export
Posted in 1999
Topics: Stored Procedures & SPL
Hello, I've got a whole load of stored procedures in Oracle (for producing report files, bringing in data, and putting out data); and I'm using the Oracle library UTL_FILE, as follows: -- Open files for read and write UTL_FILE.FOPEN(v_filedir, v_infile, 'r'); UTL_FILE.FOPEN(v_filedir, v_outfile, 'w'); -- Write to file UTL_FILE.GET_LINE(v_infile,v_data); UTL_FILE.PUT(v_outfile,v_data); -- Close file UTL_FILE.FCLOSE(v_infile); UTL_FILE.FCLOSE(v_outfile); (This example, is of course simplified; I usually look up items in infile, and modify outfile, or write records from infile into the database.) A simple import/export won't work (For example, I want to reject records that don't have a parent key, to the reject file for reprocessing). Any hints on how to do this in Informix? Unfortunately, we don't own Informix but several of our customers do, and I'd like to 1) let them use the new code (we're converting programs from COBOL), and 2) write routines that are cross-platform (IF v_db_informix THEN...). I'll be asking the same question re: SQL Server. If you can help (thanks thanks thanks!) answer here, or modify my return address, or mail me at fheald (at) telenomics com). Thanks!