Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Named Pipes : UNIX named pipes
 

UNIX named pipes

This chapter provides information to get you started using named pipes with ABL on a UNIX system. You can find more information on UNIX named pipes in any of the books on advanced UNIX programming available in the public domain.
To use UNIX named pipes with ABL:
1. Create the named pipes using the UNIX mknod command in the command line or the mknod() system call from within C.
2. Start an OpenEdge session in the background (batch mode) running a message handler procedure. The message handler procedure runs indefinitely, searching for input from one named pipe, running requests, and shipping output through a second named pipe. (You must supply the message handler procedure. For a sample message handler procedure, see UNIXnamed pipe examples.)
3. Run your non-OpenEdge application. From within the application, issue messages through the first named pipe in Step 1 to the background OpenEdge session, and receive replies through the second named pipe.
Once you create a named pipe, you can access it as if it were a text file. Thus, the only requirement for a non-OpenEdge application to communicate with ABL via named pipes is that the application be able to write to and read from text files. Also, it is helpful for the application to have facilities for processing returned results (for example, string handling functions, buffers, etc.).
The following sections describe how to:
*Create a UNIX named pipe
*Delete a UNIX named pipe
*Use a UNIX named pipe between OpenEdge and non-OpenEdge applications
Note: Named pipes might be implemented on your system differently than described in the next section.
* Creating a named pipe
* Deleting a named pipe
* Accessing a named pipe within ABL
* UNIX named pipe examples