Hi David,
You are right. Your solution is the most complete and correct, but for internal issues of my organization is also the most complex and costly. I found the functions of the archiving process in spel in the file "arcpur.frg" and I am trying to execute them through a SOAP call through CA PAM. Here is the information I found:
arcpur.frg file:
#define syntax strict
////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2000, 1995 Computer Associates International, Inc
//
// Copyright (C) 1995 Legent Software, Inc., as an
// unpublished work. This notice does not imply unrestricted or public
// access to these materials which are a trade secret of Legent
// Corporation or its subsidiaries or affiliates (together referred to
// as "LEGENT"), and which may not be reproduced, used, sold or
// transferred to any third party without LEGENT's prior written consent.
//
// All Rights Reserved.
//
// RESTRICTED RIGHTS LEGEND
// Use, duplication, or disclosure by the Government is subject to
// restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
// Technical Data and Computer Software clause at DFARS 252.227-7013.
////////////////////////////////////////////////////////////////////////////
//
// This frg file provides two methods that are callable from an external
// scheduler program to start and stop an archive and purge process.
//
////////////////////////////////////////////////////////////////////////////
void start_arcpur(string rule_name, int hours)
{
object arcpur_addr;
arcpur_addr = (object)("@|arcpur_srvr|arcpur_obj|0");
if (hours <= 0) hours = -1;
send_wait(0, arcpur_addr, "start_arcpur", rule_name, hours);
if (msg_error())
{
printf ("Error: see stdlog for detail.");
}
else
printf ("The start_arcpur request has been issued. See stdlog for any error");
}
void stop_arcpur(string rule_name)
{
object arcpur_addr;
arcpur_addr = (object)("@|arcpur_srvr|arcpur_obj|0");
send_wait(0, arcpur_addr, "stop_arcpur", rule_name);
if (msg_error()) {
printf ("Error: see stdlog for detail.");
}
else {
printf ("The stop_arcpur request has been issued. See stdlog for any error");
}
}
Webservice method:
callServerMethod
Description
Use this method to invoke an arbitrary server-side method. These are methods defined in the proprietary “spell” scripting language.
My solution is :
1 - Use the archiving method to generate the file with the data without performing the purge. (this step can be scheduled in SDM or by the PAM, if by PAM with more control of the process);
2 - Work the generated files to load via pdm_load in the historical tables;
3 - Check if all data has been loaded;
4 - If the load is correct perform the deletion of the data through pdm_load -r.
That way I will be able to handle the errors and make sure that I will only delete SDM information when the historical tables are loaded. Also in case of error I will have the generated files as a backup. Using CA PAM I can generate logs and even send emails and statistics to the managers of my company.
Please tell me what you think about this? Thank you for your help.