× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Wayne,
                     Thanks a lot  for the detail  FTP documentation.  Its
very useful. I used that technic and it works great.

Regards
Raj





Wayne Capwell <wayne@redoaktech.com> on 02-24-99 10:19:01 AM

Please respond to MIDRANGE-L@midrange.com

To:   MIDRANGE-L@midrange.com
cc:    (bcc: Rajan Srinivasan/Servicing/SuperiorBank)
Subject:  Re: FTP




Hi Srinivas,
Try this.  Hope it helps.
FTP Documentation
This example connects to a remote AS/400 and copies a source file member
from the remote machine to the local machine.  There are several
commands that allow the adjustment of source and destination libraries,
receive multiple members of a file, and copy successive or similarly
named files.  These will be covered in later lessons.  For right now,
this example can be executed from an AS/400 terminal or submitted to the
job scheduler.  The technique uses a text file to store the FTP script
and can be easily modified using SEU.  You can also use variable names
to tailor the script with run time parameters.

Create a text (TXT) member in a source file to store the FTP Subcommands
Use SEU to enter and edit these commands
QGPL/QCLSRC Member-FTPCMDS
0001.00              QUSER
PASSWORD
0002.00              GET QGPL/QCLSRC.ANYNET QGPL/QCLSRC.ANYNET
(REPLACE)
0003.00              QUIT
1= The user ID and password required on the called system
2= The FTP Subcommand to get the QGPL/QCLSRC (ANYNET) member from the
source machine and copy it to the local machine in QGPL/QCLSRC (ANYNET)
member, replacing existing records if found.
3= End the FTP session
Create another, empty text member to receive the log messages from FTP
QGPL/QCLSRC Member FTPLOG
Create a CL program that executes OVRDBF commands for the input and
output files for the FTP command, and then executes the FTP command (see
source below)
QGPL/QCLSRC Member-FTPBATCH
0001.00
PGM
0002.00              OVRDBF     FILE(INPUT) TOFILE(QGPL/QCLSRC)
MBR(FTPCMDS)
0003.00              OVRDBF     FILE(OUTPUT) TOFILE(QGPL/QCLSRC)
MBR(FTPLOG)
0004.00              FTP
RMTSYS('123.123.123.123')
0006.00             ENDPGM
2= Overrides the input file to use the FTPCMDS member instead of
keyboard input
3= Overrides the output file to use the FTPLOG member instead of the
display screen
4= Executes FTP to the remote system with this IP address
Note:  a system name can be used in place of the IP address if the Host
file on the AS/400 has the system name and IP address identified.
The output log file can be inspected for errors or completion status
when the job has finished running.  The whole procedure can be called
from an RPG program if required.  Calling from the As/400 to a PC or
server should be the same procedure as long as the source machine can be
successfully PINGed.
Transferring data files from the local AS/400 to a destination machine
simply requires the use of a PUT command in place of the GET command.
We many need to include some additional setup commands if passing
programs or database files, rather than text data.  The general
technique is the same
Note:  Using FTP Subcommands, some rudimentary program logic can be
included to make sure the source files exist, rename objects and/or
change libraries, etc.
Good luck,
Wayne

Rajan.Srinivasan@Allfun.com wrote:
>
> Hello  All,
>                       We were working on tranferring a data file from
> AS/400  to  SUN system  using  FTP.
> I tried on AS/400  Interactively , and I can able to do  that
> successfully.
>
> But, we want to incorporate that into a CL program and want to submit
that
> as a batch job.
>
> I wrote the CL. But, I dont know how  to do the FTP portion.
>
> I  did interactively using the following commands.
>
> FTP
> USER
> PASSWORD
> Cd\
> PUT
>
> I could'nt  use this commands except FTP in a CL program.
>
> I read something related to this on this forum, by putting all these
> command into PF.
>
> Can anyone please suggest me, How to do this task?.
>
> Thanks in advance
>
> Raj
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---
--
--------------------------------------------------------------------
Wayne Capwell                |      Red Oak Technologies, Inc.
11301 Carmel Commons Blvd.   |      ==========================
Suite 114                    |     Intranet - Internet - AS400
Charlotte, NC 28226          |  Consulting & Development Services
                             |
(704) 945-1067 (ph.)         |        (704) 525-6805 (fax)
wayne@redoaktech.com         |     http://www.redoaktech.com/
--------------------------------------------------------------------
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---






+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.