Some examples of small programs developed with the powerful COBOL language
These codes can be tested in Jdoodle, an Online COBOL compiler.
File | Description | Result |
---|---|---|
HelloWorld | Famous example "Hello World" | |
Calculations | Basic Arithmetic Calculations | |
Strings | String Manipulation (Replacement - Replace) | |
Condicionais | Conditional Examples and Custom Validation) | |
Function/Loop | Calling Functions and Loop | |
Nested Loop | Nested Loop | |
Accept e Display | Data entry and processing | |
Crypto | Encrypt and Decrypt a Word | |
JobCalc | Mathematic Expression Solving |
The codes shown below require a local compiler (I'm using Micro Focus eXtend 9.2.5) for Microsoft Windows.
The code Barras presents several lines in different formats and sizes that can be used in the most varied types of applications using COBOL Micro Focus eXtend in a Windows environment. Code taken from the Micro Focus eXtend documentation itself and was translated and adapted for this repository.
The Code Browser demonstrates that it is possible to develop your own web browser using the Micro Focus eXtend tools. Code taken from the Micro Focus eXtend documentation itself and was translated and adapted for this repository.
The code Checkbox demonstrates a simple use of the CheckBox component where the simulation of the final price of a vehicle changes according to the selected options. Code taken from the Micro Focus eXtend documentation itself and was translated and adapted for this repository.
The code Radiobtn demonstrates a simple use of the Radio Button component where the simulations where would you be simulating the selection of an ice cream flavor. Code taken from the Micro Focus eXtend documentation itself and was translated and adapted for this repository.
The code Gridctl demonstrates an interesting use of the Grid Control component where we can manipulate the grid, changing the column size, the row size, Selecting an entire column, selecting an entire row, changing the value inside the Cell, an animated Bitmap, Pop Up menu by clicking right-click and click directly on the Grid's animated icon. This component is widely used in the most varied types of applications and the component's potential goes far beyond what this example presents. Code taken from the Micro Focus eXtend documentation itself and was translated and adapted for this repository.