Solved

AS400 FTP question

Posted on 2009-07-06
6
839 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is the timeframe of this cron job? 2 131
Utilities to reset local Win 10 passwords 13 121
NTP Server in VMware 5 165
User cannot delete a folder from the desktop. 3 60
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…
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.

867 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

21 Experts available now in Live!

Get 1:1 Help Now