Retrieving messages

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jimwatterson
Posts: 56
Joined: Thu Jul 09, 2020 8:31 am

Retrieving messages

Post by jimwatterson »

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
Post Reply