you can copy a part of your script in a txt file (let's call it connection.txt), then in your script, you can use
$(Include=connection.txt);
to call it
You can use it several times in a Script if need.
please note you can still use all QlikView Script functions in the txt, for example you can use SWITCH computername() to use a different ODBC connection depending on the current computer
for the encryption, personnally when I change my password, I create the ODBC In QlikView file then I copy / paste the line in my connection.txt 🙂 maybe it's work if you not encrypt your password but I'm not sure at all ??