Solved

AS400 FTP question

Posted on 2009-07-06
6
847 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

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…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
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.

803 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