Consultor Eletrônico



Kbase P160311: 4GL/ABL: How to programmatically list all the connected  database Table Triggers ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/3/2011
Status: Verified

GOAL:

4GL/ABL: How to programmatically list all the connected database Table Triggers ?

GOAL:

How to list all the connected database Field Triggers using 4GL/ABL?

GOAL:

How to programmatically generate a report for all the connected database Table Triggers?

GOAL:

How to generate a report for all the connected database Field Triggers using 4GL/ABL?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Database

FIX:

1. The following 4GL/ABL procedure generates a report that lists all the Table Triggers' information of the connected database:
OUTPUT TO "TableTriggerReport.txt".
PUT UNFORMATTED
"Table" AT 1
"Event" AT 20
"Procedure" AT 35
"Override" AT 80
"CRC" AT 90
"File Recid" AT 97
"Last Modified" AT 110
"Mod Sequence" AT 125.
FOR EACH _File NO-LOCK WHERE _File._Tbl-Type = "T",
EACH _File-Trig OF _File NO-LOCK
BY _File._File-Name BY _File-Trig._Event:
PUT UNFORMATTED
_File._File-Name AT 1
_File-Trig._Event AT 20
_File-Trig._Proc-Name AT 35
_File-Trig._Override AT 80
_File-Trig._Trig-Crc AT 90
_File-Trig._File-Recid AT 97
_File-Trig._Last-modified AT 110
_File-Trig._Mod-sequence AT 125 SKIP.
END.
OUTPUT CLOSE.
2. The following 4GL/ABL procedure generates a report that lists all the Field Triggers' information of the connected database:
OUTPUT TO "FieldTriggerReport.txt".
PUT UNFORMATTED
"Table" AT 1
"Field" AT 15
"Event" AT 25
"Procedure" AT 35
"Override" AT 80
"CRC" AT 90
"File Recid" AT 97
"Field Recid" AT 110
"Field Rpos" AT 123
"Last Modified" AT 135
"Mod Sequence" AT 150.
FOR EACH _File NO-LOCK WHERE _File._Tbl-Type = "T",
EACH _Field OF _File NO-LOCK,
&nbsp.; EACH _Field-Trig OF _Field NO-LOCK
BY _File._File-Name BY _Field._Field-Name BY _Field-Trig._Event:
PUT UNFORMATTED
_File._File-Name AT 1
_Field._Field-Name AT 15
_Field-Trig._Event AT 25
_Field-Trig._Proc-Name AT 35
_Field-Trig._Override AT 80
_Field-Trig._Trig-Crc AT 90
_Field-Trig._File-Recid AT 97
_Field-Trig._Field-Recid AT 110
_Field-Trig._Field-Rpos AT 123
_Field-Trig._Last-modified AT 135
_Field-Trig._Mod-sequence AT 150 SKIP.
END.
OUTPUT CLOSE.
.