COMPARE A FILE WITH HIS DEFINITION IN NOMADS

Started by bcarminan, August 30, 2018, 10:31:07 AM

Previous topic - Next topic

bcarminan

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

Mike King

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$
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com


Mike King

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.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com