I agree with the previous poster - it's a square peg and a round hole.
I suppose there's a temptation to liken it with the Irish and Scottish Mc, Mac and O'. The difference with these is that they were almost treated like modern surnames - with the name being passed down unchanged through many generations.
The Welsh patronymic, however, will change from generation to generation (unless son's name = father's name of course).
If you were to put "ap Robert John" or even "Robert John" as a surname in your software, I'm guessing that it will default to that surname for any children or fathers you create in the tree. Also, if you were to show names in the 'surname, forename' format, it would look a bit silly.
Putting the entire name in as a forename is probably a better option - unless your software then tries to group all relatives with an empty surname together.
Either option will cause problems for any functionality your software may have to group families together.
One idea (ok, perhaps not a good one), would be to take the earliest person on each line and derive a surname from their forename - e.g. if Robert is the earliest relative on a line, then you could introduce Probert as a dummy surname for that line. You would then put the full patronymic name in the forename field. This would then allow you to group families together. You just have to remember that this surname is something you've made up, rather than being historical fact.
Lee
p.s. Remember that if the fathers name begins with a vowel, then you should use "ab" instead of "ap", e.g. Meilir ab Irfon, Ifan ab Owen etc.
p.p.s. Remember that Welsh vowels are a,e,i,o,u,w,y.