Ok, next step for me, i need to check for 2 conditions.
1) If current user is found in 2nd column of the csv file
2) if 1st column of the csv file is user not group.

Is my code on the correct logic

While $found <> "yes"
$results = AScan($asharepart2, @USERID)
If $results = @USERID
IF $aSharegrouporUser[2ndarrayrows] = "user"
$found = "yes"
EndIF
EndIf
$2ndArrayrows = $2ndArrayrows + 1
Loop