I want to use FTP to write a mainframe workflow. To do this, I can connect to the mainframe via FTP and run the following commands:
QUOTE TYPE E
QUOTE SITE FILETYPE=JES
PUT myjob.jcl
So how can I do this in PowerShell? I read a lot about standard FTP transfers, but I saw nothing about setting up calls for preparation.
Thanks for reading.
EDIT
Here is the solution I came up with for the answer here and in this article :
@echo off
echo user %1> ftpcmd.dat
echo %2>> ftpcmd.dat
echo QUOTE TYPE E>> ftpcmd.dat
echo QUOTE SITE FILETYPE=JES>> ftpcmd.dat
echo put %3>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat %4
del ftpcmd.dat
Using:
C:\>fileup user123 pa$$word myfile.txt ftp.server.com
source
share