rith

Answer a message with assign? iSeries / Fetchmsg

Discussion created by rith on Nov 27, 2014
Latest reply on Dec 1, 2014 by 1_keithk

I would like to know if it's possible to answer a inquiry message on qsysopr (iSeries/IBM i), using the assign function on the message in Nimbus and UMP? Or any other way accept using assign? We would like to have this function without having to open a 5250-console, or open the fetchmsg-probe to find the message and give an answer from there.

 

The problem I see using the assign, is that a inquiry message could have several different letters to use in a reply (e.g C I R G D), and numbers (1-99999). Which means that you can't have an assign profile for each reply...

 

here are the fetchmsg-probe parameters for the send_reply:

 

fetchmsg.JPG

 

If I use the assign option (with only the letter-options, of course.). And for this example I need to answer C (cancel). Should I create a profile named, let's say "C", and then use the Trigger in NAS, with the option "Message assigned to" = C? Then create a script which captures the alarm that was trigged, with a callback to the fetchmsg probe to give the answer?

 

Does the alarm.get() work here?

 

if trigger.state ("CANCEL") then alarm.get()  local addr = '/'..a.domain..'/'..a.hub..'/'..a.robot..'/'  probe ="fetchmsg" cmd = "answer"  local args = pds.create() pds.putString(args, "answer", "C")  output,rc = nimbus.request(addr..probe, cmd, args)
end

 I'm a real beginner so please correct this script if it's wrong :smileyvery-happy:

Outcomes