Features of the DATACOM interface
Here
are some of the features of the ULTIM language that apply to the processing of DATACOM databases. Some are shown in the example below.
- Ability to automatically convert parts or the whole DATACOM dictionary into an ULTIM dictionary.
- Ability to directly access the DATACOM dictionary (keyword: @DATACOM).
- Automatic management of the link protocols to the databases.
- Additional
keywords of the PROCESS statement to resume reading a table from
a particular occurrence, forward or backward (FIRST, LAST,
FOLLOWING or PRIOR).
- Ability
to read in key order or physical order, as well as to simultaneously read several tables of a same area.
- Ability to directly access a table occurrence by its key or its address (REC-ID).
- Access to the REC-ID of the processed occurrence, as well as to the return code of the operation.
Example of program
BEGIN
DEMO.
* Reading of the data
DATACOM USER=JOHN, PASSWORD=HIDE, VERSION=PROD.
PROCESS
EACH @DATACOM:CUSTOMER
WHERE LAST-PAYMENT < 20150301 AND BALANCE > 0.
PROCESS GET @DATACOM:DIVISION ; DIVISION table having the
WHOSE NUMBER =
CUSTOMER:DIVISION. ; NUMBER found in CUSTOMER
CRITERIA DIVISION:VALUE < 125000. ; Process if VALUE of
DIVISION < 125000
PROCESS GET @DATACOM:NAMEADDR ; Table "name and address" having
WHOSE CODE =
CUSTOMER:CODE. ; the same CODE as CUSTOMER
* Report to be produced
OPTIONS
HEADING=AUTO, SPACING = 5.
REPORT
CUSTOMER:DIVISION, NAMEADDR:NAME, ACCOUNT-NBR, BALANCE(12,TOTAL), LAST-PAYMENT.
TITLE ACCOUNTS OUTSANDING FOR MORE THAN 2 MONTHS AS OF MAY 1, 2015
CONTROL
SUBTOTALS=1.
END
Tabulated report produced by REPORT, TITLE and CONTROL statements
MAY 6, 2015 PAGE 1
ACCOUNTS OUTSTANDING FOR MORE THAN 2 MONTHS AS OF MAY
1, 2015
DIVISION ------NAME----- ACCOUNT
NBR BALANCE LAST PAYMENT
N-EAST LLOYD &
SONS
2369108
$34.94 2015/02/21
THE LAMP
SHOP
3246538
$199.00 2014/12/15
THE
LIGHTHOUSE
1071638
$2,189.10 2015/01/06
........................................... $2,423.04
N-WEST MVC
INC.
1387
$4,189.95 2015/01/28
PLANT
LIGHTING
9066489
$1,450.49 2015/02/12
QUALITY
SWITCH
9193257
$469.20 2015/02/16
ZEUSS
DISCOUNT
1479380
$964.99 2015/02/01
ZIGGER'S
2102981
$2,849.59 2014/11/01
........................................... $9,924.22
S-EAST ACME LITE
LTD.
843896
$360.47 2015/02/11
ELECTRIC
SHOP
2225751
$194.90 2014/12/21
LIGHTNING
LAMP
3178456
$475.20 2014/12/05
RUSSELL &
SONS 386660
$895.45 2015/01/12
TOP
SERVICES
3143486
$10.00 2015/02/01
........................................... $1,936.02 ........................................... $14,283.28
|