You have two FOR entries, but only one END FOR. The error message means that Patran's looking for the second END FOR, but only finds END FUNCTION instead.
"Mismatched function argument" means that a variable is not of the type expected by the function. I think the one it's complaining about is the one called lbc_scale_factor in the documentation. This is supposed to be a real number, but you have no real variables declared.
Your call to loadsbcs_create also only has 10 arguments; the documentation shows it needs 11.
A pressure load on 2D elements has three possible entries on the form (top, bottom, and edge pressures), so the PCL function needs an array of three entries. One easy way of checking what you should be using for input is to create the required thing in Patran and look at the command that's issued in the history window. For a pressure load on 2D elements, this is what you get: