Solved

AS400 FTP question

Posted on 2009-07-06
6
833 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 32

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 32

Expert Comment

by:shalomc
ID: 24796961
how did you create it? with what command?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now