Alaska Software Inc. - How to issue a site command using FTPClient
Username: Password:
AuthorTopic: How to issue a site command using FTPClient
Jose Adriano Baltieri How to issue a site command using FTPClient
on Fri, 15 Feb 2002 20:22:36 -0300
Need to do a file upload (put) but, before that, need to
issue a site comand.

             Found no method to do this. Is it possible ?

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de
Piracicaba/
                                UNIMEP - Methodist University of
Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english
spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal
42778)
Andreas HerdtRe: How to issue a site command using FTPClient
on Mon, 18 Feb 2002 09:42:02 +0100
I'm not sure what you mean with "site command".

Put and Get are supported with the ftp client. If you need to put a file into a remote directory other then
the root
directory, just pass the relative path where to put something on the server side.



--


Andreas Herdt
Alaska Software Technology AG

-------------------------------------------------------------
Technical Support EMEA: mailto:support@de.alaska-software.com
Technical Support APRA: mailto:support@us.alaska-software.com
News Server:            news://news.alaska-software.com
Homepage:               http://www.alaska-software.com
-------------------------------------------------------------




"Jose Adriano Baltieri" <jabaltie@unimep.br> schrieb im Newsbeitrag news:3C6D983C.D29B6BFB@unimep.br...
>
>             Need to do a file upload (put) but, before that, need to
> issue a site comand.
>
>              Found no method to do this. Is it possible ?
>
> --
>
>
>                                 Obrigado/Thanks a Lot,
>
>                                 Jose Adriano Baltieri
>                                 Analista de Sistemas/Systems Analyst
>                                 CPD - CENTRO / Data Processing Dept
>                                 UNIMEP - Universidade Metodista de
> Piracicaba/
>                                 UNIMEP - Methodist University of
> Piracicaba
>                                 PIRACICABA - SP - BRASIL
>                                 Fone : 055 0 XX 19 3124-1858 (english
> spoken)
>                                 Fax  : 055 0 XX 19 3124-1898 (cx postal
> 42778)
>
>
John CaswellRe: How to issue a site command using FTPClient
on Mon, 18 Feb 2002 09:01:51 +0000
Jose,

I don't think this is possible using the current implementation - though I
guess it could be hand-coded using low level TCP/IP stuff - the lack of the
"QUOTE SITE" command syntax gis one of the reasons why I still make use of a
3rd party FTP library.

Regards,

John.

Jose Adriano Baltieri wrote in message <3C6D983C.D29B6BFB@unimep.br>...
>
>            Need to do a file upload (put) but, before that, need to
>issue a site comand.
>
>             Found no method to do this. Is it possible ?
>
Jose Adriano Baltieri Re: How to issue a site command using FTPClient
on Tue, 19 Feb 2002 09:19:19 -0300
John Caswell wrote:

> Jose,
>
> I don't think this is possible using the current implementation - though I
> guess it could be hand-coded using low level TCP/IP stuff - the lack of the
> "QUOTE SITE" command syntax gis one of the reasons why I still make use of a
> 3rd party FTP library.
>

Mr Caswell :

    thanXs for your helPP !

    I do need to use the SITE command cause, the file to be uploaded will be on
a mainframe and, I want it to fall with specific characteristics.

    Would you mind to inform us what's the product you're using ?


> Regards,
>
> John.
>
> Jose Adriano Baltieri wrote in message <3C6D983C.D29B6BFB@unimep.br>...
> >
> >            Need to do a file upload (put) but, before that, need to
> >issue a site comand.
> >
> >             Found no method to do this. Is it possible ?
> >

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de Piracicaba/
                                UNIMEP - Methodist University of Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal 42778)
John CaswellRe: How to issue a site command using FTPClient
on Tue, 19 Feb 2002 15:47:06 +0000
I have the same reason for needing "site" - we use this typically to submit
jobs on the mainframe by setting a filetype to JES and GETing the JCL file.

The library that we use is one called XbTcpip from Homburg Software - this
works fine for our mainframe and other host FTP requirements - though it was
if I remember correctly a bit pricy (something like $1000). I'm aware from
scanning these newsgroups that many people use an FTP library from
MarshallSoft and I'm pretty sure that when I checked  - this did have the
ability to quote commands onto an FTP server, though as we already had the
other library we did not buy this one. From memory this is something like
$100, I'm sure that you can find a web link to this somewhere in the
archives of this NG.

