Here is an example of masking a file with multiple record types.
So in the file, Emp_data.dat, there are 3 record types.
You need to create a .dm.txt file for each record type. In each .dm.txt file you define how FDM should determine which record is which?
for example in the employee.dm.txt file you see
What is in bold drives this.
It doesn't have to be the first column.
Once this is all done, you have to create or update the connection file .txt file to include the multiple .dm.txt files. When you connect, FDM will show each .dm.txt file as if it is a table.
Note: you do not need to include the Header, and Trailer. All that is required is the DELIM and RECTYPE. Also, FDM doesn't handle spaces well, so if you have a space (for example, First Name) you will want to delete the space or replace it with an underscore.
For automating the process, once the FDM configuration is in place, you can design a Javelin Workflow to check the file location where the .dm.txt files will be placed, and kickoff a masking job, if any files have been added to the directory. Once masking completes, as a post process, Javelin can move/archive the processed files to another directory.