The IBM documentation is the go-to place for IBM i information, especially when using SQL or API's. Make a bookmark to find this information easy, and remember to use the right IBM i documentation version. This can easily be changed on each page in the documentation, or you can find all IBM i version documentation here: https://www.ibm.com/docs/en/i
Never just rely on an internet search, but also verify your assumptions in this reference material, this will save you a lot of trouble.
Material found on the internet can be used for clarification of how to use any API or IBM i feature, if the IBM documentation is not clear enough. Also the IBM Support may have some explanations and howto's, although the search function here is not the best - I always search using "ibmi" and the subject.
HTH.
------------------------------
Christian Jorgensen
IT System Administrator | CEAC member
Network of Music Partners A/S
------------------------------
Original Message:
Sent: Fri April 04, 2025 01:25 PM
From: Matt Hopkins
Subject: Change password API (QSYCHGPW) only allows 10 char passwords
Thank you for that. In all my online searches that page never came up, which I thought was very unusual. So I appreciate the link.
------------------------------
Matt Hopkins
IBM i Programmer/Analyst
Original Message:
Sent: Fri April 04, 2025 12:27 PM
From: Marc Rauzier
Subject: Change password API (QSYCHGPW) only allows 10 char passwords
You have to set the length of old and new passwords using the optional parameters. When not specified the default length is indeed 10.
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/QSYCHGPW.html
----- quote -----
Optional Parameter Group
- Length of current password
- INPUT; BINARY(4)
The length, in bytes, of the password contained in the current password parameter. If the optional parameter group is not specified, a default of 10 is used. The current password parameter should be padded with trailing blank characters, if necessary, to the size specified by this parameter.
This parameter accepts values from 1 to 512; however, values greater than 128 should only be used if multi-byte characters are specified for the current password. The number of characters, as interpreted by the CCSID of the current password parameter, cannot exceed 128.
- CCSID of current password
- INPUT; BINARY(4)
The CCSID of the current password parameter. If the optional parameter group is not specified and the system is operating at password level 0 or 1, CCSID 37 is used. If the optional parameter group is not specified and the system is operating at password level 2 or 3, the default CCSID of the job is used to determine the CCSID of the data to be converted. For a list of valid CCSIDs, see the IBM i globalization topic collection.
The valid values are:
0 | The CCSID of the job is used to determine the CCSID of the data to be converted. If the job CCSID is 65535, the CCSID from the default CCSID (DFTCCSID) job attribute is used. |
1-65533 | A valid CCSID in this range. |
65535 | When the system is operating at password level 0 or 1, CCSID 37 is used. When the system is operating at password level 2 or 3, this value is rejected. |
- Length of new password
- INPUT; BINARY(4)
The length, in bytes, of the password contained in the new password parameter. If the optional parameter group is not specified, a default of 10 is used. The new password parameter should be padded with trailing blank characters, if necessary, to the size specified by this parameter.
This parameter accepts values from 1 to 512; however, values greater than 128 should only be used if multi-byte characters are specified for the new password. The number of characters, as interpreted by the CCSID of the new password parameter, cannot exceed 128.
- CCSID of new password
- INPUT; BINARY(4)
The CCSID of the new password parameter. If the optional parameter group is not specified and the system is operating at password level 0 or 1, CCSID 37 is used. If the optional parameter group is not specified and the system is operating at password level 2 or 3, the default CCSID of the job is used to determine the CCSID of the data to be converted. For a list of valid CCSIDs, see the IBM i globalization topic collection.
The valid values are:
0 | The CCSID of the job is used to determine the CCSID of the data to be converted. If the job CCSID is 65535, the CCSID from the default CCSID (DFTCCSID) job attribute is used. |
1-65533 | A valid CCSID in this range. |
65535 | When the system is operating at password level 0 or 1, CCSID 37 is used. When the system is operating at password level 2 or 3, this value is rejected. |
----- quote -----
------------------------------
Marc Rauzier
Original Message:
Sent: Fri April 04, 2025 09:15 AM
From: Matt Hopkins
Subject: Change password API (QSYCHGPW) only allows 10 char passwords
I created a little Node.js app that allows users without 5250 screen access to change their password. I am using the QSYCHGPW API, but it only allows 10 character passwords. My system is set up to allow 10-15 character passwords. Is there another API that I can use for passwords greater than 10? I'm surprised that this API still only allows 10 chars.
Thanks, Matt
------------------------------
Matt Hopkins
------------------------------