?
Solved

AS400 FTP question

Posted on 2009-07-06
6
Medium Priority
?
856 Views
Last Modified: 2013-12-06
looking for assistance with code for AS400 FTP (from an outside server into PF or IFS)
multiple files in the same directory with variable names ('edi850_i_*')
FTP commands would be executed from the AS400
 I have created a new IFS directory but the FTP commands I have tried don't seem to recognize the directory
My command file (FTPCMD1) ---
user pswrd        
LCD FORDIN                            --- this is the IFS directory I created                
CD FordHS\Inbound --- this is the location of the .dat files
MGET edi850_i*            
quit                      

MYFTPCL ---
              DCL           VAR(&INTNETADR) TYPE(*CHAR) LEN(19) VALUE('999.999.99.9')
              MONMSG   MSGID(CPF0000)                              
              CLRPFM     FILE(FTPMSG1)                              
              OVRDBF     FILE(INPUT) TOFILE(FTPCMD1)                
              OVRDBF     FILE(OUTPUT) TOFILE(FTPMSG1)                
              FTP            RMTSYS(&INTNETADR)                          
              MONMSG    MSGID(CPF0000)                              
              ENDPGM                                                
0
Comment
Question by:Curto123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 33

Accepted Solution

by:
shalomc earned 1000 total points
ID: 24792342
assuming that FORDIN is not a library - this trick can work only in IFS


user pswrd       
locsite namefmt 1
LCD /somepath/FORDIN 
CD FordHS\Inbound
MGET edi850_i*            
quit                      

Open in new window

0
 

Author Comment

by:Curto123
ID: 24794661
Can you define the "/somepath"
in IFS I created a directory called FORDIN
How do I find the path?
0
 
LVL 33

Expert Comment

by:shalomc
ID: 24796961
how did you create it? with what command?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Curto123
ID: 24797050
CRTDIR
0
 
LVL 27

Expert Comment

by:tliotta
ID: 24798012
Note that [LCD FORDIN] refers to a relative path. Unless FORDIN is a subdirectory within user'scurrent directory, it won't be found. Assuming that FORDIN is atop-level directory off of root, the FTP subcommand should be:

LCD /FORDIN

Having the slash as the initial character causes the absolute path to be used.

Tom

0
 

Author Closing Comment

by:Curto123
ID: 31600376
Thank you!!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question