Question What Is The Syntax To Update A Field Format In A .p File

Francois Caron

New Member
Hi,

I want to change a field's format in a Progress DB in a .p and I'm wondering what is the correct syntax.

I tried a lot of things and it doesn't compile...

UPDATE Client.extention
SET FORMAT "999"

UPDATE "extention" OF "Client"
SET FORMAT "999".
End.

Ect.

Thanks for your help...
 
Last edited:

Rob Fitzpatrick

ProgressTalk.com Sponsor
You can't change the schema directly in a .p; there is no ABL DDL. You need to create a .df with the change; you can write a .p to generate that file. The .df can be loaded into the database programmatically.
 

Francois Caron

New Member
You can't change the schema directly in a .p; there is no ABL DDL. You need to create a .df with the change; you can write a .p to generate that file. The .df can be loaded into the database programmatically.

Okay, if I understand well, via the Data Dictionary (I can't access the graphical mode of the DD but in console yes) I can run via the menu "Dump Data and Définitions", then modify the field (ex: "(999) 999-9999" for "999") in the .df file created and then run "Load Data and Définitions" with this modified .df?

After that if I want to clear all data in this field I'll have to make a .p with something like this... ?
for each Client:
assign Client.extention = "".
end.

Thanks a lot
 

TomBascom

Curmudgeon
Why would you want to "clear the data" in a field after updating the format?

And actually... what you want to do is to create a "dummy" database that only has the schema definitions in it. Change the format in that empty dummy. Then connect to the original db and create an "incremental df file". That df file will only have the needed changes in it.
 

Francois Caron

New Member
Why would you want to "clear the data" in a field after updating the format?

And actually... what you want to do is to create a "dummy" database that only has the schema definitions in it. Change the format in that empty dummy. Then connect to the original db and create an "incremental df file". That df file will only have the needed changes in it.
Thank you for this info. I found that in "Schema->Field editor" it's possible to change the field's format. At first time I wasn't able to do it with that because someone's session was active. After restating the server I could modify what I wanted.
 
Top