The following examples describe a number of short-cuts for solving everyday problems within ACCENT R. The scripts can be modified to fit your exact situation. Refer to the following pages for a detailed description of the functions described. The Books Sample Database can be accessed for these examples.
$ACCENT |
|
Choose
"ICL" from the Guide Menu
|
|
*CREATE
DBL ORDER
|
|
*USE
DBL ORDER
|
|
*USE
ORACLE SERVER AS WAGNER PASSWORD IS XYZXYZ password:
|
|
*OSQL
CREATE DS FOR ALL TABLES enter the user name:enter the user password:
|
|
*OSQL
SELECT * FROM CUSTOMER WITH WINDOW DEFINE PM CUSTOMER_VIEW ONLY
|
|
*OSQL
INSERT INTO CUSTOMER WITH WINDOW DEFINE PM CUSTOMER_ADD ONLY
|
|
*OSQL
UPDATE CUSTOMER WITH WINDOW DEFINE PM CUSTOMER_CHANGE ONLY
|
|
*LIST
PM CUSTOMER_VIEW
|
Examine
the modifiable source code.
|
OSQL
MENU Customer Menu HORIZONTAL &ITEM VIEW CUSTOMERS USE PM CUSTOMER_VIEW
&ITEM UPDATE CUSTOMERS USE PM CUSTOMER_CHANGE &ITEM ADD CUSTOMERS
USE PM CUSTOMER_ADD &DEFINE PM CUSTOMER_MENU ONLY OSQL USE PM CUSTOMER_MENU
|
|
*QUIT
|
You’ve
just prototyped an application in on-line SQL. Each of the PM’s
created can be easily modified or extended.
|
$ACCENT
|
|
Choose
"ICL" from the Guide Menu
|
|
*CREATE
DBL MAINT
|
|
*USE
DBL MAINT
|
|
*USE
ORACLE SERVER AS WAGNER PASSWORD IS XYZXYZ password:
|
|
*OSQL
CREATE DS FOR ALL TABLES
|
|
*OSQL
BUILD FOR ALL TABLES DEFINE CM BUILD_ALL ONLY
|
|
*USE
CM BUILD_ALL
|
Execute
the script.
|
*OSQL
USE PM MAINT_MAIN_MENU
|
|
*QUIT
|
You’ve
just implemented a complete system for adding, changing, and viewing records
on the Oracle Server.
|
$ACCENT
|
|
Choose
"ICL" from the Guide Menu
|
|
*USE
DBL ORDER
|
|
*OSQL
EXPORT FROM NISDATA:STORES_RMS.DAT TO STORES_ORA
|
$ACCENT
|
|
Choose
"ICL" from the Guide Menu
|
|
*USE
DBL ORDER
|
|
*USE
ORACLE SERVER AS WAGNER PASSWORD IS XYZXYZ
|
|
*USE
SF CUSTOMER.LIS AS LOG
|
Open
an SF (System File) Object as a log file.
|
*OSQL
SELECT * FROM CUSTOMER WHERE STATE = 'CA'
|
|
*USE
NO SF LOG
|
Close
the SF Object that contains our report.
|
*QUIT
|
Leave
the ACCENT R environment.
|
$TYPE
CUSTOMER.LIS
|
Use
DCL to view the report we created.
|
$ACCENT
|
|
Choose
"ICL" from the Guide Menu
|
|
*USE
DBL ORDER
|
|
*SET
'EDIT/EDT' TO @EDITOR
|
Tell
ACCENT R about your editor.
|
*DEFINE
(or MODIFY) CM SETUP
|
Your
favorite editor is invoked here to modify the DBL Object.
|
$CREATE BEGIN.ACC
|
The
file BEGIN.ACC is invoked each time ACCENT R is started.
|
*SET 'EDIT/EDT' TO @EDITOR
|
We
always wish to use EDT as our editor.
|
*ENABLE PM DEBUG
|
The
PM (Process Module) Object debugging should always be enabled for our
sessions in ACCENT R.
|
*EQUATE COMMAND GO TO CM SETUP WITH OPTIONAL TEXT
|
Set
up a special command for my ACCENT R environment.
|
*CONTROL-Z
|
Close
the file at DCL level.
|