EPI Security

You can perform security management on servers that support Password Expiry Management (PEM). See Supported software in the CICS® Transaction Gateway: Administration book for your operating system, for more information on supported servers and protocols.

To use these features you first must have constructed a CclTerminal object which is sign-on incapable, in other words it must have a userid and password (even if they are null). The two methods available are verifyPassword which checks the userid and password within the terminal object with the Server Security System, and changePassword which allows you to change the password at the server. If successful the connection object password is updated accordingly.

If either call is successful, you are returned a pointer to an internal object which provides information about the security, a CclSecAttr object. This object provides access to information such as last verified Date and Time, Expiry Date and Time and Last access Date and Time. If you query for example last verified Date, you get back a pointer to an object which allows you to get the information in various formats. The following is sample code to show the use of these various objects.
// Terminal object already created called term  
CclSecAttr *pAttrblock;             // pointer to security attributes 
CclSecTime *pDTinfo;                // pointer to Date/Time information 
try {
     pAttrblock = term->verifyPassword(); 
     pDTinfo = pAttrblock->lastVerifiedTime(); 
     cout << "last verified year  :" <<pDTinfo->year() << endl; 
     cout << "last verified month :" <<pDTinfo->month() << endl; 
     cout << "last verified day   :" <<pDTinfo->day() << endl; 
     cout << "last verified hours :" <<pDTinfo->hours() << endl; 
     cout << "last verified mins  :" <<pDTinfo->minutes() << endl; 
     cout << "last verified secs  :" <<pDTinfo->seconds() << endl; 
     cout << "last verified 100ths:" <<pDTinfo->hundredths() << endl; 

// Use a tm structure to produce a single line text of information 

     tm mytime; 
     mytime = pDTinfo->get_tm(); 
     cout << "full info:" << asctime(&mytime) << endl; 
} 
catch (CclException &ex) 
{  

// Could check for expired password error and handle if required  
  cout << "Exception occurred: " <<ex.diagnose()<< endl;
}
Note that the security attributes and date/time memory are all handled by the terminal object. If you destroy the terminal object, you destroy the security information being held by that object.