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



Hi folks,
How to get FTP file if the source file name associated
with a date ? 
EXAMPLE:get yindprod.$DATE$ yimport/yindprod.yindprod 


        get yindprod.02062004
yimport/yindprod.yindprod  ($DATE$ is replaced with
date)

Actually without date ("get yindprod.02062004
yimport/yindprod.yindprod")it works, but my question
is how to get file name associated with a date?
Thanks for your help,


I know how to  do this on UNIX  and 
it is like below ( extract ftp part  from actual
script); 
================

#Get file from SHINBUM 
dt=`/bin/date +%m%d%Y` (   <--- System date is stored
to 'dt' with mmddyyyy format )
ftp -niv 204.4.183.244 << EOF 
user xxx@xxxxxxxxxxxxxx xxxx@321
get yindprod.$dt /opt/incoming.SHINBUM/yindprod.$dt   
quit 
EOF 

#Upload to AS400 
ftp -niv as40025b.fw.ds.com << EOF 
user tokyopc friday 
put /opt/incoming.SHINBUM/yindprod.$dt
yimport/yindprod 
quit 
EOF 
=================

Some  back ground:
Iam getting files directly from vendor called SHINBUM
as part of Contingency plan
        FTP address: 202.4.183.244
        FTP ID     : xxx@xxxxxxxxxxxxxx
        FTP Passwd : xxxx@321   

The files after processing in our Application Support
project are usually sent to down streams by Direct
FTP.
Direct FTP is done by using below command .
YFTPDRVR  Plan Name

The plan name(GET/PUT statements are written here) to
be passed on to the FTP command is to be setup in the
YPLANSTM(Native TCP/IP Plan statement)database file.
We have the " Get file from Unix initiated from the
AS400 as a contingency plan, when we donot receive the
file from Unix .
Actually process is SHINBUM sends file to UNIX and
UNIX to AS/400(in the desired lib)

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.