The Gateway to Learning SAP Open Server: CTOS, Fullpass and Other Samples [Part 1]

    By: Paul Vero on May 01, 2014

    This article is part one of a three-part feature focusing on the SAP Open Server. In this part, we’ll concentrate on the building and usage of the CTOS (Client to Server) gateway.

    The use of SAP OpenServer provides customized solutions to various problems. In the client/server programming model we are all used to using the SAP ASE as our server – the processor of our requests, originating from the client applications we write. The SAP ASE is a complete database server. With SAP Open Server, we can write specialized applications that can do all sorts of tasks. It can provide access to real-time data, interfaces with services such as email or act as an intermediary between databases to facilitate communications between disparate systems..

    In this article we’ll focus on the latter through the use of some SAP Open Server samples specifically written as gateways to the SAP ASE so the developer can learn the nuances of gateway programming. In fact, these samples are a great way to learn the SAP Open Server API. The libraries provide Server-Library, CS-Library and ClientLibrary. The gateway samples guide the programmer through the basic tenets of this sort of client/server paradigm. There are two styles of gateway samples. The first, known as “ctos”, probably meaning client to server, uses the API calls to handle the client communications to the SAP ASE. The fullpass sample uses the pass through calls to read and send packets of TDS data back and forth between client and server. There is no manipulation or interpretation of this data. In the case of ctos, it acts as a proxy SAP ASE to some degree. I often use it to test cases involving products such as OpenSwitch and DirectConnect whenever I suspect an SAP Open Server situation. If the gateway replicates the problem then I can eliminate the product and focus on the SAP Open Server code.

    The format of this article will be freeform as I go from running the gateway to a walk-though of the source code and things in between. As always, if you find interest in the product you can build the sample applications. Keep in mind SAP Open Server is not included in the SAP SDK for SAP ASE. It is a product requiring purchase and licensing.

    CTOS - A Client and Server
    I’ll introduce ctos in the same mindset I use when setting up for working on a subcase. I’ll run into some issue, like an SAP Open Server error on a gateway product such as SAP OpenSwitch or SAP DirectConnect. In order to simplify the problem I can run the ctos gateway and run the test through it, inspect the results and determine if the problem is in the SAP Open Server or not. I first decide if I use version 15.5, 15.7 or 16.0 depending on the product I am testing. Installation of SAP Open Server is similar to SDK. Files are copied into the same directory structure as we find with the SDK. You’ll find the dll/lib, bin, include and sample folders under $SYBASE/OCS-15_0 or %SYBASE%\OCS-15_0. After it’s installed you might decide on a name for your ctos server and put it in the interfaces file. While you’re at it add the SAP ASE you’ll use for the ctos gateway. You’ll have to build it, and I’ll get to that in part two but for now we’ll start it up and run a query through it.


    Login to read the article. Not a member? Create a free account!

    Released: May 1, 2014, 11:35 am | Updated: October 8, 2014, 9:53 am
    Keywords: ASE Developer Article | Technical Journal | ASE | CTOS | Development | Gamification | Paul Vero | SAP Open Server | TDS




    Copyright © 2014 ISUG-TECH. All Rights Reserved
    All material, files, logos and trademarks within this site are copyright their respective organizations

    Terms of Service - Privacy Policy - Contact the Help Desk