PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: bcarminan on August 30, 2018, 10:31:07 AM

Title: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
Post 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
Title: Re: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
Post by: Mike King on August 30, 2018, 01:34:56 PM
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:


To create a temporary file from the dictionary definition use:

CALL "*dict/dd_updt;Update_Physical", table_name$, temporary_file_path$,"",errmsg$
Title: Re: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
Post by: bcarminan on August 31, 2018, 03:51:28 AM
Yes, it's easy now.
Title: Re: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
Post by: Mike King on August 31, 2018, 09:24:52 AM
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.