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
Solved

AS400 FTP question

Posted on 2009-07-06
6
850 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
  • 3
  • 2
6 Comments
 
LVL 33

Accepted Solution

by:
shalomc earned 250 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
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.

860 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