Skip to main content
Nelson Schroth
Participating Frequently
Jul 7, 2022 1:56 PM UTC

Using wIntegrate host subroutine WIN.FTPGET

I was wondering if someone could comment on the use of the WIN.GETFTP host subroutine.  Every time we use it, it spits out a message "Invalid conversion type NO".  We have always set the type to "0" for ASCII when we make the call, but no matter what we set it to, we always get this message (and have for many years and versions of wIntegrate).  We currently use v6.4.0.

What is it complaining about?

------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------

    5 replies

    Jonathan Smith
    Rocketeer
    Jul 8, 2022 12:08 PM UTC
    I was wondering if someone could comment on the use of the WIN.GETFTP host subroutine.  Every time we use it, it spits out a message "Invalid conversion type NO".  We have always set the type to "0" for ASCII when we make the call, but no matter what we set it to, we always get this message (and have for many years and versions of wIntegrate).  We currently use v6.4.0.

    What is it complaining about?

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Nelson,

    How are you using WIN.FTPGET, I tested the subroutine using my rocket windows laptop to connect to a Unix server and successfully got back a text file and stored it locally.

    RUN BP WIN.FTP.TEST
    Enter Server Name dentap
    Enter User Name root
    Password 
    Enter Directory on the Server /disk1/ud82/bin
    Enter Filename to get udt.errlog
    Enter Location and File Name to Store on PC C:\\u2\\udt.errlog
    Got

    Here is my test program

    PROMPT
    ""
    CRT "Enter Server Name " :
    INPUT SERVER
    IF SERVER = "" THEN STOP
    CRT "Enter User Name " :
    INPUT USERNAME
    IF USERNAME = "" THEN STOP
    CRT "Password " :
    INPUT PASSWORD
    IF PASSWORD = "" THEN STOP
    ERRMSG = ""
    CALL WIN.FTPCON(SERVER,USERNAME,PASSWORD,ERRMSG)
    IF ERRMSG = "" THEN
      CRT "Enter Directory on the Server ":
      INPUT DIRNAME
      CALL WIN.FTPSETDR(DIRNAME)
      CRT "Enter Filename to get " :
      INPUT FILENAME
      IF FILENAME = "" THEN STOP
      CRT "Enter Location and File Name to Store on PC ":
      INPUT LOCNAME
      IF LOCNAME = "" THEN STOP
      RESP = ""
      CALL WIN.FTPGET(FILENAME,LOCNAME,1,RESP)
      IF RESP = "" THEN
        CRT "Got"
      END ELSE
        CRT "Failed - " : RESP
      END
    END ELSE
      CRT "Connect Failed - " : ERRMSG
    END
    END




    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    Nelson Schroth
    Participating Frequently
    Jul 9, 2022 6:37 PM UTC
    Nelson,

    How are you using WIN.FTPGET, I tested the subroutine using my rocket windows laptop to connect to a Unix server and successfully got back a text file and stored it locally.

    RUN BP WIN.FTP.TEST
    Enter Server Name dentap
    Enter User Name root
    Password 
    Enter Directory on the Server /disk1/ud82/bin
    Enter Filename to get udt.errlog
    Enter Location and File Name to Store on PC C:\\u2\\udt.errlog
    Got

    Here is my test program

    PROMPT
    ""
    CRT "Enter Server Name " :
    INPUT SERVER
    IF SERVER = "" THEN STOP
    CRT "Enter User Name " :
    INPUT USERNAME
    IF USERNAME = "" THEN STOP
    CRT "Password " :
    INPUT PASSWORD
    IF PASSWORD = "" THEN STOP
    ERRMSG = ""
    CALL WIN.FTPCON(SERVER,USERNAME,PASSWORD,ERRMSG)
    IF ERRMSG = "" THEN
      CRT "Enter Directory on the Server ":
      INPUT DIRNAME
      CALL WIN.FTPSETDR(DIRNAME)
      CRT "Enter Filename to get " :
      INPUT FILENAME
      IF FILENAME = "" THEN STOP
      CRT "Enter Location and File Name to Store on PC ":
      INPUT LOCNAME
      IF LOCNAME = "" THEN STOP
      RESP = ""
      CALL WIN.FTPGET(FILENAME,LOCNAME,1,RESP)
      IF RESP = "" THEN
        CRT "Got"
      END ELSE
        CRT "Failed - " : RESP
      END
    END ELSE
      CRT "Connect Failed - " : ERRMSG
    END
    END




    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Jonathan,

    Thanks for the post.  One clarification...we have ALWAYS gotten the file to transfer.  It is just the annoying message which causes some users confusion.

    I will look over your sample program for  differences...right off the top, I see you used a WIN.FTPSETDR - never used that.  Will look into what it does.

    Nelson

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Nelson Schroth
    Participating Frequently
    Jul 11, 2022 10:15 AM UTC
    Jonathan,

    Thanks for the post.  One clarification...we have ALWAYS gotten the file to transfer.  It is just the annoying message which causes some users confusion.

    I will look over your sample program for  differences...right off the top, I see you used a WIN.FTPSETDR - never used that.  Will look into what it does.

    Nelson

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Hi Jonathan,

    We do not use WIN.FTPSETDR since we use full pathname for the WIN.FTPGET local server's file name.
    Also, our usage is on AIX 7.2 running UV 11.3.1.
    It may just be that it works fine on your Windows machine and not on UNIX.

    Nelson

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Jonathan Smith
    Rocketeer
    Jul 11, 2022 10:46 AM UTC
    Hi Jonathan,

    We do not use WIN.FTPSETDR since we use full pathname for the WIN.FTPGET local server's file name.
    Also, our usage is on AIX 7.2 running UV 11.3.1.
    It may just be that it works fine on your Windows machine and not on UNIX.

    Nelson

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Hi Nelson,

    The set directory call worked for me when using it on a Windows install and AIX install. I removed the set directory call to be in line with what you do. I used a Windows Server and an AIX server and it still cannot see any error. Also tested on UniVerse and UniData and no difference. I am using version 6.4.4 of Wintegrate.

    Server Program OS = Windows NT
    Enter Server Name dentap
    Enter User Name root
    Password
    Enter Filename to get /disk1/ud82/bin/udt.errlog
    Enter Location and File Name to Store locally C:\\u2\\udt.errlog
    Got

    Server Program OS = UNIX
    Enter Server Name dentap
    Enter User Name root
    Password 
    Enter Filename to get /disk1/ud82/bin/udt.errlog
    Enter Location and File Name to Store locally C:\\u2\\udt.errlog
    Got



    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    Jonathan Smith
    Rocketeer
    Jul 11, 2022 11:18 AM UTC
    I was wondering if someone could comment on the use of the WIN.GETFTP host subroutine.  Every time we use it, it spits out a message "Invalid conversion type NO".  We have always set the type to "0" for ASCII when we make the call, but no matter what we set it to, we always get this message (and have for many years and versions of wIntegrate).  We currently use v6.4.0.

    What is it complaining about?

    ------------------------------
    Nelson Schroth
    president
    C3CompleteShop LLC
    Harrison OH US
    ------------------------------
    Nelson,

    Do you have an example of the file you are trying to upload via ftp.
    Also what happens if you use the ftp command to do the same at 

    a) the OS prompt in AIX
    b) the OS prompt in Windows


    Thanks,
    Jonathan

    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS