Retrieving messages
Posted: Wed Apr 13, 2022 4:18 pm
I'm using one of IBM's iSeries interface to update a user password
SELECT * FROM TABLE (SYSTOOLS.CHANGE_USER_PROFILE (...
Select_Sql Fields(#WRK10A #WRK3A #WRK5A) Io_Error(*NEXT) Using(#WRK5000)
Endselect
If this fails WRK5A above contains 'NO' and the reasons are displayed in the jobs message queue.
I've used the following sequence of commands to get the messages to pass to the user but it never returns anything. If I do this in STRSQL I can see that the message are there. Anyone got any clues?
Use Builtin(GET_MESSAGE) To_Get(#WRK2A #MSGTXT)
Dowhile Cond(#WRK2A = OK)
Use Builtin(GET_MESSAGE) To_Get(#WRK2A #MSGTXT)
Endwhile
SELECT * FROM TABLE (SYSTOOLS.CHANGE_USER_PROFILE (...
Select_Sql Fields(#WRK10A #WRK3A #WRK5A) Io_Error(*NEXT) Using(#WRK5000)
Endselect
If this fails WRK5A above contains 'NO' and the reasons are displayed in the jobs message queue.
I've used the following sequence of commands to get the messages to pass to the user but it never returns anything. If I do this in STRSQL I can see that the message are there. Anyone got any clues?
Use Builtin(GET_MESSAGE) To_Get(#WRK2A #MSGTXT)
Dowhile Cond(#WRK2A = OK)
Use Builtin(GET_MESSAGE) To_Get(#WRK2A #MSGTXT)
Endwhile