Capturing Process on AIX boxes - IMP

Guys

we all know what command 'COLUMNS=2047 /usr/bin/ps �eo pid,ppid,uid,user,args' does.It prints 5-column output for the running processes on a AIX box.

Here is simple thing i need:
I need to insert this tabular data in a db2 table.

How do i need?

I have created table with these five options of 'ps -eo' as five colmuns.I have a tool which generates CSV files based on my command/script logic and i use this CSV to load data into table.

Where am i stuck?

I am not sure of how to get this o/p into CSV.
I have created five namespaces to capture each of these five columns and i need to write a piece of code to capture data row by row.

e.g

PID PPID UID USER COMMAND
139412 118932 0 root /usr/sbin/inetd

Complexities:
1.I can not throw this o/p into CSV using a static file.Everything has to be in shell variables.I need to echo values using whatever filters/pattern searches.

2.Every row needs to be captured uniquely.

In above example,i first need to capture '139412' uniquely and get the corresponding row for it and then using 'awk' i can get rest 4 columns.

I have tried to explain as much as possible.Let me know if its inconsistent.

I need advice/help on this.

Regards
Abhi