Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Will this "select" be done inside a cobol program?
If so, my recommendation is that you select the needed rows(s) from DB2 and then parse them in the cobol code for the space count/last position.
Gives you the advantage of simply modifying the code if the requirement ever grows/changes as well as it could be running yet today. Given that no one has posted a select yet (since the 8th), and this is the DB2 forum, it may be a bit before a suggestion is posted. . .