//****************************************************************************** //****************************************************************************** // Code disclaimer information //------------------------------------------------------------------------------ // This file contains programming code examples. // // IBM grants you a nonexclusive copyright license to use all programming // code examples from which you can generate similar functions tailored to // your own specific needs. // // All sample code is provided by IBM for illustrative purposes only. // These examples have not been thoroughly tested under all conditions. IBM, // therefore, cannot guarantee or imply reliability, serviceability, or // function of these programs. // // All programs contained herein are provided to you "AS IS" without any // warranties of any kind. The implied warranties of non-infringement, // merchantability, and fitness for a particular purpose are expressly // disclaimed. //****************************************************************************** //****************************************************************************** #ifndef _RPLCMN_H #define _RPLCMN_H //-- START OF SPECIFICATIONS ------------------------------------------------ // // Header File Name : rplcmn.H // // Descriptive Name : Used for REPLAY demo program. // // Description : Common header file used for // IFS Journaling Replication Demo. // //****** WARNING ***** PLEASE READ ME ****************************************** // USE OF THIS SOURCE CODE IS AT YOUR OWN RISK. // This code is being used in the IFS Journaling Replication demo that was // first used at COMMON in March 2003. This code is NOT a complete replication // solution, and should not be used to provide object or data replication. // It was written to provide a way to demo replication of a small subset of IFS // journal entries using a remote journal on the SAME system. It is being made // available for public browsing as an example what was really involved in // performing some of the steps required in providing IFS object/data // replication. Therefore, some of the code within this demo takes shortcuts // that would not be available in a normal replication environment involving // separate source and target systems. //****************************************************************************** // // Change Activity : // // CFD List : // // FLAG REASON LEVEL DATE PGMR CHANGE DESCRIPTION // ---- ------------ ----- ------ --------- ----------------------- // $A0= DEMO xxxx 030129 IBMG8PA: New Include // // End CFD List. // // Additional notes about the Change Activity // // End Change Activity. // //-- END OF SPECIFICATIONS ------------------------------------------------- #include #include #include // Max length of any path in FIDTable. static const unsigned int MAX_PATH_LENGTH = 200; static const char *SRCDIR = "/srcdir"; static const char *TGTDIR = "/tgtdir"; static const char *TGT_JOURNAL_LIB_AND_NAME = "TGTJRNLIB/TGTJRN"; static const char *SRC_JOURNAL_LIB_AND_NAME = "SRCJRNLIB/SRCJRN"; static const char *USRSPC_NAME_LIB = "IFSRJDEMO SRCJRNLIB "; // getUsrspcPtr // Returns the user space pointer for the demo. inline _SYSPTR getUsrspcPtr() { _OBJ_NAME usrspcName; _LIB_NAME usrspcLib; memset(usrspcName,' ',sizeof(usrspcName)); memset(usrspcLib,' ',sizeof(usrspcName)); usrspcName[30] = usrspcLib[30] = 0; // Null term memcpy(usrspcName,"IFSRJDEMO ",10); memcpy(usrspcLib, "SRCJRNLIB ",10); #pragma exception_handler(AllExcepts, 0, _C1_ALL, _C2_ALL, _CTLA_HANDLE) return(rslvsp(WLI_USRSPC, usrspcName, usrspcLib, _AUTH_NONE)); #pragma disable_handler AllExcepts: return(NULL); } #endif /* _RPLCMN_H */