Manually Upgrading SAP Host Agent on IBM i 
You can upgrade SAP Host Agent from a downloaded SAPHOSTAGENT<SP-version>.SAR archive with a higher version. You perform the upgrade by executing the saphostexec executable with the –upgrade option and providing the path to the downloaded SAPHOSTAGENT<SP-version>.SAR archive.
You can use the saphostexec executable either of the existing SAP Host Agent installation or of the downloaded SAPHOSTAGENT<SP-version>.SAR archive. If you use the saphostexec executable of the existing SAP Host Agent installation, you do not need to decompress the downloaded SAPHOSTAGENT<SP-version>.SAR archive manually but execute the program with the additional option –archive and provide the direct path to the downloaded SAPHOSTAGENT<SP-version>.SAR archive.
You have downloaded the desired target release version of the SAPHOSTAGENT<SP-version>.SAR archive to a temporary directory.
You must be logged on as a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.
To upgrade SAP Host Agent using the saphostexec executable of the existing SAP Host Agent installation, proceed as follows:
Enter the CALL PGM(QP2TERM) command to start a PASE interactive terminal session.
Copy the downloaded SAPHOSTAGENT<SP-version>.SAR archive to a temporary directory, for example /tmp/hostctrl.
Change to the directory where the saphostexec executable of SAP Host Agent is located:
cd /usr/sap/hostctrl/exe/
Execute the following command:
./saphostexec -upgrade -archive <path to downloaded SAPHOSTAGENT<SP-version>.SAR>
Example
./saphostexec -upgrade -archive /tmp/hostctrl/SAPHOSTAGENT126_126-20005735.SAR
To upgrade SAP Host Agent using the saphostexec executable of the downloaded SAPHOSTAGENT<SP-version>.SAR archive, proceed as follows:
Enter the CALL PGM(QP2TERM) command to start a PASE interactive terminal session .
Make the directory that contains SAPCAR and the archive SAPHOSTAGENT<SP-version>.SAR your current directory using the following command:
cd /tmp/hostctrl
Decompress the archive SAPHOSTAGENT<SP-version>.SAR with the SAPCAR tool using the following command:
./SAPCAR -xvf SAPHOSTAGENT<SP-version>.SAR
Example
./SAPCAR -xvf SAPHOSTAGENT126_126-20005735.SAR /tmp/hostctrl
Among others, the archive contains the saphostexec program.
Change to the temporary directory used for decompressing SAPHOSTAGENT<SP-version>.SAR archive and run the following command:
./saphostexec -upgrade
After the upgrade has finished successfully, SAP Host Agent is up and running.
You can check the version of the upgraded SAP Host Agent by executing the following command: saphostexec –version
You can now delete the temporary directory.