Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple FTP commands in command line 1

Status
Not open for further replies.

dennysthemenace

Technical User
Jun 20, 2004
28
0
0
US
Hi

I am trying to pass multiple aruguments in the FTP site command and TX is taking only the first command, 'pri=25' and ignores the rest. In the DOS prompt, I can use literal or quote to pass multiple commands, but that doesn't work in TX. Is there a way to pass multiple arguments for a command? Below is the command I used. Thanks a lot.

=PUT("FTP","-URL FTP://ftpuser:mypassword@sourceftpserver/mainframe"+blob:FTP_MF+".txt"+"-site 'pri =25' 'cyl' -TV "+ "FTP_Trace_"+blob:FTP_MF+".txt" ,package(MF_In))
 
I have found the easiest way is to have a dummy map with one input card and one output card and pass the parameters to that.
for example

valid(run("ftpadapter",echoin(1,newclasaccs ) + " -OAFTP1R3:5 '-AUDIT+ -PT -T+ -URL ftp://" + User:Seq:ElemDecl System:Seq Comp:Wrapper:ElemDecl ftpParams Element:ftpparameters + ":" + Pword:Seq:ElemDecl System:Seq Comp:Wrapper:ElemDecl ftpParams Element:ftpparameters + "@" + IPadd:Seq:ElemDecl System:Seq Comp:Wrapper:ElemDecl ftpParams Element:ftpparameters + "/" + Destination:Seq:ElemDecl System:Seq Comp:Wrapper:ElemDecl ftpParams Element:ftpparameters + ";type=ASCII+"
+ " -MKD'"),

All the variables are read in as a properties file to the top level map. This saves any hard coding of parameters in the map.
 
In your example you need the single quote before the -URL.
=PUT("FTP","'-URL FTP://ftpuser:mypassword@sourceftpserver/mainframe"+blob:FTP_MF+".txt"+"-site pri =25 cyl -TV "+ "FTP_Trace_"+blob:FTP_MF+".txt'" ,package(MF_In))

I think that's right but can't test it.
 
Hi Janhes

I tried second method already and it doesnt work. I will try the first method and see if it works. Thanks a million for your reply.
 
There was a space missing from before the -site.

=PUT("FTP","'-URL <FTP://ftpuser:mypassword@sourceftpserver/mainframe>"+blob:FTP_MF+".txt"+" -site pri =25 cyl -TV "+ "FTP_Trace_"+blob:FTP_MF+".txt'" ,package(MF_In))
 
I tested with that space before -site, but still it is taking only pri=25 and ignoring the rest. Even in command line, site cannot handle multiple arguments and I used literal or quote to pass multiple arguments. Is there a way I can use literal or quote in DSTX?
 
According to the documentation the -site parameters shoult be in single quotes.
=PUT("FTP","'-URL <<FTP://ftpuser:mypassword@sourceftpserver/mainframe>>"+blob:FTP_MF+".txt"+" -site 'pri =25 cyl' -TV "+ "FTP_Trace_"+blob:FTP_MF+".txt'" ,package(MF_In))
 
I tried having ' before arguments, but that did not work. Initially I followed the documentation and it failed.
 
Is your problem due to the space between 25 and cyl?
 
I think the problem is site command by itself can handle only one argument. I tried various combinations, with quotes, spaces and without them too, but I always see only the first argument in the trace and only that command is executed in mainframe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top