Enabling Data Extraction Options

Use the data extraction options with care.

Warning!  If you set the extraction options, then execute a SELECT statement, and then execute a second SELECT statement without changing the extraction file name, the output of the second SELECT overwrites the output of the first SELECT. Each time you execute a SELECT statement, whether it is one second later or a week later, extraction starts over again, unless the Temp_Extract_Append option is set ON.

The extraction options are set for the connection. If you set the extraction options and another user connects to the database using the same user ID, the extraction facility is also enabled for that user. Your extraction output might be overwritten by another user on the same connection.

Similarly, if another user logs in using the same user ID, the output of queries run by this user is directed to the extraction file until the option is disabled. Run extraction requests using a unique user ID.

  1. In a separate location, save any existing output you need to retain.
  2. Remove any previously used extraction files.
  3. Set the extraction options you require, making sure to set Temp_Extract_Name1 to the file path that is to receive the output.
  4. Issue a SELECT statement to extraction the data you require.
  5. When you finish making extractions, reset Temp_Extract_Name1 to the empty string, or disconnect if set temporarily.
Related reference
Extract Options