FTP an iSeries Physical File in CSV format

Looking for an example project to get you started?

FTP an iSeries Physical File in CSV format

Postby Support_Julie » Wed Jun 17, 2009 4:17 pm

FTP an iSeries Physical File in CSV format

This project will convert a Physical file into a comma delimited CSV file, then FTP to your trading partner.
The physical file should be converted to something like a CSV file so that the receiving server will be able to read it.

In this example, we use of the iSeries CPYTOIMPF command.

Code: Select all
<project name="Physical File CSV FTP" mainModule="Main" version="1.0" logLevel="debug">
   <description>convert a Physical file into a comma delimited CSV file, then FTP.</description>

   <module name="Main">

      <createWorkspace />


      <exec400 resourceId="DEV 54">
         <command>
            <![CDATA[CPYTOIMPF FROMFILE(SURVEYOR/DEMO) TOSTMF('${system.job.workspace}/FILE.CSV') STMFCODPAG(*PCASCII) RCDDLM(*CRLF)]]>
         </command>
      </exec400>


      <ftp resourceId="Dev 54">
         <put sourceFile="FILE.CSV" destinationFile="/demo/MYFILE.csv" type="auto" />
      </ftp>


      <deleteWorkspace />

   </module>

</project>

Julie
Software Support
Linoma Software
Support_Julie
Support Specialist
 
Posts: 78
Joined: Thu Mar 05, 2009 3:49 pm
Location: Ashland, NE USA

Return to Example Projects

Who is online

Users browsing this forum: No registered users and 1 guest