If your FTP requirements are not that great then there is always the
alternative option of shelling out to a command line ftp session. This is
what we always used to do using Clipper executables - and this really worked
quite well. We used this technique on Win95 and NT - using the -s:xxx switch
to specify a script file of FTP commands which we previously created in our
code. We had a pretty comprehensive set of wrapper functions set up to use
this approach, allowing for file puts, gets, deletions and job submission,
which also handled things like password expiry and the like, I guess you
could develop something similar - but for $100 it might be more effecient to
buy a library.

Alternatively I suspect that someone on these NG's might like the challenge
of writting the 'quote command' functionality missing from ASINET using the
lower level bits!

Regards,

John.


Jose Adriano Baltieri wrote in message <3C7242C7.3F7DE54D@unimep.br>...
>
>
>John Caswell wrote:
>
>> Jose,
>>
>> I don't think this is possible using the current implementation - though
I
>> guess it could be hand-coded using low level TCP/IP stuff - the lack of
the
>> "QUOTE SITE" command syntax gis one of the reasons why I still make use
of a
>> 3rd party FTP library.
>>
>
>Mr Caswell :
>
>    thanXs for your helPP !
>
>    I do need to use the SITE command cause, the file to be uploaded will
be on
>a mainframe and, I want it to fall with specific characteristics.
>
>    Would you mind to inform us what's the product you're using ?
>
>
>> Regards,
>>
>> John.
>>
>> Jose Adriano Baltieri wrote in message <3C6D983C.D29B6BFB@unimep.br>...
>> >
>> >            Need to do a file upload (put) but, before that, need to
>> >issue a site comand.
>> >
>> >             Found no method to do this. Is it possible ?
>> >
>
>--
>
>
>                                Obrigado/Thanks a Lot,
>
>                                Jose Adriano Baltieri
>                                Analista de Sistemas/Systems Analyst
>                                CPD - CENTRO / Data Processing Dept
>                                UNIMEP - Universidade Metodista de
Piracicaba/
>                                UNIMEP - Methodist University of Piracicaba
>                                PIRACICABA - SP - BRASIL
>                                Fone : 055 0 XX 19 3124-1858 (english
spoken)
>                                Fax  : 055 0 XX 19 3124-1898 (cx postal
42778)
>
>
idep@istd.org Re: How to issue a site command using FTPClient
on Tue, 19 Feb 2002 16:23:33 +0000
>The library that we use is one called XbTcpip from Homburg Software - this
>works fine for our mainframe and other host FTP requirements - though it was
>if I remember correctly a bit pricy (something like $1000). I'm aware from
>scanning these newsgroups that many people use an FTP library from
>MarshallSoft and I'm pretty sure that when I checked  - this did have the
>ability to quote commands onto an FTP server, though as we already had the
>other library we did not buy this one. From memory this is something like
>$100, I'm sure that you can find a web link to this somewhere in the
>archives of this NG.

An alternative if you have ASINET and can perform all the required
actions via a telnet client (i.e. you know what to expect and what
responses to give), is to write the code yourself.

Basically, you need to establish a socket connection on the ftp port
at the given address.  After that, it is a simple conversation
excercise.  As for the handshaking during file transfer, I guess you
would have to check out the RFC, but it should be strightforward.

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***

CERBERUS, n.  The watch-dog of Hades, whose duty it was to guard the 
entrance -- against whom or what does not clearly appear; everybody, 
sooner or later, had to go there, and nobody wanted to carry off the 
entrance.

 - the Devil's Dictionary, Ambrose Bierce
Jose Adriano Baltieri Re: How to issue a site command using FTPClient
on Tue, 19 Feb 2002 19:30:07 -0300
Phil Ide wrote:

