June 27, 2006, 12:00 PM
Christinejoin sql passthrough files
I am trying to join a saved sql passthrough file to another file and I keep getting this error
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: FADOO6SQ
The file exists because I can print it but when I save it I can't do a join. here is the code.
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS FAD006SQ FORMAT ALPHA
END
Any help greatly appreciated.
June 27, 2006, 12:17 PM
KevinGChristine,
By default, HOLD files are saved in the WF agent temp directory. They are available to that report for the duration of your session with that agent. Check into FILEDEF, which looks something like this;
FILEDEF holdname disk C:\ibi\baseapp
You should be able to JOIN within the same fex with out the FILEDEF.
Kevin
June 27, 2006, 12:22 PM
LeahBy 'save' do you mean you say 'on table save as' to create a flat file. If the file is saved not held, you would need to tell FOCUS what the master file definition was. The HOLD option generates the MFD for you temporarily so you can do the joins. So I guess it's a matter of what you're trying to do with the output of the SQL passthrough. Does it need to be 'saved' or just 'held' to do further reporting and you are finished with it when the report has run.
June 28, 2006, 10:41 AM
TexasStingrayChristine
It soulds like you are doing you process as a multiple step process. Can you do you process as a one step.
SQL.....
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS FAD006SQ_1 FORMAT ALPHA
END
SQL....
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS FAD006SQ_2 FORMAT ALPHA
END
JOIN ... IN FAD006SQ_1 TO ... IN FAD006SQ_2 AS Jx
If you cannot then try using APP HOLD xxx where xxx is the directory you want the DATA FILE and the MASTER FILE stored in then you will have to issue FILEDEF commands to both files so WebFOCUS can find the data and the xxx path will have to be your the app path.
Hope this helps