none
ftpWebRequest limitation for IBM Mainframe RRS feed

  • Question

  • I was trying to automate several processes involving an IBM Mainframe. One of these involves using the FTP server on the mainframe. I was researching using the ftpWebRequest object, until I found what appear to be multiple limitations.

    First, it looks like you only get one function per request.

    Second, I cannot use the IBM specific FTP commands because they are not in the list of valid choices in the Method property.

    Any suggestions as to what to do since this object seems to have some rather unnecessary limitations. I need to execute several commands together as a group and I need commands that are not in the "approved" list.


    Mike

    • Moved by Mike Feng Wednesday, February 13, 2013 1:58 PM
    • Moved by Mike Feng Wednesday, February 13, 2013 1:58 PM
    • Moved by Sheng Jiang 蒋晟 Friday, March 8, 2013 4:56 AM System.Net question
    Wednesday, February 13, 2013 12:37 AM

Answers

All replies

  • Hi Mike,

    Welcome to the MSDN Forum.

    Based on my understaning, this is not an issue about CLR, I moved this thread to where is the forum for to look for an appropriate forum.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 13, 2013 1:58 PM
  • I'd talk to IBM:

    https://www.ibm.com/developerworks/forums/index.html

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer



    My Blog: http://unlockpowershell.wordpress.com
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})

    Wednesday, February 13, 2013 3:38 PM
  • Is ftpWebRequest part of the CLR? I thought it was. So why is this not about CLR? In the last two days it seems like I have not been able to ask questions that are in the appropriate forum. It seems like the moderators are more interested in how many replies they are able to make rather than actually being helpful. The Partner forums are screwed up and do not have the "Ask a question" button for the forum, so I have been directed to these forum. I must say that it is quite a step down.

    Mike

    Wednesday, February 13, 2013 5:24 PM
  • Gee Karl. Are you honestly trying to be helpful? IBM is not the only vendor who has extensions to FTP. I can understand that MS may have a desire to "idiot proof" this class but in the process have proved themselves to be the idiots because of their short sightedness in making these restrictions that apparently are not as appropriate as they envisioned.

    In addition I have found it to be an MS hallmark to create classes that are too narrow in scope and do not do the job unless you are faced with the very narrow scope they use to design a class. This is an example. If you need to issue multiple commands in the same FTP session, the tool is not appropriate. So you read with glee that there is something already built in that can handle FTP. Then when you try to use it you find it totally inadequate and the glee turns to utter frustration.


    Mike

    Wednesday, February 13, 2013 5:31 PM
  • Mike;

    If you insist on trying to get support for IBM's ftp server in a Microsoft forum, I'd suggest you post in the language specific forum under Visual Studio Languages.

    That said, your best bet is the IBM forum.

    I'd also suggest that you not take your frustration out on volunteers who are attempting to help you.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer



    My Blog: http://unlockpowershell.wordpress.com
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})

    Wednesday, February 13, 2013 8:49 PM
  • OK Karl. I don't mean to point fingers where they are not appropriate. But it seems like I am having a genuine issue understanding a few things.

    First, IBM's extensions are what they are. You cannot do what they do with the standard set of commands. That is why the are extensions. IBM's FTP server is capable of doing what I need. What are they supposed to do to help when the programming environment will not do what I need it to do to take advantage of these facilities? I can do them with the command line ftp facility by using the QUOTE keyword. Guess what. I do not see how I can program the subject object to do that. I see this as an unnecessary restriction in the MS product. Now maybe you have a bias toward MS and feel their way is golden and if it cannot be done with their tool, then the problem must be with the other guy.

    Problem is, I have been in this programming game for awhile. Wrote my first program in 1968 and have been working professionally at it since 1973. I have seen a lot of vendors and know a bit about everything. I may not have specific knowledge about the best tool to use, which is why I am here asking what I can use, but I do know enough and have enough experience to know where the problem is. A tool that is purported to be an FTP tool that cannot work with the universe of FTP servers is not a very good tool.

    Second, you suggest that I go to a language specific forum. I originally posted this in the CLR forum. It is a problem with a class in the CLR, yet I am told it is not appropriate for that forum. I don't understand why not. It is not a part of ANY language. I did not even specify what language I was using. And if I am not mistaken the C in CLR is Common, which I believe means that it is common to all languages. So I do not understand why going to a language specific forum is appropriate. I am looking for a way to do these things using facilities in the CLR. Once again, I do not understand why the CLR forum is not appropriate. Help me understand if you can. What is the scope of the CLR forum if it not CLR?

    My apologies if I offended you. I just did not think the "Talk to IBM" suggestion was appropriate. I do admit that I have been very frustrated with the forums and perhaps that may have colored the way I responded, but I still do not think it is a valid approach IMHO.


    Mike

    Wednesday, February 13, 2013 10:02 PM
  • "Talk to IBM" is certainly a valid approach. Isn't it their extension?

    In other words, you might find no one who has this scenario over here (but you might on an IBM site).

    But you're right that it's not the only approach. Did you try Karl's suggestion of posting to the language forum?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Sunday, February 17, 2013 8:04 AM
  • Thanks Ed. I did not try the language forum because I found a work around. I am not trying to be arguementative here, but I really don't understand something. Perhaps it is my fault, but I still find it disconcerting that I am asking a question about a .NET class that is part of the common runtime, and being told it is not appropriate in the common runtime forum. It baffles me.

    The way I see it is that I know there are other extensions to FTP provided for other servers. Asking IBM seemed to be counter productive in that their extensions are not the same as other servers, so it seemed appropriate to ask for how I can deal with extensions when I run into them ONE TIME by seeking a non-restrictive class. It seems awful short sighted for MS to have designed the control this way, and having at least a little hope that there would be one that was available that did not have those restrictions. I am not looking for the short term solution, but one that will stay with me as I move on to other projects.

    I do find that the command line FTP facility has similar restrictions. If you enter the IBM supported function, it doesn't just send it, it checks it against its own list of what it considers valid, if it doesn't like it, it give you an error. However, there is an option where you and put the keyword QUOTE into the command, followed by the foreign command, and it will send it even though it does not recognize it. As "escape" code if you will. So I actually built a command file and executed a batch file that invokes the command line FTP program and got the functionality I needed. I would have preferred to do it directly in the program, but at least this works.

    Thanks for everyone's attention. Sorry if I stepped on anyone's toes.


    Mike

    Monday, February 18, 2013 12:54 AM
  • Thanks Ed. I did not try the language forum because I found a work around. I am not trying to be arguementative here, but I really don't understand something. Perhaps it is my fault, but I still find it disconcerting that I am asking a question about a .NET class that is part of the common runtime, and being told it is not appropriate in the common runtime forum. It baffles me.

    The way I see it is that I know there are other extensions to FTP provided for other servers. Asking IBM seemed to be counter productive in that their extensions are not the same as other servers, so it seemed appropriate to ask for how I can deal with extensions when I run into them ONE TIME by seeking a non-restrictive class. It seems awful short sighted for MS to have designed the control this way, and having at least a little hope that there would be one that was available that did not have those restrictions. I am not looking for the short term solution, but one that will stay with me as I move on to other projects.

    I do find that the command line FTP facility has similar restrictions. If you enter the IBM supported function, it doesn't just send it, it checks it against its own list of what it considers valid, if it doesn't like it, it give you an error. However, there is an option where you and put the keyword QUOTE into the command, followed by the foreign command, and it will send it even though it does not recognize it. As "escape" code if you will. So I actually built a command file and executed a batch file that invokes the command line FTP program and got the functionality I needed. I would have preferred to do it directly in the program, but at least this works.

    Thanks for everyone's attention. Sorry if I stepped on anyone's toes.


    Mike

    Then that's a third solution... to send it back to the Common Runtime forum, which I can do.

    But they obviously thought it was more about the IBM mainframe and FTP commands. Okay, I can see why. One action could be to post a new question there, but to leave IBM out of it, and focus on the more vague common runtime question. This question confused me too until you explained it later. Even the title might entice someone to dismiss this as off topic from the .NET class category.

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!


    Monday, March 4, 2013 8:37 AM
  • You might want to split questions to something like "Custom ftpWebRequest Command?" next time. 

    By the way the answer for custom command is no, the documentation for FtpWebRequest.Method states:

    Note that the strings defined in the WebRequestMethods.Ftp class are the only supported options for the Method property. Setting the Method property to any other value will result in an ArgumentException exception.

    There are plenty of third-party ftp implementations that support arbitrary commands.

    The one function per request is not an actual limitation, if the KeepAlive property is true, FtpWebRequest caches its connection and reuse for a future request. Create the FtpWebRequest for each function may sound laborious though.



    Visual C++ MVP

    Friday, March 8, 2013 5:04 AM