FTP Problems - IBM AS400

This is a discussion on FTP Problems - IBM AS400 ; Hi, I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS onan adhoc basis and I'm getting an error. If I run each line of the FTP script interactively it works but as soon as ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: FTP Problems

  1. FTP Problems

    Hi,

    I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS onan
    adhoc basis and I'm getting an error.

    If I run each line of the FTP script interactively it works but as
    soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    getproblems.


    The FTP Script is;
    open eandlarchive
    user user password
    namefmt
    cd /2008/05
    namefmt 1
    bin

    get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    Quit

    and the output log is (edited to miss off the logon, etc); >
    bin
    200 Type set to I.
    Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf /
    qdls/pdf/X376734.pdf
    Error occurred when resolving a path name.
    Enter an FTP subcommand.> Quit

    If I run that command interactively it works. Can anyone offer any
    advice?

    Thanks Steve

  2. Re: FTP Problems

    On May 22, 3:32*pm, Silverfox wrote:
    > Hi,
    >
    > I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS onan
    > adhoc basis and I'm getting an error.
    >
    > If I run each line of the FTP script interactively it works but as
    > soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    > getproblems.
    >
    > The FTP Script is;
    > open eandlarchive
    > user user password
    > namefmt
    > cd /2008/05
    > namefmt 1
    > bin
    >
    > get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    > Quit
    >
    > *and the output log is (edited to miss off the logon, etc); >
    > bin
    > 200 Type set to I.
    > Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf /
    > qdls/pdf/X376734.pdf
    > Error occurred when resolving a path name.
    > Enter an FTP subcommand.> Quit
    >
    > If I run that command interactively it works. Can anyone offer any
    > advice?
    >
    > Thanks Steve


    What does the 1st namefmt command do? Does the 2nd namefmt work OK?
    Since the error dosnt start with a number my guess is its from the
    as400 not the pc. Do you get the same errors with much shorter
    filenames? I wonder if there is some limit on the ablility of the
    batch processor.

    Jonathan.

  3. Re: FTP Problems

    If I manually type in each command then they work correctly. The
    problem occurs if I put it in a source member and then OVRDBF to it


  4. Re: FTP Problems

    On May 23, 10:33*am, Steve wrote:
    > If I manually type in each command then they work correctly. *The
    > problem occurs if I put it in a source member and then OVRDBF to it


    Yes, thats just what you said originally. Are you running with the
    same userid? That would remove any authority problems.

    Jonathan

  5. Re: FTP Problems


    "Silverfox" skrev i en meddelelse
    news:e7c5f4b6-fceb-4770-a088-02c0677034bd@f36g2000hsa.googlegroups.com...
    > Hi,
    >
    > I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS onan
    > adhoc basis and I'm getting an error.
    >
    > If I run each line of the FTP script interactively it works but as
    > soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    > getproblems.
    >
    >
    > The FTP Script is;
    > open eandlarchive
    > user user password
    > namefmt
    > cd /2008/05
    > namefmt 1
    > bin
    >
    > get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    > Quit
    >
    > and the output log is (edited to miss off the logon, etc); >
    > bin
    > 200 Type set to I.
    > Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf /
    > qdls/pdf/X376734.pdf
    > Error occurred when resolving a path name.
    > Enter an FTP subcommand.> Quit
    >
    > If I run that command interactively it works. Can anyone offer any
    > advice?
    >
    > Thanks Steve


    A few things is a little strange with your script, but shouldn't matter in
    the end. However, I'd like you to try:

    OVRDBF INPUT TOFILE(YourSourceFile) MBR(YourSourceFileMember)
    FTP RMTSYS(eandlarchive)

    Script in source file:
    (blank line)
    USER user password
    locsite namefmt 1
    cd /2008/05
    lcd /qdls
    bin
    get 75618c7f92e189be8cfc354e5cf5388f.pdf pdf/X376734.pdf
    quit


    It's unlikely to change anything -- but stranger things have happened in the
    past... :-)






  6. Re: FTP Problems

    Kaj Julius wrote:
    > "Silverfox" skrev i en meddelelse
    > news:e7c5f4b6-fceb-4770-a088-02c0677034bd@f36g2000hsa.googlegroups.com...
    >> Hi,
    >>
    >> I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS
    >> onan adhoc basis and I'm getting an error.
    >>
    >> If I run each line of the FTP script interactively it works but as
    >> soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    >> getproblems.
    >>
    >>
    >> The FTP Script is;
    >> open eandlarchive
    >> user user password
    >> namefmt
    >> cd /2008/05
    >> namefmt 1
    >> bin
    >>
    >> get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    >> Quit
    >>
    >> and the output log is (edited to miss off the logon, etc); >
    >> bin
    >> 200 Type set to I.
    >> Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf /
    >> qdls/pdf/X376734.pdf
    >> Error occurred when resolving a path name.
    >> Enter an FTP subcommand.> Quit
    >>
    >> If I run that command interactively it works. Can anyone offer any
    >> advice?
    >>
    >> Thanks Steve

    >
    > A few things is a little strange with your script, but shouldn't
    > matter in the end. However, I'd like you to try:
    >
    > OVRDBF INPUT TOFILE(YourSourceFile) MBR(YourSourceFileMember)
    > FTP RMTSYS(eandlarchive)
    >
    > Script in source file:
    > (blank line)
    > USER user password
    > locsite namefmt 1
    > cd /2008/05
    > lcd /qdls
    > bin
    > get 75618c7f92e189be8cfc354e5cf5388f.pdf pdf/X376734.pdf
    > quit


    To start off: Don't write the word USER, just write the username and
    password.

    Ace



  7. Re: FTP Problems


    "Ace" skrev i en meddelelse
    news:48371ab3$0$8007$756600cd@news.cambrium.nl...
    > Kaj Julius wrote:
    >> "Silverfox" skrev i en meddelelse
    >> news:e7c5f4b6-fceb-4770-a088-02c0677034bd@f36g2000hsa.googlegroups.com...
    >>> Hi,
    >>>
    >>> I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS
    >>> onan adhoc basis and I'm getting an error.
    >>>
    >>> If I run each line of the FTP script interactively it works but as
    >>> soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    >>> getproblems.
    >>>
    >>>
    >>> The FTP Script is;
    >>> open eandlarchive
    >>> user user password
    >>> namefmt
    >>> cd /2008/05
    >>> namefmt 1
    >>> bin
    >>>
    >>> get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    >>> Quit
    >>>
    >>> and the output log is (edited to miss off the logon, etc); >
    >>> bin
    >>> 200 Type set to I.
    >>> Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf /
    >>> qdls/pdf/X376734.pdf
    >>> Error occurred when resolving a path name.
    >>> Enter an FTP subcommand.> Quit
    >>>
    >>> If I run that command interactively it works. Can anyone offer any
    >>> advice?
    >>>
    >>> Thanks Steve

    >>
    >> A few things is a little strange with your script, but shouldn't
    >> matter in the end. However, I'd like you to try:
    >>
    >> OVRDBF INPUT TOFILE(YourSourceFile) MBR(YourSourceFileMember)
    >> FTP RMTSYS(eandlarchive)
    >>
    >> Script in source file:
    >> (blank line)
    >> USER user password
    >> locsite namefmt 1
    >> cd /2008/05
    >> lcd /qdls
    >> bin
    >> get 75618c7f92e189be8cfc354e5cf5388f.pdf pdf/X376734.pdf
    >> quit

    >
    > To start off: Don't write the word USER, just write the username and
    > password.
    >
    > Ace
    >


    That's not quite correct. If you start the script with a blank line (as I
    did) the implicit USER instruction is discarded and you have to use a USER
    instruction on the next line. I did this to make the script more readable.



  8. Re: FTP Problems

    Kaj Julius wrote:
    > "Ace" skrev i en meddelelse
    > news:48371ab3$0$8007$756600cd@news.cambrium.nl...
    >> Kaj Julius wrote:
    >>> "Silverfox" skrev i en meddelelse
    >>> news:e7c5f4b6-fceb-4770-a088-02c0677034bd@f36g2000hsa.googlegroups.com...
    >>>> Hi,
    >>>>
    >>>> I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS
    >>>> onan adhoc basis and I'm getting an error.
    >>>>
    >>>> If I run each line of the FTP script interactively it works but as
    >>>> soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    >>>> getproblems.
    >>>>
    >>>>
    >>>> The FTP Script is;
    >>>> open eandlarchive
    >>>> user user password
    >>>> namefmt
    >>>> cd /2008/05
    >>>> namefmt 1
    >>>> bin
    >>>>
    >>>> get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    >>>> Quit
    >>>>
    >>>> and the output log is (edited to miss off the logon, etc); >
    >>>> bin
    >>>> 200 Type set to I.
    >>>> Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf
    >>>> / qdls/pdf/X376734.pdf
    >>>> Error occurred when resolving a path name.
    >>>> Enter an FTP subcommand.> Quit
    >>>>
    >>>> If I run that command interactively it works. Can anyone offer any
    >>>> advice?
    >>>>
    >>>> Thanks Steve
    >>>
    >>> A few things is a little strange with your script, but shouldn't
    >>> matter in the end. However, I'd like you to try:
    >>>
    >>> OVRDBF INPUT TOFILE(YourSourceFile) MBR(YourSourceFileMember)
    >>> FTP RMTSYS(eandlarchive)
    >>>
    >>> Script in source file:
    >>> (blank line)
    >>> USER user password
    >>> locsite namefmt 1
    >>> cd /2008/05
    >>> lcd /qdls
    >>> bin
    >>> get 75618c7f92e189be8cfc354e5cf5388f.pdf pdf/X376734.pdf
    >>> quit

    >>
    >> To start off: Don't write the word USER, just write the username and
    >> password.
    >>
    >> Ace
    >>

    >
    > That's not quite correct. If you start the script with a blank line
    > (as I did) the implicit USER instruction is discarded and you have to
    > use a USER instruction on the next line. I did this to make the
    > script more readable.


    I guess there's more than 1 way that leads to Rome :-)



  9. Re: FTP Problems

    Ace wrote:
    > Kaj Julius wrote:
    >> "Ace" skrev i en meddelelse
    >> news:48371ab3$0$8007$756600cd@news.cambrium.nl...
    >>> Kaj Julius wrote:
    >>>> "Silverfox" skrev i en meddelelse
    >>>> news:e7c5f4b6-fceb-4770-a088-02c0677034bd@f36g2000hsa.googlegroups.com...
    >>>>> Hi,
    >>>>>
    >>>>> I'm trying to FTP a file from a Windows 2003 IIS FTP site to QDLS
    >>>>> onan adhoc basis and I'm getting an error.
    >>>>>
    >>>>> If I run each line of the FTP script interactively it works but as
    >>>>> soon as I put it in a source member and OVRDBF to INPUT/OUTPUT I
    >>>>> getproblems.
    >>>>>
    >>>>>
    >>>>> The FTP Script is;
    >>>>> open eandlarchive
    >>>>> user user password
    >>>>> namefmt
    >>>>> cd /2008/05
    >>>>> namefmt 1
    >>>>> bin
    >>>>>
    >>>>> get 75618c7f92e189be8cfc354e5cf5388f.pdf /qdls/pdf/X376734.pdf
    >>>>> Quit
    >>>>>
    >>>>> and the output log is (edited to miss off the logon, etc); >
    >>>>> bin
    >>>>> 200 Type set to I.
    >>>>> Enter an FTP subcommand.> get 75618c7f92e189be8cfc354e5cf5388f.pdf
    >>>>> / qdls/pdf/X376734.pdf
    >>>>> Error occurred when resolving a path name.
    >>>>> Enter an FTP subcommand.> Quit
    >>>>>
    >>>>> If I run that command interactively it works. Can anyone offer any
    >>>>> advice?
    >>>>>
    >>>>> Thanks Steve
    >>>>
    >>>> A few things is a little strange with your script, but shouldn't
    >>>> matter in the end. However, I'd like you to try:
    >>>>
    >>>> OVRDBF INPUT TOFILE(YourSourceFile) MBR(YourSourceFileMember)
    >>>> FTP RMTSYS(eandlarchive)
    >>>>
    >>>> Script in source file:
    >>>> (blank line)
    >>>> USER user password
    >>>> locsite namefmt 1
    >>>> cd /2008/05
    >>>> lcd /qdls
    >>>> bin
    >>>> get 75618c7f92e189be8cfc354e5cf5388f.pdf pdf/X376734.pdf
    >>>> quit
    >>>
    >>> To start off: Don't write the word USER, just write the username and
    >>> password.
    >>>
    >>> Ace
    >>>

    >>
    >> That's not quite correct. If you start the script with a blank line
    >> (as I did) the implicit USER instruction is discarded and you have to
    >> use a USER instruction on the next line. I did this to make the
    >> script more readable.

    >
    > I guess there's more than 1 way that leads to Rome :-)


    Hi all,

    1/ I think Julius is right with "lcd /qdls" .
    2/ in interactive mode, without LCD, is QDLS the current directory ? I
    think it is the current library.
    3/ "user" has to be in WRKDIRE to work with QDLS
    4/ (but why to work in QDLS ?)

    best regards,

    FF



+ Reply to Thread