Coding the ABL program
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Coding the ABL program
The ABL program:
- Assumes that the C program creates and connects the named pipe
- Refers to the named pipe using the name the C program specifies
- Uses the
INPUT FROMstatement to read the named pipe - Uses the
OUTPUT TOstatements to write the named pipe - Uses the
INPUT CLOSEandOUTPUT CLOSEstatements to close the named pipe
The i-ablpip.p ABL
program demonstrates reading and writing a Windows named pipe, custpipe.
i-pipex1
|
The i-ablpip.p program:
- Defines three buttons, labeled "Write to Pipe," "Read from Pipe," and "Quit."
- Defines a form to contain the buttons.
- Defines a trigger for the Write to Pipe button. The
trigger redirects output to named pipe
custpipe, displays (to named pipecustpipe) the name of eachCustomerin thesports2000database, and closes the named pipe.In an
OUTPUT TOstatement,\\.means the current machine. To communicate with remote machine "pcdev68," for example, use\\pcdev68. This follows Uniform Naming Conventions (UNC).The
OUTPUT TOstatement uses theAPPENDoption, which causes ABL to open the named pipe without first creating it. This is necessary because ABL cannot create named pipes. - Defines a trigger for the Read to Pipe button. The
trigger defines an integer data item, reads named pipe
custpipe, assigns the value read (a customer number) to the integer data item, closes the named pipe, retrieves the row of the customer table with the specified customer number, and displays the columns of the row.The
INPUT FROMstatement assumes that the pipe exists and that another process writes to it. TheINPUT FROMstatement blocks until the other process writes to the named pipe. - Defines a trigger for the Quit button.
- Enables all objects in the frame and waits on a close event.