> >The library that we use is one called XbTcpip from Homburg Software - this
> >works fine for our mainframe and other host FTP requirements - though it was
> >if I remember correctly a bit pricy (something like $1000). I'm aware from
> >scanning these newsgroups that many people use an FTP library from
> >MarshallSoft and I'm pretty sure that when I checked  - this did have the
> >ability to quote commands onto an FTP server, though as we already had the
> >other library we did not buy this one. From memory this is something like
> >$100, I'm sure that you can find a web link to this somewhere in the
> >archives of this NG.
>
> An alternative if you have ASINET and can perform all the required
> actions via a telnet client (i.e. you know what to expect and what
> responses to give), is to write the code yourself.
>
> Basically, you need to establish a socket connection on the ftp port
> at the given address.  After that, it is a simple conversation
> excercise.  As for the handshaking during file transfer, I guess you
> would have to check out the RFC, but it should be strightforward.
>

    If I had the time, I'd love to fall into these intrincacies. But I haven't,
unfortunatelly 

>
> Regards,
>
> --
> Phil Ide
>
> Xbase++ FAQ
> current release: 8,  Monday 4th February 2002, 14:54
> ***
> * Xbase++ FAQ:
> *  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
> *          : www.software-braun.de/xbfaq/xbfaq.htm
> *  download: http://www.idep.org.uk/xbase/xbfaq.zip
> *          : www.software-braun.de/xbfaq/xbfaq.zip
> ***
>
> CERBERUS, n.  The watch-dog of Hades, whose duty it was to guard the
> entrance -- against whom or what does not clearly appear; everybody,
> sooner or later, had to go there, and nobody wanted to carry off the
> entrance.
>
>  - the Devil's Dictionary, Ambrose Bierce

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de Piracicaba/
                                UNIMEP - Methodist University of Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal 42778)
Jose Adriano Baltieri Re: How to issue a site command using FTPClient
on Tue, 19 Feb 2002 19:28:58 -0300
John Caswell wrote:

   First of all, thank you so much again for your support.

> I have the same reason for needing "site" - we use this typically to submit
> jobs on the mainframe by setting a filetype to JES and GETing the JCL file.
>

    I do it mostly for Cobol 74 sources. Pretty much better edit them outside
the mainframe and, upload them later. Although you loose the upload time every
time you have to compile, you have more editing facilities. Grep for instance.
Run a grep on top of all my Cobol source codes and, easilly locate which one is
updating a file field for instance. About the mainframe, we have three Unisys.

>
> The library that we use is one called XbTcpip from Homburg Software - this
> works fine for our mainframe and other host FTP requirements - though it was
> if I remember correctly a bit pricy (something like $1000). I'm aware from
> scanning these newsgroups that many people use an FTP library from
> MarshallSoft and I'm pretty sure that when I checked  - this did have the
> ability to quote commands onto an FTP server, though as we already had the
> other library we did not buy this one. From memory this is something like
> $100, I'm sure that you can find a web link to this somewhere in the
> archives of this NG.
>

   I know it. Used its demo version for a while before ASINET.  Expensive I
think.

   Have also seen Funcky. It offers many more things too, not only FTP.
   It comes with Regular Expressions too and many, many other stuff.
   Maybe you could have a look. Many, many goodies. And works for other
languages as well, such as VB and C++.

>
> If your FTP requirements are not that great then there is always the
> alternative option of shelling out to a command line ftp session. This is
> what we always used to do using Clipper executables - and this really worked
> quite well. We used this technique on Win95 and NT - using the -s:xxx switch
> to specify a script file of FTP commands which we previously created in our
> code. We had a pretty comprehensive set of wrapper functions set up to use
> this approach, allowing for file puts, gets, deletions and job submission,
> which also handled things like password expiry and the like, I guess you
> could develop something similar - but for $100 it might be more effecient to
> buy a library.
>

   Understand. Not "beautiful" but it works. As a matter of fact I'm doing this,
not for FTP but, for PKZIP. Have a BTM (4DOS/4NT .bat files) and, from my
application I run them in order to PKZIP some files. START the BAT and thus,
prevent the user from having to wait for its completion.

>
> Alternatively I suspect that someone on these NG's might like the challenge
> of writting the 'quote command' functionality missing from ASINET using the
> lower level bits!
>

   Yes, I'm crossing my fingers that FTP capabilites of ASINET can grow a little
