Hello and welcome to the forum,
There are no records in a db2 table. . .
If you provide a better descriptoin of what you want to do, someone will be able to help.
Show an example of the table structure, a few sample rows, and what the ps output should contain when the sample rows are processed.
Use the "Code" tag for readability and to preserve alignment. Use the "Preview" to see the post as the forum will see it rather than the way it appears in the reply editor. When the appearance is as desired, Submit. Do not forget to Submit - the post will be lost . . .
Hope this helps,