LCD command not working in FTP

2155 pts.
Tags:
AS 400
FTP
Hi, When trying to FTP AS/400 source members to local desktop LCD subcommand of FTP is not working. when using the command LCD C: ERROR IS COMING CHARACTER ':' IS NOT ALLOWED in object name so because of this unable to copy as/400 source code to local desktop.

Software/Hardware used:
AS400-FTP

Answer Wiki

Thanks. We'll let you know when a new response is added.
If you use MGET, then you are prompted for each member name, and can decide which ones to you want to download:

ftp <your-as400>
lcd c:\ftp
cd mylib
mget qclsrc
mget QCLSRC.DSPLIBL? n
mget QCLSRC.FTPCMD? y

Discuss This Question: 27  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    More info on your FTP command would help. How is it being run, from a command window, script or other means. Are you doing a PUT or a GET for the source code? What OS and I-Series release are you on?
    108,130 pointsBadges:
    report
  • 6r

    tried from doc prompt but ftp time out error appears so unable to transfer using DOS prompt and it's V7R2.

    before doing put or get atleast from dos prompt connection should be established but it's not getting established secondly from as/400 when doing lcd command to change local drive to c drive to download /copy source code from as400 to local desktop lcd command is not recognizing local desktop/drive.


    2,155 pointsBadges:
    report
  • TheRealRaven
    What is the full LCD subcommand that you're trying to use?
    26,640 pointsBadges:
    report
  • 6r
    lcd c
    2,155 pointsBadges:
    report
  • 6r
    And from dos command prompt server not getting connected itself after trying FTP (IP address) and after few seconds error comes 'connection time out'.
    2,155 pointsBadges:
    report
  • 6r

    lcd c

    could not acces library c

    lcd h


    could not access library h.

    2,155 pointsBadges:
    report
  • 6r
    I am trying it on VDI (Citrix) where AS/400 IBM personnel communicator is installed. From there I am trying to bring source code of members to the desktop of VDI.
    2,155 pointsBadges:
    report
  • ToddN2000
    What are you planning to do with the source code? Are you looking to edit it and put it back on the iSeries machine?
    108,130 pointsBadges:
    report
  • 6r
    The next step is to push these notepad files which have all these source code all lfs, pfs, rpg, sqlrpgle pgms in to GitHub environment and check that latest version can be maintained over there as a repository.
    2,155 pointsBadges:
    report
  • mmanley
    To transfer anything from your AS/400 to a PC is pretty simple. First, open a CMD prompt.  Navigate to the directory where you want the file stored. Then FTP as400ip,  Then to keep the EBCDIC to ASCII transformation, DO NOT enter the BIN command. Next, CD QSYS.LIB/yourlib.LIB/yourfile.FILE. At this point, you can do a DIR and see the members in the file.  Then, simply GET mymemb.MBR This works perfectly for source files. If you're trying to get a data file, you need to be concerned about decimal data conversions, etc.
    390 pointsBadges:
    report
  • WoodEngineer
    The key is to launch FTP from the directory where you want your source to land.
    8,040 pointsBadges:
    report
  • ToddN2000
    You could also try putting the whole FTP process inside a BAT file and change the directory before running the FTP then close out the BAT.

    Post your code so we can better understand what you are trying to accomplish.
    108,130 pointsBadges:
    report
  • GregManzo
    Pass a parameter to the.BAT file for the member name to fetch.
    2,720 pointsBadges:
    report
  • TheRealRaven
    lcd c

    For that to work, you would need to have a subdirectory named "c" inside of your current directory ("current" at the time the LCD subcommand runs).

    If you are trying to reference your C: drive, you'll need to include the name of a directory on the C: drive. There is no directory named "C:", so it can't be used for LCD.
    26,640 pointsBadges:
    report
  • 6r

    2 things:-

    1) when trying to ftp (ip address)

    connection time out error.

    2) from as/400 side when ftp(ip address) then it's connected to remote system and then when doing lcd h--then error could not access library h,where as H is not a library it is a directory defined on local desktop inside vdi.

    2,155 pointsBadges:
    report
  • 6r

    1)-connection time out error is happening from command prompt(DOS)

    2,155 pointsBadges:
    report
  • ToddN2000
    Went back and read some more trying to figure out exactly what you are trying to do. IT looks like you are trying to take your local code and FTP it to a GitHub environment correct? I am not sure that will work because how do you plan on compiling the code and running it without JOBD to control the libraries needed. Correct me if I am wrong. If anyone has done this on GitHub, I would like to know how.
    108,130 pointsBadges:
    report
  • 6r

    No,the effort is to bring source code of all the members of all source file and libraries to local desktop inside VDIand then push it to GITHUB environment so that it could be kept as a repository like a version control tool.

    But to do so FTP command is not working properly either time out is happening when trying from DOS command prompt or it's not pointing to local desktop when trying lcd c

    error is coming "can not access library C"

    where as C is not a library it's just a (local vdi) drive name.

    2,155 pointsBadges:
    report
  • 6r
    Any updates by experts please?
    2,155 pointsBadges:
    report
  • TheRealRaven
    If running from an AS/400 server, what NAMEFMT is the session running under? If it's NAMEFMT 0, you need to switch to NAMFMT 1. Otherwise "C" and "H" will be considered to be library rather than directory names.

    If running from your desktop system and receiving a timeout, verify that the FTP server has been started.
    26,640 pointsBadges:
    report
  • 6r

    how to know if server is started here in case of time out error from dos prompt?

    secondly despite doing NAMEFMT 1 it's started giving suddenly other error "unknown extension in database file name"both for C: and H: drives.

    lcd c:\

    error :-"unknown extension in database file name"

    2,155 pointsBadges:
    report
  • 6r
    By the server is on only as parallel trying to do ftp from AS/400 and dos prompt but no success yet in FTP.
    2,155 pointsBadges:
    report
  • ToddN2000
    @6r: How often do you plan on running this process, will it replace the current source files or add new versions of the source code?. Seems like a lot of work for something not that hard. How often does your source code change?

    A few years back I work at a company that had basically 2 source libraries, 1 production and the other history. 

    When a programmer was working on a program they copied it to their library, made the changes and tested it. When complete the production code was moved to the history library and the programmers code was moved to production library and compiled.
    108,130 pointsBadges:
    report
  • 6r

    this process

     1.First  to ftp all source members to local desktop.

    2. from local desktop (in VDI environment) to GITHUB.

    3.Once the source code is in GITHUB env. then see how to maintain latest version of source code there.

    But to complete above steps first step itself is not getting completed successfully from local desktop command prompt same error keeps populating each time connection time out error and from AS/400 environment the despite doing NAMEFMT 1 it's started giving suddenly other error "unknown extension in database file name"both for C: and H: drives.

    lcd c:\

    error :-"unknown extension in database file name"

    so unable to do ftp by trying both ways from as/400 to local desktop and from dos command prompt to local desktop.

    Experts please advise how to resolve these errors so that successful FTP could be completed.

    Thanks

    2,155 pointsBadges:
    report
  • 6r

    Any advice on above by experts please?

    Thanks

    2,155 pointsBadges:
    report
  • 6r
    FTP -AS/400 experts, could you please advise on this case soon.
    2,155 pointsBadges:
    report
  • TheRealRaven
    Please show the actual script used during the transfer attempt. Best might be simply to copy/paste the session log so we see everything that happens before any error appears.
    26,640 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: