IF hServer:CONNECTED() THEN DO:
The error suggests that the problem is with the AppServer connection, not the Client-Principal. I would suggest getting the error information in ERROR-STATUS after you execute hSrv:CONNECT(...), that may have clues to what is missing. Also, make sure you have configured the "AuthSession" AppServer service, started the AppServer, and verified the "AuthSession" AppServer is running using asbman utility. When the AppServer connection is good - then output the ERROR-STATUS handle if the hCP:IMPORT-PRINCIPAL() fails.
Thanks Michael.
I am able to connect to the appserver now, but still, not able to get the Client Principal created. It ends the procedure once the appserver connection is established.
So you get the "connection established" message, but you do not get any
output from "MESSAGE kMessage." ?
The problem may be that createSession.p returns an error and terminates
the procedure.
You might add a MESSAGE after the RUN statement that confirms that
createSession.p completed and the values of lOK and the length of rObject.