FETCH statement
Parameters
- &FILE
- The name of the SQL file.
- FROM
- Is available for readability.
The FETCH statement retrieves rows from the open cursor and places the data into the file's data area. If there is no cursor associated with the file, the cursor previously selected is re-opened. If no cursor was previously selected, then a default cursor for all fields FROM &table is opened.
FETCH cannot be used in a SORT or REPORT procedure. The FETCH cannot reference an automatic input file in the same JOB activity.
Example
FETCH FILEIN