从Windows上的共享路径到AS400中的IFS位置的FTP Jar文件? [英] FTP Jar file from share path on windows to IFS location in AS400?
问题描述
我正在寻找一种方法/设计,通过该方法,我希望自动执行从Windows位置到存在于AS400环境中的IFS位置的FTP过程有一个新的文件添加到Windows路径中。
I am looking for an approach / design through which i want to automate the process of FTP from windows location to IFS location present on AS400 environment when ever there is a new file added to windows path.
- 我们有一个选项
WRKJOBSCDE
,我们可以在1小时的预定阈值内运行CL程序。 - 编写一个调用脚本(pyton / shell)的CL程序来与windows位置( 说:X:驱动器的IP地址为xx.xxx.xx.xx )。
- Shell脚本必须在位置X:驱动器中搜索最新文件并将该jar(最大大小为5mb)传送到IFS位置(
- 因此,我们在STEP2中调用的CL程序必须使用<$>发送给我。<$> c $ c> SNDDST 调度程序作业中每1小时运行的所有jar文件的列表 步骤1。
- We have an option
WRKJOBSCDE
through which we can run a CL program in a scheduled threshold of 1hr. - To write a CL program which invokes a script(pyton/shell) to talk to windows location(say X:drive having its IP as xx.xxx.xx.xx).
- Shell script has to search for latest file in the location X:drive and FTP that jar(of size 5mb max) to IFS location(say /usr/dta/ydrive) on AS400 machine.
- Thus, CL program we invoked in STEP2 has to mail to me using
SNDDST
the list of all the jars ftp'd by the scheduler job that runs every 1 hr in STEP1.
我是CL编程/ RPGLE的新手。请帮助我了解一些
的学习内容以及这些概念的设计。
All I am new to CL programming/RPGLE . Please help me with some learning stuff and also design of such concepts.
推荐答案
您可以使用像Scott Klement提供的图书馆在 https://www.scottklement.com/ftpapi / 来推出自己的自动化客户端。它被设计成从RPG使用,并且易于使用。从那里获得一个简单的任务:
You could use a library like the one provided by Scott Klement at https://www.scottklement.com/ftpapi/ to roll your own automation client. It was designed to be used from RPG, and is easy to use. From there it is a simple task to:
- 检索目录中的文件列表
- 解析列表以检索文件时间戳
- 获取时间戳超过上次成功运行时间的任何文件
- retrieve a list of files in the directory
- parse the list to retrieve file timestamps
- get any files with a timestamp later than the last successful run
这篇关于从Windows上的共享路径到AS400中的IFS位置的FTP Jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!