In my workflow, I have created a field which is a concatenation of the file name and a date/time stamp (datetime() converted to a string). This new "file" field is used to name the output file. I am attempting to output to a fixed width flat file where each field begins in the appropriate position. The fixed width text file is getting created correctly and placed in the appropriate network folder, however, I'm also getting a 2nd file with the same name, but .flat extension. See information below. Why is this second file getting created and placed in the same network folder and what do I need to change to stop it?
<flatfile version="1">
<file
path="\\crebsfs\cr_ebs_apps_model\omniflow\masterfiles\jegl\applicationcodesourcecodeapprovermaster\app_source_approver_master_20171031154559.txt"
eoltype="crlf"
/>
<fields>
<field name="ApplicationArea" type="V_String" length="2"/>
<field name="SourceCode" type="V_String" length="3"/>
<field name="EmpID" type="V_String" length="9"/>
<field name="NotUsed" type="V_String" length="2"/>
<field name="First_Name" type="V_String" length="100"/>
<field name="Last_Name" type="V_String" length="100"/>
</fields>
</flatfile>
Solved! Go to Solution.
@mschmeiser, my guess is that you have flat selected as the file type in your output tool. That second file is used to tell the system you would feed a flat file into how to process the file.
Change it to a CSV and if you don’t want your data delimited, use \0. There’s also an option to not output headers.
Hope this help!
Jimmy
Yes, that is correct. I tried the .csv with \0 as the delimiter, however, the column sizes did not stay intact. By that I mean, that the data was condensed together and the positional formats were not kept. I need each column to be placed in a particular position based on the size of the columns. That is why I chose flat.
Schmeiser, Marliese | Lead Financial Systems Acctng Analyst, CFO Finance Controllership
Hi @mschmeiser,
I see. A flat file would certainly be the easiest output option for this, but if that extra file is causing issues with your process, download the attached workflow for a possible workaround. Basically, I'm padding spaces to the right side of the value equal to the column size requirements.
For comparison, I also outputted the same data as a flat file type. The two files were identical.
Hope this helps!
Best,
Jimmy
Thank you! That worked.