Focal Point
[CLOSED] File Listener

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1877067986

March 27, 2018, 04:16 PM
srajeevan
[CLOSED] File Listener
Hi,

I am using File Listener to get some csv files at a particular folder location and load those to a target table.
It is successful and i use SOURCE_FILE_NAME as an INSTANCE to get the source file name in the target table.
So when i use this dataflow in my process flow,how can i grab the source file name.?
I need to include the source file name in a procedure to store the log regarding each dataflow.
Can i grab the SOURCE_FILE name out of data_flow.?

This message has been edited. Last edited by: FP Mod Chuck,


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
March 30, 2018, 02:27 PM
FP Mod Chuck
Srajeevan

After the data flow completes you can have a stored procedure that reads that column out of the target table, hold the results and then do a -READFILE of the hold file into a variable and then reference the variable in your procedure.


TABLE FILE TARGET_TABLE
PRINT SOURCE_FILE_NAME
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS SOURCE_FILE_NAME FORMAT ALPHA
END
-RUN
-READFILE SOURCE_FILE
-RUN
-SET &&SOURCE_FILE_NAME = &SOURCE_FILE_NAME;


Using a global variable so it will be available in your subsequent procedure.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
April 02, 2018, 10:58 AM
srajeevan
Hi Chuck,

I will try the solution you provided and then close the post as solved.

Thanks again
Sreejith


WF8206,Windows 7,8,10
HTM,PDF,EXCEL