Create a new AS400 profile. It is necessary that the profile used to open the connection, has the necessary rights for the creation of a profile.
Indeed, a profile of type * SECADM (like QSECOFR for example) is obligatory for this function.