I’ve used $HCIROOT/tcl/lib/cloverleaf/nci.tlib to easily parse NetConfig scripts using different functions after netcfgLoad then netcfgGetConnList and netcfgGetProcList. I came across an older clovertech thread where Rob Abbott stated these are behind the scenes scripts but Infor added them to documentation starting with CIS 6.2.61. I’ve searched through CIS 2022’s online help and found no mention of this library or its functions. They are great ways to retrieve various NetConfig data but I’ve not found any functions that allow you to write back to the NetConfig, like a NetCfgsave or NetCfgWrite function.
These types of scripts are never ran during regular business hours incase an analyst may be making changes in a site’s NetConfig. Primary purpose is to make global identified NetConfig changes accurately and not have to rely on our team to manually go through 100 cloverleaf sites, 100’s of threads, and possibly typo or miss a setting. Example enabling an Outbound SMAT file for large set of threads. In past scripts I’ve had to parse the NetConfig line by line to find start/end blocks to update what is needed per a specific thread type. These scripts backup the original NetConfig and write the updated NetConfig out to a new file that’s named differently, NetConfig.updated.datetimestamp that can be diff’d from command line or use a file compare utility before ever committing the change.
I’ve got a question out to Infor but I was really hoping some type of library possibly exists or its something that goes on the list to develop when time permits. Just to re-state this isn’t a script that would be used for day to day work rather large engine changes, like updating internal thread communication client/server threads from mllp2 to mllp having the server threads using hcitps_simpleack.
# Set site environment and load NetConfigset env(HCISITE) $siteNameif {[catch {netcfgLoad $netconfigFile} err]} {puts “Skipping site $siteName: $err”continue}set threadList [lsort [netcfgGetConnList]]foreach thread $threadList {set data [netcfgGetConnData $thread]keylget data PROTOCOL.TYPE protocol
keylget data PROTOCOL.HOST host
keylget data PROTOCOL.PORT port
keylget data PROTOCOL.PDLTYPE pdlType
keylget data PROTOCOL.MLP_MODE mlpMode
}