wrkmsg – How can I sort messages alphabetically?
Is there any possible way to sort those messages in a way that I like to have them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming you mean that you want to sort the message definitions stored in a message file, rather than the current contents of a message queue. You can create a database table (ie. a file) to receive the message descriptions, and then do whatever you’d like with those records.
Normally you can
DSPMSGDto a print file. But we will create a physical file or table, and override the output of theDSPMSGDcommand to our file. The first three records are trash, for our purposes, and we will discard them usingCPYFfrom a workfile into our final file.Make things easier by setting your library as current.
You could define your files in DDS, but I’ll demonstrate this in SQL.
To create your work file and result file:
Exit SQL to return to a command line.
Override the output file for the
DSPMSGDcommand to your work file, and collect your data.You can now go back into SQL and see the fruits of your labor.