IML knows that k is the decision variable, from your specification of the objective function module fun(K). However, in the nlpqr call you need to give it an initial starting point for the optimization, in the 4th parameter, i.e.:
k0 = 1;
call nlpqn (rc, kres, "fun", k0, optn) nlc="con";
If your initial point is infeasible, IML will find one for you. Also, you need to pass in the values of your global parameters to your objective and constraint modules, via a global() clause in the START statement, i. e. :
start fun(K)global(lambda, estvar, g);
start con(k)global(lambda, col1, col2, col3);
Of course you will also need statements to set the values of lambda, estvar, g, col1, col2, and col3 before you call nlpqn.