Anyone ever use the SNDRPY command in CL?

0 pts.
Tags:
AS/400
CLP
DB2 Universal Database
RPG
RPGLE
I am using the CHGPF command to change a file. I know it will result in data loss, and I will get a messaage that I must reply "I" to ignore and then it will change the file. The file is used all day long and I would like to have a CL program change it after hours. I found the SNDRPY command that seems like it will do what I need, but it wants a message reference key. I don't know what this message reference key is or how to find it. It's supposed to be a 4 digit alpha field. Has anyone tried this, or at least knows how to find the message reference key? ---Dale
ASKED: December 12, 2005  4:56 PM
UPDATED: December 14, 2005  8:30 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Dale

In your CL program you can monitor for the message and then use the RCVMSG command to retrieve the key (if I remember correctly, it’s the KEYVAR parameter).

An alternative method would be for your out of hours job to add an entry to the system reply list (ADDRPYLE) to add the “I” response and then to use the RMVRPYLE command to remove it at the end of the job.

You can specify comparison data so the message only gets replied to automatically for the correct file.

Hope it helps

Jonathan

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Dalejanus
    I ended up running from home after hours. But the RCVMSG looks like what I needed. I will test it further next time. I had forgotten about the system reply list, ADDRPYLE. That would likely have worked, but I sure wouldn't want to leave that as default. Thanks for two ways to skin the cat. ---Dale
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following