and, incorporate some other things too :

    directory creation/removal
    site commands
    a code block to be ran while upload/download is in progress (I could drawn a
progress bar or a screen of my own)
    put/get commands accepting the file path instead of file contents (I have to
swalow the whole file into memory before puttint it)

    But, let's see what 1.8 may bring us about it.

    Again, thank you !

>
> Regards,
>
> John.
>
> Jose Adriano Baltieri wrote in message <3C7242C7.3F7DE54D@unimep.br>...
> >
> >
> >John Caswell wrote:
> >
> >> Jose,
> >>
> >> I don't think this is possible using the current implementation - though
> I
> >> guess it could be hand-coded using low level TCP/IP stuff - the lack of
> the
> >> "QUOTE SITE" command syntax gis one of the reasons why I still make use
> of a
> >> 3rd party FTP library.
> >>
> >
> >Mr Caswell :
> >
> >    thanXs for your helPP !
> >
> >    I do need to use the SITE command cause, the file to be uploaded will
> be on
> >a mainframe and, I want it to fall with specific characteristics.
> >
> >    Would you mind to inform us what's the product you're using ?
> >
> >
> >> Regards,
> >>
> >> John.
> >>
> >> Jose Adriano Baltieri wrote in message <3C6D983C.D29B6BFB@unimep.br>...
> >> >
> >> >            Need to do a file upload (put) but, before that, need to
> >> >issue a site comand.
> >> >
> >> >             Found no method to do this. Is it possible ?
> >> >
> >
> >--
> >
> >
> >                                Obrigado/Thanks a Lot,
> >
> >                                Jose Adriano Baltieri
> >                                Analista de Sistemas/Systems Analyst
> >                                CPD - CENTRO / Data Processing Dept
> >                                UNIMEP - Universidade Metodista de
> Piracicaba/
> >                                UNIMEP - Methodist University of Piracicaba
> >                                PIRACICABA - SP - BRASIL
> >                                Fone : 055 0 XX 19 3124-1858 (english
> spoken)
> >                                Fax  : 055 0 XX 19 3124-1898 (cx postal
> 42778)
> >
> >

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de Piracicaba/
                                UNIMEP - Methodist University of Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal 42778)
Anand GuptaRe: How to issue a site command using FTPClient
on Wed, 20 Feb 2002 11:13:09 +0530
Hi Jose

I too got stuck with ASINET ftp for a clients need. The client runs SFTP on
his server (so FTP doesnt works at all). Alternatively the client allowed me
to upload the files via HTTP (multi/part) using the post method. Tried this
way using WIS too.

Found a freeware utility called CURL (a standalone EXE file...pretty much
feature rich) which does via the HTTP route and/or PSFTP which takes batch
mode inputs (which issues on FTP site after connecting to it..even issues a
BYE too). Both works for me for the mean time.

Anand

NB Both searched by my collegue Rajesh actually 
idep@istd.org Re: How to issue a site command using FTPClient
on Wed, 20 Feb 2002 08:37:11 +0000
>NB Both searched by my collegue Rajesh actually 

Haven't seen any posts by Rajesh for a long time - how is he?

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***

CERBERUS, n.  The watch-dog of Hades, whose duty it was to guard the 
entrance -- against whom or what does not clearly appear; everybody, 
sooner or later, had to go there, and nobody wanted to carry off the 
entrance.

 - the Devil's Dictionary, Ambrose Bierce
Jose Adriano Baltieri Re: How to issue a site command using FTPClient
on Wed, 20 Feb 2002 10:34:04 -0300
Anand Gupta wrote:

> Hi Jose
>
> I too got stuck with ASINET ftp for a clients need. The client runs SFTP on
> his server (so FTP doesnt works at all). Alternatively the client allowed me
> to upload the files via HTTP (multi/part) using the post method. Tried this
> way using WIS too.
>
> Found a freeware utility called CURL (a standalone EXE file...pretty much
> feature rich) which does via the HTTP route and/or PSFTP which takes batch
> mode inputs (which issues on FTP site after connecting to it..even issues a
> BYE too). Both works for me for the mean time.
>

    Great, I use CURL too. But for command line url testing only.

