Keri Taylor

[Q] Help with FTP/GEL - text tab delimited file

Discussion created by Keri Taylor on Apr 18, 2011
Latest reply on May 11, 2011 by Chris_Hackett
I need some help. I am trying to create a text tab delimited file output. So i just used " " instead of "," not sure if this is correct and i can't find any examples...

My code: snip
                     .....

<gel:parameter default="c:/temp/" var="filePath"/>

<gel:parameter default="TimeData.txt" var="fileName"/>

<gel:formatDate format="yyyy-MM-ddHH-mm" stringVar="rundate"/>



<sql:query>
                     ....
                     ....

</sql:query>
<!-- Build each item to be put as variable so it can be printed to a file-->

<core:forEach indexVar="j" items="${results.rows}" var="row">


<core:set value="${row.get('System_ID')}" var="systemid"/>


<core:set value="${row.get('Ceridian_ID')}" var="ceridianid"/>


<core:set value="${row.get('WBS_Element')}" var="wbselement"/>


<core:set value="${row.get('Work_Date')}" var="workdate"/>


<core:set value="${row.get('Hours')}" var="hours"/>
 

<!-- Print lines to a file-->

<core:catch var="filerrcreate">


<file:writeFile delimiter=" " embedded="false" fileName="${filePath}\${rundate}${fileName}">



<file:line>




<file:column value="${systemid}"/>




<file:column value="${ceridianid}"/>




<file:column value="${wbselement}"/>




<file:column value="${workdate}"/>




<file:column value="${hours}"/>



</file:line>


</file:writeFile>

</core:catch>

</core:forEach>
<!-- FTP operations --> 




<ftp:open hostName="${hostName}" port="${port}" user="${ftpUser}" password="${ftpPass}">
    
    <ftp:put fileName="${rundate}${fileName}" localDir="${localDir}" remoteDir="{$remoteDir}"/>

</ftp:open>
results and desired results attached

Additionally, it doesn't complete when sending to the ftp server, meaning in the console, it never quits.
So in the console, it never returns to the C:\xogclient\bin>

Any ideas? Any help would be greatly Appreciated!!!!!!!!


Keri

Outcomes