Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.
Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer and Intelligence Suite.
SOLVED

Automate pull of flat file from mainframe using FTP

poles1c
8 - Asteroid

Hi,

 

I am trying to automate they pull of a flat file from a mainframe (not a website) using FTP and I am running into this error:

 

Error: Run Command (1): The external program "C:\Users\cpoles\Desktop\pull_ahead\alteryxpull.bat" returned an error code: 2

 

Here is the article I have been using (hoping I could reverse the process ) as a guide.

 

What I have done so far:

 

  • Created a .bat file with the Alteryx command and the file name of the script I wrote:
    • 1.jpg
  • Here is the text of my script
     ftp
     open host.name
     username
    password
    cd..
    cd AAPLT28
    cd GDIAOPA
     cd I85##
    cd CMMS51IA
    ascii
     lcd c:\temp
    get BRIG26H I85##
    bye
    exit
  •  Here is how I have configured my run command tool:
  • 2.PNG

I have searched the Alteryx community site for help but all the articles out there give instructions for an FTP pull that comes from a website not a mainframe. Any help you could provide would be much appreciated.

 

Thanks!

 

Courtney

2 REPLIES 2
poles1c
8 - Asteroid

I just fixed my problem:

 

1) my .txt script

  • I removed ftp
  •  I put a space in between my cd ..

 

2) Changed the configuration of the run command tool:

 

Run External Program:

  • Command: full path of your .bat file
  • Working Directory: directory where both your .bat and script.txt files exist
    • makes sure commands are initated from the directory where both of my files are housed

Read Results:

  • Read results: full path of a "dummy file" needed in order for the tool to run

 

 

 

poles1c
8 - Asteroid

PictureCapture.PNG

Labels