Hello,
We created custom change password program, which utilizing QSYCHGPW API. How to insure that this program will run insted of system CHGPWD when password expired attribute for a useris *yes.
The new program is called from routing program on subsystem level.
Thanks,
Igor
Software/Hardware used:
ASKED:
April 10, 2006 5:29 PM
UPDATED:
December 3, 2009 8:35 AM
Jonatan,
THank you for reply. However this is not exactly what I am looking for.
We have a separate RFINTER subsystem where all handheld devicess will be running. For only those devices I would like custom program to be run. I do not want to affect any other users o the system.
THanks,
Igor
Assuming that there is a unique initial program for hand-held devices, you can put your version of CHGPWD into a library, then use CHGSYSLIBL to put that library ahead of QSYS for that job.
When you start logging on and the profile’s password has expired, you are still in system mode whenCHGPWD is executed. A job has still not been put into QINTER and your initial program has not been called yet so I think doing a CHGSYSLIBL won’t help.
Since when a job starts the values in system value QSYSLIBL are added to the library list for the job, every user will grab the modified CHGPWD command if you put it into one of these libraries.
I think your best bet is to create a validity checking program to attach to the current CHGPWD command and see if you can control the code based on user, etc. I have never done one of these but if you check the online Information Center for your release, it should lead you to an example.
Hi Igor
You could still do it by making the new CHGPWD intelligent enough to know which command/program is to be run based on the device name.
For example, if you renamed CHGPWD to IBMCHGPWD and then created your own CHGPWD command, the new CPP would be something like this:
PGM
DCL &JOB *CHAR 10
/* Identify the device name */
RTVJOBA JOB(&JOB)
/* If it’s a Radio Data Terminal then use the new CHGPWD */
IF COND(%SST(&JOB 1 3) *EQ ‘RDT’) THEN(DO)
CALL new_chgpwd_pgm
ENDDO
ELSE DO
IBMCHPGPWD
ENDDO
ENDPGM
This works on the assumption that your RDT devices have a device name beginning with RDT – you can obviously change that to suit your needs.
In this example all the RDT devices would use your new password change routine, whilst “normal” devices would use the existing IBM supplied CHGPWD command.
Hope it helps
Jonathan
http://www.astradyne-uk.com
There is no need to rename the IBM-supplied CHGPWD command. Nor should you rename it. Leave it alone. Simply qualify it as QSYS/CHGPWD in your program.
That makes it available to IBM programming so those programs won’t error out, not to mention programs that you might write in the future that need QSYS/CHGPGM. It differentiates it from your version. A later upgrade to the OS won’t catch you by surprise by installing a new copy of CHGPWD after it’s been forgotten. And it protects from elements that might eventually be related to the new ‘proxy’ support that could interfere with renaming IBM commands.
Tom