As soon as your installation and setup are complete, you may compile and run the demonstration program (demo.cbl), which is included in the sample directory (which by default is %PUBLIC%\Documents\Micro Focus\extend x.x.x\sample). This program illustrates many of the Acu4GL product capabilities, including how to:
The demo program simulates what might be used in a distributor's shipping department. You'll be creating the orderfile table in an existing database of your choosing. The table will contain information about the orders placed by the distributor's customers. The orderfile table has the following columns of information (the database data type and COBOL data type are shown for each):
Column Name | Data Type | COBOL PIC |
---|---|---|
order_name | varchar(4) | pic 9(4) |
order_date | int | pic 9(6) |
customer_num | varchar(3) | pic 9(3) |
ship_instruct | varchar(40) | pic x(40) |
backlog | varchar(1) | pic x |
po_num | varchar(10) | pic x(10) |
ship_date | int | pic 9(6) |
ship_weight | decimal(8,2) | pic 9(6)v99 |
ship_charge | decimal(6,2) | pic 9(4)v99 |
paid_date | int | pic 9(6) |
Here is the COBOL FD (file descriptor) that matches the orderfile table. Note that the FD entries must match the names of the RDBMS fields and must match their data types:
fd orders. 01 order-record. 03 order-num pic x(4). 03 order-fields. 05 order-date pic 9(6). 05 customer-num pic 9(3). 05 ship-instruct pic x(40). 05 backlog pic x. 05 po-num pic x(10). 05 ship-date pic 9(6). 05 ship-weight pic 9(6)v99. 05 ship-charge pic 9(4)v99. 05 paid-date pic 9(6).