>
> Anand
>
> NB Both searched by my collegue Rajesh actually 

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de Piracicaba/
                                UNIMEP - Methodist University of Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal 42778)
idep@istd.org Re: How to issue a site command using FTPClient
on Wed, 20 Feb 2002 08:35:48 +0000
>> Alternatively I suspect that someone on these NG's might like the challenge
>> of writting the 'quote command' functionality missing from ASINET using the
>> lower level bits!
>>
>
>   Yes, I'm crossing my fingers that FTP capabilites of ASINET can grow a little
>and, incorporate some other things too :
>
>    directory creation/removal
>    site commands
>    a code block to be ran while upload/download is in progress (I could drawn a
>progress bar or a screen of my own)
>    put/get commands accepting the file path instead of file contents (I have to
>swalow the whole file into memory before puttint it)

Perhaps rather than expand ASINET, Alaska could just open it up - make
the connection for you and allow you to participate in the
conversation from then on.  This would allow for non-standard commands
supported by the ftpd you are connecting to but not specified in RFCs.
Also it would give you the room to create a progress bar reflecting
the progress of a transfer.

The existing command-set supported by ASINET would then allow you a
simple and/or quick&dirty ftp interface, but the 'open' conversation
model would give you the flexibility not only to handle unsupported
commands but also handle existing commands in a tailored fashion.  How
about that, does it get a vote?

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***

CERBERUS, n.  The watch-dog of Hades, whose duty it was to guard the 
entrance -- against whom or what does not clearly appear; everybody, 
sooner or later, had to go there, and nobody wanted to carry off the 
entrance.

 - the Devil's Dictionary, Ambrose Bierce
Jose Adriano Baltieri Re: How to issue a site command using FTPClient
on Wed, 20 Feb 2002 10:35:57 -0300
Phil Ide wrote:

> >> Alternatively I suspect that someone on these NG's might like the challenge
> >> of writting the 'quote command' functionality missing from ASINET using the
> >> lower level bits!
> >>
> >
> >   Yes, I'm crossing my fingers that FTP capabilites of ASINET can grow a little
> >and, incorporate some other things too :
> >
> >    directory creation/removal
> >    site commands
> >    a code block to be ran while upload/download is in progress (I could drawn a
> >progress bar or a screen of my own)
> >    put/get commands accepting the file path instead of file contents (I have to
> >swalow the whole file into memory before puttint it)
>
> Perhaps rather than expand ASINET, Alaska could just open it up - make
> the connection for you and allow you to participate in the
> conversation from then on.  This would allow for non-standard commands
> supported by the ftpd you are connecting to but not specified in RFCs.
> Also it would give you the room to create a progress bar reflecting
> the progress of a transfer.
>
> The existing command-set supported by ASINET would then allow you a
> simple and/or quick&dirty ftp interface, but the 'open' conversation
> model would give you the flexibility not only to handle unsupported
> commands but also handle existing commands in a tailored fashion.  How
> about that, does it get a vote?
>

    Yes, it would be better than the raw model we have now.

    Of course, I'd prefer a complete implementation but, if only I could interfere
after log on for instance, I could do it myself.


>
> Regards,
>
> --
> Phil Ide
>
> Xbase++ FAQ
> current release: 8,  Monday 4th February 2002, 14:54
> ***
> * Xbase++ FAQ:
> *  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
> *          : www.software-braun.de/xbfaq/xbfaq.htm
> *  download: http://www.idep.org.uk/xbase/xbfaq.zip
> *          : www.software-braun.de/xbfaq/xbfaq.zip
> ***
>
> CERBERUS, n.  The watch-dog of Hades, whose duty it was to guard the
> entrance -- against whom or what does not clearly appear; everybody,
> sooner or later, had to go there, and nobody wanted to carry off the
> entrance.
>
>  - the Devil's Dictionary, Ambrose Bierce

--


                                Obrigado/Thanks a Lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas/Systems Analyst
                                CPD - CENTRO / Data Processing Dept
                                UNIMEP - Universidade Metodista de Piracicaba/
                                UNIMEP - Methodist University of Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : 055 0 XX 19 3124-1858 (english spoken)
                                Fax  : 055 0 XX 19 3124-1898 (cx postal 42778)