- Description
- How to use it
- 1. Accessing the CLI
- 2. Adding triggers to a table
- Implement trigger
- 3. Writing statements
- 4. Key mappings in b1 client in gitpod
- Further information
- CRC problems and solutions
- How field-rpos can affect CRC errors
Description
For development issues it’s sometimes necessary to enter the databases, which are included directly in a container of the workspace. For advanced settings, the way to enter the DB via the progress terminal tool is described afterwards
How to use it
1. Accessing the CLI
- Enter
build-one client
orb1 client
(which is the short form) into the terminal - You can cancel the login screen (by navigating with the arrow keys to
<Cancel>
and press enter
- Now you see the menu and could normally navigate in the menu by clicking
F3
but since we’re working in the browser this key input is interpreted differently and you have to useESC + M
, which has the same functionality asF3
- Now you can navigate to
Tools -> Data Dictionary
- To choose a database, use
Database -> Select Working Database
2. Adding triggers to a table
Define trigger in table
- Choose a database and click
Schema -> Modify Table
- Choose a table
- Navigate to
<Trigger>
using the arrow keys andTab
- Enter the filename of your to be created trigger in the action you want to use (in this example its the write statement) and adjust
Overrideable
andCheck CRC
as seen in the screenshot
- Confirm with
<OK>
Implement trigger
- To implement a trigger navigate in the source tree to
src -> backend -> DB -> Choose DB you would like -> trigger
- Create a new file named exactly like defined in the trigger and implement there your logic in ABL
3. Writing statements
- To write statements in ABL you can use the progress terminal tool directly
- Below is an example, which gets all entries from
tablename
and display for each entry the fieldfield1
Example code
FOR EACH tablename:
DISPLAY tablename.field1.
END.
To execute this command use normally F1
, escaping for that to use in browser would be CTRL + X
4. Key mappings in b1 client in gitpod
Action | Values in gitpod |
F1 | CTRL + x |
F3 | ESC + m |
F4 | CRTL + e |
Further information
CRC problems and solutions
In OpenEdge, the field-rpos
(field relative position) refers to the position of a field in a database table. When fields are added, deleted, or reordered in the schema, the field-rpos
values may change, which can lead to differences between the schema the r-code was compiled against and the schema in the target database.
The r-code stores CRC checks for tables and fields, which include the field-rpos
. If the field positions change between the time the r-code was compiled and when it's executed against another database (such as after a schema change or when loading a .df
file), the CRC check fails, resulting in a CRC error.
How field-rpos
can affect CRC errors
- Schema Mismatch
- If the schema loaded into DB2 (target database) has a different
field-rpos
from DB1 (source database) where the r-code was compiled, the CRC stored in the r-code will no longer match the schema in DB2, leading to CRC errors. - Field Reordering
- If fields were reordered in DB1 (source) after the r-code was compiled, but the new schema was not loaded into DB2, the r-code might still expect the old field order. This will cause CRC errors, even if the field names and types are the same.
- Adding/Deleting Fields
- Adding or deleting fields in a table will shift the
field-rpos
of subsequent fields, causing a CRC mismatch unless the r-code is recompiled with the updated schema.
Back to Documentation
Back to Home Page