PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: bcarminan on August 30, 2018, 10:31:07 AM
-
Hello,
Il want compare a physical file with his definition in nomads.
With the fiels, i have found a way but with the key definitions I don't find a way.
I can read the key definition with "CALL "**key.inf",CH_TRAVAIL,KK$" but I don't find a program for nomads definition.
Is it possible ?
Thanks
-
If all you want to do is match the IOLISTs and file key definitions the easiest solution is to create a new temporary file from the Nomads Data Dictionary definition then compare:
- FIN(nn,"KEY_DEFINITION")
- IOL(nn:*)
- IOL(nn:^) If present
- IOL(nn:key) If present
To create a temporary file from the dictionary definition use:
CALL "*dict/dd_updt;Update_Physical", table_name$, temporary_file_path$,"",errmsg$
-
Yes, it's easy now.
-
One other thing you might consider if using PxPlus 2017 or later is to include OPT="VALIDATE" on the open of the files. This will then include the validation rules on the file IOLISTs which means even changes such as numeric sizes, field lengths, and validation tables will be compared.