ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to use FTP Commands SITE and QUOTE

Post new topic  Reply to topic Goto page 1, 2  Next
 How to use FTP Commands SITE and QUOTE « View previous topic :: View next topic » 
Author Message
$ureshWMB
PostPosted: Tue Feb 17, 2015 10:34 pm    Post subject: How to use FTP Commands SITE and QUOTE Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

Hi every one.

I need to execute two FTP commands with fields(SITE and QUOTE) every time when we place a file.
What is the syntax for this two commands.. I have tried in the same as other commands

SET OutputLocalEnvironment.Destination.File.Remote.Precommand[1].CD = '/XX/XX';
SET OutputLocalEnvironment.Destination.File.Remote.Precommand[2].SITE = 'NAMEFMT 1';

While debugging I am getting FTP protocol error at second command.

How to run these commands?

Thanks In Advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 18, 2015 5:15 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
$ureshWMB
PostPosted: Sun Feb 22, 2015 9:31 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

fjb_saper wrote:
Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...


Thank you saper.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23790_.htm

here we have two fields QUOTE and SITE.
I have tried with possible syntax for the above fields.
Can you please suggest how to use those two fields in ESQL?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 23, 2015 5:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

$ureshWMB wrote:
fjb_saper wrote:
Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...


Thank you saper.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23790_.htm

here we have two fields QUOTE and SITE.
I have tried with possible syntax for the above fields.
Can you please suggest how to use those two fields in ESQL?

I thought the infocenter was pretty clear... What have you tried so far and to what effect?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
$ureshWMB
PostPosted: Mon Feb 23, 2015 6:03 am    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

fjb_saper wrote:
$ureshWMB wrote:
fjb_saper wrote:
Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...


Thank you saper.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23790_.htm


here we have two fields QUOTE and SITE.
I have tried with possible syntax for the above fields.
Can you please suggest how to use those two fields in ESQL?

I thought the infocenter was pretty clear... What have you tried so far and to what effect?



I have tried with below syntax and getting FTP protocol exception.

SET OutputLocalEnvironment.Destination.File.Remote.Precommand[2].SITE = 'NAMEFMT 1';
SET OutputLocalEnvironment.Destination.File.Remote.Precommand[3].QUOTE = 'TYPE C 850';

Sequence of nodes :

MQInput--->Compute node(ALL)--->Fileoutput node


Text:CHARACTER:FTP protocol exception
Insert
Type:INTEGER:5
Text:CHARACTER:FTP
Insert
Type:INTEGER:5
Text:CHARACTER:SITE
Insert
Type:INTEGER:5
Text:CHARACTER:FTP protocol error
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 23, 2015 6:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

[quote="$ureshWMB"][quote="fjb_saper"]
$ureshWMB wrote:
fjb_saper wrote:
Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...


Thank you saper.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23790_.htm

I have tried with below syntax and getting FTP protocol exception.

SET OutputLocalEnvironment.Destination.File.Remote.Precommand[2].SITE = 'NAMEFMT 1';
SET OutputLocalEnvironment.Destination.File.Remote.Precommand[3].QUOTE = 'TYPE C 850';

Sequence of nodes :

MQInput--->Compute node(ALL)--->Fileoutput node


Text:CHARACTER:FTP protocol exception
Insert
Type:INTEGER:5
Text:CHARACTER:FTP
Insert
Type:INTEGER:5
Text:CHARACTER:SITE
Insert
Type:INTEGER:5
Text:CHARACTER:FTP protocol error

Looks to me you need to review the first 2 links.

Just to give us the right information... if you do run the ftp manually what do your quote and site commands look like? Does it work in a non IIB environment? Are you connecting to a mainframe?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
$ureshWMB
PostPosted: Mon Feb 23, 2015 8:35 am    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

[quote="fjb_saper"][quote="$ureshWMB"]
fjb_saper wrote:
$ureshWMB wrote:
fjb_saper wrote:
Have you looked up the ftp quote command?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_53/rzaiq/rzaiqclientsu.htm and
http://appl010.lsu.edu/ocsweb/knowledgebase.nsf/WebDocumentsByAccounts/0176AEE78F4F027786256E62005E4FA4?OpenDocument
were the result of a quick google search... Please do more research on your own...


Thank you saper.
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23790_.htm

I have tried with below syntax and getting FTP protocol exception.

SET OutputLocalEnvironment.Destination.File.Remote.Precommand[2].SITE = 'NAMEFMT 1';
SET OutputLocalEnvironment.Destination.File.Remote.Precommand[3].QUOTE = 'TYPE C 850';

Sequence of nodes :

MQInput--->Compute node(ALL)--->Fileoutput node


Text:CHARACTER:FTP protocol exception
Insert
Type:INTEGER:5
Text:CHARACTER:FTP
Insert
Type:INTEGER:5
Text:CHARACTER:SITE
Insert
Type:INTEGER:5
Text:CHARACTER:FTP protocol error

Looks to me you need to review the first 2 links.

Just to give us the right information... if you do run the ftp manually what do your quote and site commands look like? Does it work in a non IIB environment? Are you connecting to a mainframe?



Thanks for your quick reply.
Yes. I am trying to place files in AS400 machine.
Yes.. This setup is running for atomsphere.
We are able to place the files but the target application is not picking up them.When we discuss with target machine owners they suggested us to run below commands

Commands used:
QUOTE site namefmt 1
-used first before any other FTP commands

SET PrePutCommand=TYPE C 850
-Used to force the CCSID to 850 (Extended ASCII).


When I goggled for above commands i found IIB info center link


Thank you..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 23, 2015 12:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Which means you haven't tried them yet in a standard ftp. Get this one to work first, then you will know what to issue as quote and site commands before you use IIB.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
$ureshWMB
PostPosted: Tue Feb 24, 2015 11:03 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

fjb_saper wrote:
Which means you haven't tried them yet in a standard ftp. Get this one to work first, then you will know what to issue as quote and site commands before you use IIB.

Have fun


I am able to do this in JCN.
Thanks JAVA.

Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 25, 2015 5:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

$ureshWMB wrote:
I am able to do this in JCN.
Thanks JAVA.



If you're going to do everything in Java (and you can do everything in Java), save yourself some money - a WAS license is much cheaper than an IIB one......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Feb 25, 2015 6:01 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

What exact version of WMB or IIB are you using?

Also there are two alternative ways to select the IFS naming format using FTP.

1. If the first command issued is CD /targetdirectory, OS/400 automatically selects NAMEFMT 1. The key is that the target directory path must start with a forward slash, and it must be the first command.

- OR -

2 Issue the subcommand, QUOTE SITE NAMEFMT 1. Once this command is completed, the target IBM iSeries family of servers should be in NAMEFMT 1 mode, and the directory structure can be navigated using the CD command as with a PC or UNIX server.

Now it may be the case that the fileoutput node will do option 1 for you anyway. Especially if you code the full directory path.

Set up a WMB/IIB configurable service definition for this FTP. This allows more control and can be changed without re-coding anyway.

DON'T USE JAVA INSIDE THE BROKER TO CONNECT TO ANYTHING.

You're unlikely to be the first person to need to do this - and I would be surprised if it couldn't be done with the filenode given a little trial and error.

The second part looks unnecessary to me. Just set ASCII transfer mode on the FTP (in the CS).
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
$ureshWMB
PostPosted: Wed Feb 25, 2015 10:43 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

Vitor wrote:
$ureshWMB wrote:
I am able to do this in JCN.
Thanks JAVA.



If you're going to do everything in Java (and you can do everything in Java), save yourself some money - a WAS license is much cheaper than an IIB one......
.

This FTP session uses the SITE command to pass information for the target dataset. The Message Broker FileOutput node does not have this capability, so this article will show you how to implement it.

Please go through the below article.

http://www.ibm.com/developerworks/websphere/library/techarticles/1105_subrahmanyam/1105_subrahmanyam.html
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Feb 25, 2015 11:05 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

You're not reading my post.

He wants to use NAMEFMT 1 - which is the IFS - Unix style of filepath and filename addressing in i/OS. There is no dataset (this is not z/OS).

From my reading of the documentation, all he needs to do is specify the target directory fully with a leading slash and the rest is automatic.

How long would it take to try it? About 10 mins.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
$ureshWMB
PostPosted: Thu Feb 26, 2015 9:38 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Apr 2014
Posts: 36

zpat wrote:
You're not reading my post.

He wants to use NAMEFMT 1 - which is the IFS - Unix style of filepath and filename addressing in i/OS. There is no dataset (this is not z/OS).

From my reading of the documentation, all he needs to do is specify the target directory fully with a leading slash and the rest is automatic.
How long would it take to try it? About 10 mins.


Thank you zpat.
I have tried with all other options giving commands oin ESQL and configuring additional parameters in ftpConfigurable services nothing was helpfull.
After all these i have choosen java for this.
set OutputLocalEnvironment.Destination.File.Remote.Precommand[1].CD = '/xx/xx/xx/xx';
SET OutputLocalEnvironment.Destination.File.Remote.Precommand[2].SITE = 'namefmt 1';

When i have used above two commands in esql the file is placing in the remote ftp but the target application is not picking up the file.

SET OutputLocalEnvironment.Destination.File.Remote.Precommand[3].QUOTE = 'TYPE C 850';
When i have tried to include this in ESQL I am getting FTP Protocol Error.

Target application pick ups the file when we send below parameters.
1)User name and password(we can setup this using mqsisetdbparms)
2)transformation mode (Passive)(using configurable services)
3)data transfer mode ASCII(on fileoutput node Transfer mode property)
4)namefmt 1(using CD as a first command in ESQL)
5)TYPE C 850(SET OutputLocalEnvironment.Destination.File.Remote.Precommand[3].QUOTE = 'TYPE C 850'

When I have used both namefmt 1 and type c 850 in ESQL I am getting FTP protocol error.

Can you please help me on this.
I don't want to use java in my flow
Below are the java statements used.
FTPClient f = new FTPClient();
f.login(ftpUser, ftpPass);
f.enterLocalPassiveMode();
boolean re = f.sendSiteCommand("namefmt 1");
System.out.println(""+re);
int res = f.sendCommand("TYPE C 850");


Thank you.
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Feb 27, 2015 12:00 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Remove both the site and quote lines. You don't need them.

As I have tried to explain - you don't need to use the NAMEFMT - it is automatic when the destination starts with a / character.

You don't need to set the code page to 850 either.

Do NOT specify QUOTE, do NOT specify SITE. Ensure the target directory path starts with a leading slash.

Use a configurable service definition for the FTP and set transfer type to ASCII, although it's probably the default anyway.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to use FTP Commands SITE and QUOTE
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.