FTP to Mainframe (Z/OS)

Discuss RoboTask here
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: FTP to Mainframe (Z/OS)

Post by Oleg »

when I use native FTP on my Windows PC I use the following PUT statement and this works fine:
put "C:\Data\Edison\14022020.xml" "'CG061.SMD935'"
The second parameter in command PUT is a new file name (not a folder)
you can write
put "C:\Data\Edison\14022020.xml"
and FTP utility uploads file with same name into current folder.

Thus, you have to upload you file to current folder and rename it.
Look at my example:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1163085779
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1329"
Hide=INTEGER|0
ID=INTEGER|-696558789
LogOnAsUser=INTEGER|1
Name=STRING|"Upload and rename file"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"FTP Log On"
Params=FOLDER

[Actions\Action1\Params]
anonymous=STRING|"1"
host=STRING|"localhost"
passive=STRING|"0"
password=STRING|"42310383162884337286400984055142142"
port=STRING|"21"
proxykind=STRING|"0"
useproxy=STRING|"0"
username=STRING|"anonymous"

[Actions\Action2]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FILENAME"" with value ""C:\Data\Edison\14022020.xml"""
Params=FOLDER

[Actions\Action2\Params]
expand=STRING|"0"
varname=STRING|"FILENAME"
varvalue=STRING|"C:\Data\Edison\14022020.xml"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NEWFILENAME"" with value ""CG061.SMD935"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"NEWFILENAME"
varvalue=STRING|"CG061.SMD935"

[Actions\Action4]
ActionID=STRING|"A_FTP_UPLOAD"
Enabled=INTEGER|-1
Name=STRING|"FTP Upload"
Params=FOLDER

[Actions\Action4\Params]
file=STRING|"D:\TEST\threads\Win32\Debug\uTread.dcu"
folder=STRING|"./"

[Actions\Action5]
ActionID=STRING|"A_FTP_DELETEFILE"
Enabled=INTEGER|-1
Name=STRING|"FTP Delete File"
Params=FOLDER

[Actions\Action5\Params]
file=STRING|"{newfilename}"

[Actions\Action6]
ActionID=STRING|"A_FTP_RENAMEFILE"
Enabled=INTEGER|-1
Name=STRING|"FTP Rename File"
Params=FOLDER

[Actions\Action6\Params]
file=STRING|"{ExtractFileName({filename})}"
newfile=STRING|"{NewFilename}"

Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Oleg Yershov
Post Reply