Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Hello vinisl and welcome to the forums,
Your question sounds more like a DB2 question than a JCL question. Is there some reason you posted here rather than DB2?
Your request is somewhat confusing (to me) - probably because you know exactly what you want and i do not
Please post a few sample rows/colums from your table and what you want the result of your query to be when those rows are processed. Make sure to have a combination of rows that are selected and not selected. The better your example, the better the suggestions and less questions you will receive.