Kbase P98494: The Position property in the Field Properties under the Data Dictionary.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/12/2004 |
|
Status: Unverified
GOAL:
What does the Position property describe under the Field Properties of the Data Dictionary?
FIX:
Under Data Dictionary > Field Properties for any field there is a property called Position. The position referred to is the position of the field relative to other fields within the same table (i.e. whether it is the 2nd field, the 3rd field, and so on).
This value is one of the values used when CRC values are generated.
The following example was tested using OpenEdge 10.0B on Windows 2000.
1. Compile the following against sports2000 (Compile custnum.p save.) -
/* custnum.p */
for each cust:
disp custnum.
end.
This creates custnum.r. It can be run with prowin32 -1 sports2000 -p custnum.r
2. Dump df and data from sports2000.
3. In sports2000.df the following definitions for the customer.custnum and customer.name appear -
ADD FIELD "CustNum" OF "Customer" AS integer
FORMAT ">>>>9"
INITIAL "0"
LABEL "Cust Num"
POSITION 2
MAX-WIDTH 4
VALEXP "custnum > 0"
VALMSG "Customer number must be greater than zero"
HELP "Please enter a customer number."
ORDER 10
ADD FIELD "Name" OF "Customer" AS character
FORMAT "x(30)"
INITIAL ""
LABEL "Name"
POSITION 3
MAX-WIDTH 60
HELP "Please enter a name."
ORDER 30
4. Change the POSITION for custnum to 3, POSITION for Name to 2.
5. Create a new sports2000 using the modified df, load the data. Under Data Dictionary > Field Properties, it can be seen that the Custnum and Name fields are now in a different Position to what they were in the previous version of the database.
6. prowin32 -1 sports2000 -p custnum.r now returns errors 1896 and 492 errors:
** CRC for Customer does not match CRC in custnum.r. Try recompiling. (1896)
** Unable to run startup procedure custnum.r. (492)