I hack away at a problem for a couple of hours then seconds...yes seconds after I type a plea for help I realise where I'm going wrong. I needed to create the source members in the destination source file first.
If you use NAMFMT1 and use a .savf extension for the save file, the save file will be created on the target system, if it doesn't exist.
"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."
Hi flapeyre,
I didn't know that. Therefore the savf will automatically be created in an IFS folder and I'll need to use RST command to restore the contents on the target system, won't it be ?
Thx.
Philippe --
"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."
To just FTP one member from my source file I simply use the following PUT command.
NOTE: If the member doesn't exist on the remote as400 it will create it with a blank source type. The only requirements are for both source files to exist.
Input File:
<-------Begin CMD------->
USER PASS
put XMYLIB/QCLSRC.SNDMBRFTP XMYLIB/QCLSRC.SNDMBRFTP
quit
<-------End CMD------->
Output File: (Log)
<-------Begin Log------->
Output redirected to a file.
Input read from specified override file.
Connecting to host myas400 at address xxx.xxx.xxx.xxx using port
21.
220-QTCP at myas400.
220 Connection will close if idle more than 5 minutes.
Enter login ID (myuser):
331 Enter password.
230 myuser logged on.
OS/400 is the remote operating system. The TCP/IP version is "V5R2M0".
250 Now using naming format "0".
257 "XMYLIB" is current library.
Enter an FTP subcommand.
> put XMYLIB/QCLSRC.SNDMBRFTP XMYLIB/QCLSRC.SNDMBRFTP
227 Entering Passive Mode (xxx,xxx,xxx,xxx,13,198).
150 Sending file to member SNDMBRFTP in file QCLSRC in library XORTIZOSC.
250 File transfer completed successfully.
3764 bytes transferred in 0.005 seconds. Transfer rate 770.867 KB/sec.
Enter an FTP subcommand.
> quit
221 QUIT subcommand received.
WizTheOz, is there a bit of code mising?
I have never done an FTP session like that before but I can see how it work with one exception. How are you specifying the two FTP addresses? The source and the destination?
Also on the put command, shouldn't there be a difference between the source and destination libraries?
In the CL snippet below I am running FTP in batch mode. Some requirements for batch are to have a command file(that will hold the FTP commands you are wanting to run) and a log file(will store job log of FTP script).
When you run the FTP command you need to declare your input(command file) and output(log file) using ovrdbf. Then you run the FTP command with the remote as/400 as the parameter for RMTSYS. You can enter the ip address enclosed in single quotes.
As far as the differences between the two source libraries. That totally depends in my original example I had the same source file residing in the same library on the two as/400's. You could always put the source file into a different library on the remote as/400. I've simply renamed the script below (Input File section).
I hope this cleared things up for you, best of luck..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.