swift-on-z

A year ago, Apple made Swift open source. On the same day, December 3rd 2015, IBM introduced the IBM Swift Sandbox. With that step, IBM started the journey of bringing Swift to the server platform. The move was praised by many, yet the question was raised on how serious IBM is in supporting the server platform.

As developers celebrate the first anniversary for Swift in the open source community, it is good to assess the progress made in this journey. IBM has already contributed to the ongoing development of the Swift language, making it ready for enterprise deployment in the cloud/server platform. These efforts hit a milestone in September with the introduction of IBM Cloud Runtime for Swift. In addition, Swift was ported to Power Linux, and is now supported on LinuxONE.

How far would IBM go in supporting Swift? The IBM engineers are working in bringing Swift to z Systems, the traditional mainframe systems running z/OS. This will bring Swift closer to system-of-records, opening more opportunities for Swift development and deployment. We already have Swift compiler with the core language features working properly. C interoperability is already working, and most of the primary test suite is passing.

We are excited to announce a closed-beta program has started this week for clients who are interested in trying out Swift on z/OS. If you would like to join us in this next part of the Swift@IBM journey, visit the official website for the IBM Toolkit for Swift on z/OS

17 comments on"Try Swift on z/OS"

  1. Would be interested in trying Swift on LoZ and then on zOS.

    • Shereen_Ghobrial December 12, 2016

      We thank you for your interest and for this posting. We will contact you directly to arrange for you to get access to our early drivers for Swift on LoZ and then on z/OS. Thank you.

  2. This is simply amazing!

  3. fswarbrick April 12, 2017

    I’m quite curious about this.
    – Will a Swift application require execution in a z/OS UNIX environment (like Java) or can it run in a “legacy” JCL environment (like COBOL, C (I think!) and PL/I)?
    – Will there be support for reading “legacy” MVS datasets. Specifically, record sequential and the various VSAM?
    – What really is the goal in porting Swift to z/OS? Is there any expectation that business processes currently written in COBOL might be written in Swift? Can COBOL call Swift routines?
    – Can/will Swift programs run in CICS?

    • Shereen_Ghobrial April 12, 2017

      Those are all good questions. Swift requires USS. As for reading MVS datasets, it should be possible since you can do it in C, but there are not currently good interfaces for in Swift working with them. We will be working building new Swift libraries to help read legacy files. The goal of Swift is to enable enterprise clients to modernize their ecosystem and extend their current business processes, currently in COBOL/CICS, to include Swift. This means Swift interoperability with CICS, COBOL, IMS, and DB2. Regarding your question about CICS, yes, we already have a proof-of-concept of Swift programs running in CICS.

      • fswarbrick April 13, 2017

        Thanks for the answers. Under CICS, do you foresee non-Swift programs being able to invoke Swift programs via EXEC LINK or EXEC XCTL? And similarly Swift programs invoking non-Swift programs in the same manner? Also, in a batch environment at least, will a Swift program be able to “call” a COBOL program (I assume in a manner similar to how it could call a C program, and apparently a PL/I program)?

        And a loaded question… Any sort of timeline in place? 🙂

        • Shereen_Ghobrial April 18, 2017

          Under CICS, the plan is to enable cross program linkage using an EXEC CICS like command. This means non-Swift programs will be able to invoke Swift programs, and visa versa.
          In batch environment, Swift applications will be able to call C programs and PL/I programs (in 64bit mode). We will work for a solution to call COBOL programs, but that would need more efforts because Swift is 64bit and COBOL is 31bit.

  4. David Crayford April 17, 2017

    Can you send me instructions on how to download the code?

    • Shereen_Ghobrial April 18, 2017

      Sure, we will send you email invitation to access the beta drivers.

  5. David Crayford April 19, 2017

    I think it’s great that IBM are porting modern programming languages and runtimes to z/OS. I ported Lua a while ago and it really did make a big difference to our tool chain. I’m wondering why IBM thinks Swift can make in dent server side on z/OS? There are many contemporary JVM languages like Scala that have similar if not better features and can easily make use of the massive amount of libraries available to Java.

  6. Shereen_Ghobrial April 19, 2017

    Hi David, thank you for the comment and for raising such a good question. In comparison to other dynamic languages, Swift is a statically compiled language. Hence, it does not run under a JVM, and that has its own advantage in terms of performance, and type-checking at compile time.

  7. David Crayford April 20, 2017

    Thank you for your answer Shereen. Scala is also a statically typed language. In fact it probably has the most sophisticated type system of any language. It’s also similar to Swift in that it has the feel of dynamically typed language with type inference etc. Swift is easier to learn though. As a C++ programmer I would probably have preferred Rust but beggars can’t be choosers. I’ve just installed Swift on z/OS and it has some neat features like ILC with C and PL/I. The compile times are excruciating though!

    • Shereen_Ghobrial April 20, 2017

      One point I missed highlighting is the large population of available Swift developers. This is one of the main motivations for IBM to stand behind Swift to open the mainframe to all those developers.

  8. Aravinthkumar_J May 11, 2017

    This is really cool. I’m keen in trying this out. Appreciate if you can pls email me the instructions and sample code.

    • Shereen_Ghobrial May 11, 2017

      Thank you for your interest. We will contact you offline to join our beta program.

  9. David Chambers July 19, 2017

    Is the Swift on z/OS beta program still open to new users? Thanks.

    • Shereen_Ghobrial July 19, 2017

      Hi David,

      Yes, the beta program is still open. I will contact you directly to send you the invitation to the beta program.

Join The Discussion

Your email address will not be published. Required fields are marked *