Hi dear All,
I'm stuck up.. in my first message queue program.
I read message on the *msgq (using RCVMSG) and write it in a PF.
I've 2 (dumb) Questions.
1. I provide 'message queue' as a parameter to RCVMSG command. when the command is executed, it reads only one row at a time. so If I've 15 rows of messages on a queue, I execute RCVMSG in a loop and save messages one by one. Is this the correct approach?
2. Once I'm done executing this program, IF I again call the same program RCVMSG doesnt read anything from the message Q (I dont remove messages in RCVMSG). this directs me to the thought that, any message queue can be read only once even if I dont remove any message from the Q. Is this true? if yes then what if I need to execute this program more than once due to some failures/exceptions
Command I use
RCVMSG MSGQ(&EMSGQ) RMV(*NO) MSG(&FSTLVL) + SECLVL(&SNDLVL)
This is what the message queue contains -
Company Code Required Enter Account Code Product Deduction Group 001 has been copied to Deduction Group 001. Product Coverage not found. Errors occurred while processing GGI Component 75016 19. Errors occurred while processing Transaction Component '75016' '19'. Errors occurred while processing GGI Transaction 75016.
June 17, 2010 1:29 PM
June 17, 2010 6:08 PM