6 61 2 C Example

LANSA Open Guide

6.61.2 C Example

char strServer[ SYSTEM_LENGTH + 1 ] = "myserver";

int  iMapperPort = 0;

BOOL fSSLRequired = false;

char strUserid[ USERID_LENGTH + 1 ] = "myuser";

char strPassword[ PASSWORD_LONG_LENGTH + 1 ] = "mypasswd";

char strNewPassword[ PASSWORD_LONG_LENGTH + 1 ] = "mynewpassword";

BOOL fEncryptPassword = true;

char strReturnCode[ RETURN_CODE_LENGTH + 1 ];

BOOL rc;

 

rc = LceSetIBMiSignon( strServer, iMapperPort, fSSLRequired, strUserid, strPassword, strNewPassword, fEncryptPassword, strReturnCode );

 

if ( rc )

{

   if ( strcmp( strReturnCode, "OK" ) == 0 )

   {

      printf( "Signon details successfully changed." );

   }

   else

   {

      printf( "The request to the server has failed with return code: %s\n", strReturnCode );

   }

}

else

{

   printf( "The function failed to run successfully\n" );