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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch FTP From AS/400 1

Status
Not open for further replies.

lambic

Technical User
Nov 28, 2002
68
GB
Hi,

I have a CLP which is used to control a batch FTP process, using OVRDBF to supply an input FTP command stream, to send a file to a remote (non AS/400) system.
I am using PUT, e.g. PUT library/filename.membername in my FTP command stream.

However, the file member I wish to send varies (the member name is comprised of 'HA' followed by the date it was created e.g. HA1006).

Is there any way of having the FTP command send either the last member from my PF, or derive the member name from the date (the file will be FTP'd the day it was created)?

Many thanks for any advice! [lightsaber]
 
You can do a RTVMBRD in a CL:

[tt]RTVMBRD FILE(&LIB/&FILE) MBR(*LAST) RTNMBR(&MBR)[/tt]

and then use the result in &MBR to pass that into an RPG program to build your script.

(note that MBR(*LAST) is the last member by date created.)


"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."

--Leonardo da Vinci

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top