-1

Is there a way to FTP a file to a mainframe dataset and run a command like this?

"SITE RECL=150"

I was able to do it with an FTP library called Fluent FTP. Are there any other free libraries that support this or another way to do it with code besides using a third party library using C#?

user3266638
  • 429
  • 8
  • 25
  • 1
    So why do you want to use other library, if you can do it with FluentFTP? – Martin Prikryl Feb 16 '20 at 17:15
  • @MartinPrikryl occasionally there's some socket error which looks to be an existing bug in the library but it's not been fixed yet so I'm just looking for a backup alternative library. – user3266638 Feb 16 '20 at 20:00
  • 2
    That information should be edited into your question, not posted as a comment. Though you may want to post details about the error as well. Maybe it's not the way you think. This might be [XY problem](https://meta.stackexchange.com/q/66377/218578). – Martin Prikryl Feb 17 '20 at 06:42
  • So are you opposed to using `FTP.exe` that is included with every Windows operating system? – Squashman Feb 21 '20 at 18:11

2 Answers2

0

" z/OS Communications Server: IP User's Guide and Commands ". Topic: SIte subcommand—Send site-specific information to a host.

Link: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.halu001/site.htm#site

Correct command for setting record lenght should be "SITE LRecl=150"

Zan
  • 1
-1

You could investigate other FTP libraries, such as edtFTPnet/Free:

https://enterprisedt.com/products/edtftpnet/

However, a couple questions:

  1. Should you be interacting with the mainframe via file transfers at all? File transfers are inherently batch-oriented. If your end users have batch-oriented expectations, OK, fair enough. But is that true now, and will they in the future? Mainframes offer myriad choices for bidirectional, transactional, online-oriented interactions, so you don't have to insert unnecessary/unwanted delays in business processes (if that's what you're trying to do or at least to perpetuate).

  2. How about shifting to a REST API interaction, even if you must use a file transfer? If the mainframe in question is running z/OS, the z/OS Management Facility (z/OSMF) provides the "z/OS data set and file REST interface" that shouldn't require any extra FTP library at all. z/OSMF is included as a standard, IBM supported feature with the base z/OS operating system license at no additional charge. All IBM supported releases of z/OS (and a couple now unsupported, older z/OS releases) include z/OSMF. IBM z/OSMF documentation is available here (z/OS 2.4 assumed, and this link is otherwise subject to change):

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.4.0/com.ibm.zos.v2r4.izu/izu.htm

  • This doesn't really answer the question. How do you even know there is user. Maybe this is a batch environment that FTPs a file at the end. – SaggingRufus Feb 17 '20 at 12:09
  • There are *always* end users, somewhere, maybe X steps removed. Otherwise, why do any computing? Yes, that's precisely the question: do the end users have batch-oriented expectations? If they do, then maybe FTP is acceptable. If they don't, and frequently they don't, then FTP is very likely a terrible choice. – Timothy Sipples Feb 24 '20 at 02:22