Examples JS

Example – Synchronizing Calendars Between Argent XT and Argent Job Scheduler

Many Argent customers select both the Argent Extended Technology systems management and monitoring product and the Argent Job Scheduler business process management product for deployment within their enterprises.

Both products implement a calendar table.

The calendar table has an identical column layout in both products; the columns have identical attributes. The only characteristics that vary between the two products are:

  • The name of the Microsoft SQL Server machine on which the database resides

  • The name of the SQL Server database where the table resides

  • The name of the table within the database

In this example, the name of database server machine (BETHESDA-SRV-DB) is the same for both the Argent Extended Technology database and the Argent Job Scheduler database.

This helps simplify the example.

For the example, the name of the Argent Extended Technology (XT) database is ‘ARGENT_XT_8_0A_0910‘.

The name of the Argent Job Scheduler database is ‘Argent Job Scheduler‘.

Since the layout of the calendar table and the attributes of the table columns in each product are identical, it is possible to design a bi-directional interface using the ARGSOFT_SAVEASXML.EXE and ARGSOFT_LOADFROMXML.EXE tools.

From a practical and process-management view, though, it is simpler to implement a uni-directional interface.

Requirement:

Customer wants to have identical copies of the calendar table in each product’s database. This will be a one-way interface from Argent Extended Technology (XT) to Argent Job Scheduler.

In other words, a policy / process management decision for the example is that the Argent XT calendar table will be the ‘master‘ origin table and the Argent Job Scheduler calendar will be the ‘slave‘ destination table.

Practical Considerations

There are some practical considerations for the interface:

  • Calendar table definitions change relatively infrequently within each product

  • To avoid any confusion, calendar definitions should remain predictable throughout the course of a work day within the Argent Job Scheduler environment

Technical Considerations

There are some technical considerations for the interface:

  • The central calendar table is named ‘AAC_AdvsCalendar‘ in Argent Extended Technology

  • The central calendar table is named ‘AJS_JOB_CALENDAR‘ in Argent Job Scheduler

  • The ‘pckey‘ column must be unique in the table for both products, but does not have to be unique across both products. The ‘pckey‘ column will be omitted from the table export.

  • The ‘name‘ column must be unique across both products to avoid confusion when end users refer to a calendar by name. The ‘name‘ column will be designated as the primary key column for the interface.

  • The creation date/time and last-changed date/time in the ‘slave‘ destination table should reflect when the actual table record I/O took place, not when the I/O took place in the ‘master‘ origin table. The ‘create_time‘ and ‘modify_time‘ columns will be omitted from the table export. This is valid since the ‘slave‘ destination table contains a SQL default value of ‘getdate()‘ for both the creation date/time and the last-changed date/time.

Export Parameters – Running a Test

From the above, the syntax of the ARGSOFT_SAVEASXML.EXE tool will be:


ARGSOFT_SAVEASXML.EXE

	/SERVER_NAME=BETHESDA-SRV-DB

	/DATABASE_NAME=ARGENT_8_0A_0910

	/TABLE_NAME=AAC_AdvsCalendar

	/OMITTED_COLUMN_LIST=pckey,create_time,modify_time

	/PK_COLUMN_NAME=name

	/OVERWRITE=YES

	/OUTPUT_FILE=C:\Temp\TEMP_TEST_CALENDAR_EXPORT.XML

	/IDENTITY_INSERT=OFF

To run the export test, log on to the Argent Job Scheduler 8.0A-1101 (or later) server and open a command window. Use the

CD X:\ARGENT\SchedulingEngine

to set the current directory.

Issue the ARGSOFT_SAVEASXML.EXE command that corresponds to your environment. The output from the ARGSOFT_SAVEASXML.EXE tool will appear similar to the following:

Import Parameters – Running a Test

From the above, the syntax of the ARGSOFT_LOADFROMXML.EXE tool will be:


ARGSOFT_LOADFROMXML.EXE

	/SERVER_NAME=BETHESDA-SRV-DB

	/DATABASE_NAME=Argent Job Scheduler

	/TABLE_NAME=AJS_JOB_CALENDAR

	/INPUT_FILE=C:\Temp\TEMP_TEST_CALENDAR_EXPORT.XML

To run the import test, log on to the Argent Job Scheduler 8.0A-1101 (or later) server and open a command window. Use the CD X:\ARGENT\SchedulingEngine to set the current directory.

Issue the ARGSOFT_LOADFROMXML.EXE command that corresponds to your environment. The output from the ARGSOFT_LOADFROMXML.EXE tool will appear similar to the following:

Automating the Interface – Using Argent Job Scheduler

Using the results of the above tests, customers can create a job that runs under control of Argent Job Scheduler to automate the export of calendar information from Argent Extended Technology (XT) and the import of the extracted data into Argent Job Scheduler.

Following is a sample job template definition that can export calendar table information from Argent Extended Technology and import the resulting XML data set into Argent Job Scheduler:

Automating the Interface – Sample Queue Engine .CMD File:

The following is an example of a Queue Engine job.

CMD file that can accomplish the export of calendar information from Argent Extended Technology and the import of the exported XML data file into Argent Job Scheduler:




@REM	TEST_EXIM_XT_CALENDARS.CMD



@ECHO Hello, world. This is a test of the synchronization of calendar

@ECHO tables between Argent Extended Technology and Argent Job Scheduler

@ECHO using XML-based export and import tools



@REM --------------------------------------------------------------------------

@REM

@REM First, create an XML directory to export the calendar information

@REM

@REM --------------------------------------------------------------------------



@ECHO First, create an XML directory to export the calendar information





SET CALENDAR_EXIM_DIRECTORY=%~dp0XML\CALENDAR_EXIM



MKDIR %CALENDAR_EXIM_DIRECTORY%



@REM --------------------------------------------------------------------------

@REM

@REM Next, export the calendar information from Argent XT

@REM

@REM --------------------------------------------------------------------------



@ECHO Next, export the calendar information from Argent XT



ARGSOFT_SAVEASXML.EXE /SERVER_NAME=%COMPUTERNAME% /DATABASE_NAME=ARGENT_XT_8_0A_0910 /TABLE_NAME=AAC_AdvsCalendar /OMITTED_COLUMN_LIST=pckey,create_time,modify_time /PK_COLUMN_NAME=name /OVERWRITE=YES /IDENTITY_INSERT=OFF /OUTPUT_FILE=%CALENDAR_EXIM_DIRECTORY%\CALENDAR_DATA.XML





@REM --------------------------------------------------------------------------

@REM

@REM Next, import the calendar infromation into Argent Job Scheduler

@REM

@REM --------------------------------------------------------------------------



@ECHO Next, import the calendar information into Argent Job Scheduler



ARGSOFT_LOADFROMXML.EXE /SERVER_NAME=%COMPUTERNAME% /DATABASE_NAME=Argent Job Scheduler /TABLE_NAME=AJS_CALENDAR /INPUT_FILE=%CALENDAR_EXIM_DIRECTORY%\CALENDAR_DATA.XML



@REM --------------------------------------------------------------------------

@REM

@REM Last, we delete the temporary XML data since we don't need it permanently

@REM

@REM --------------------------------------------------------------------------





DEL  %CALENDAR_EXIM_DIRECTORY%\CALENDAR_DATA.XML







ECHO We are now done.... ending



Automating the Interface – Sample Output Job Log File:

The following is an example the job log file that results when a test of the above .CMD file executes on a configured Argent Queue Engine:


Argent Job Scheduler - Queue Engine Release 8.0A-1101-A Job Log File  -  Job 468 ("TEST_EXIM_CALENDAR_INFO") in queue QUEUE_1 of server BETHESDA-SRV-DB

        Submitted by: BETHESDA\Administrator

        User Account: BETHESDA\Administrator

        Submitted at: 21 Jan 2011 16:03:39

        Command line: \\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\TEST_EXIM_XT_CALENDARS.CMD



--------------------------------  JOB OUTPUT  --------------------------------



Hello, world. This is a test of the synchronization of calendar

tables between Argent Extended Technology and Argent Job Scheduler

using XML-based export and import tools

First, create an XML directory to export the calendar information



C:\ARGENT\QueueEngine>SET CALENDAR_EXIM_DIRECTORY=\\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\XML\CALENDAR_EXIM



C:\ARGENT\QueueEngine>MKDIR \\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\XML\CALENDAR_EXIM

Next, export the calendar information from Argent XT



C:\ARGENT\QueueEngine>ARGSOFT_SAVEASXML.EXE /SERVER_NAME=BETHESDA-SRV-DB /DATABASE_NAME=ARGENT_XT_8_0A_0910 /TABLE_NAME=AAC_AdvsCalendar /OMITTED_COLUMN_LIST=pckey,create_time,modify_time /PK_COLUMN_NAME=name /OVERWRITE=YES /IDENTITY_INSERT=OFF /OUTPUT_FILE=\\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\XML\CALENDAR_EXIM\CALENDAR_DATA.XML

 00728 Argsoft Supervisor initialization starting

42757 Argsoft Supervisor Log = 'C:\ARGENT\QUEUEENGINE\LOGS\ARGSOFT_SAVEASXML_EXE_PID_4272_LOG.TXT'

42765 Argsoft Supervisor Mutex = 'Global\ARGSOFT_SAVEASXML_EXE_PID_4272_TXT'

42915 Argsoft Supervisor Debug level used: LOW

42931 Argsoft Supervisor Initialization completed

41529 MOBAR[0000]............................ 1 1 0007 '' MOBAR_iLogFileRetainDays 41529 MOBAR[0001]............................ 1 1 0002 '' MOBAR_iLogDebugFlag 41529 MOBAR[0002]............................ 1 1 0500 '' MOBAR_iMinimumCPUSpeedMHz 41529 MOBAR[0003]............................ 1 1 0512 '' MOBAR_iMinimumDiskMB 41529 MOBAR[0004]............................ 1 1 0384 '' MOBAR_iMinimumMemoryMB 41529 MOBAR[0005]............................ 1 1 1281 '' MOBAR_iMinimumOS 41529 MOBAR[0006]............................ 1 1 0016 '' MOBAR_itaccessRetryLimit 41529 MOBAR[0007]............................ 1 1 0500 '' MOBAR_itaccessSleepMilliseconds 41529 MOBAR[0008]............................ 1 1 0016 '' MOBAR_iCreateFileRetryLimit 41529 MOBAR[0009]............................ 1 1 0500 '' MOBAR_iCreateFileSleepMilliseconds 41529 MOBAR[0010]............................ 1 1 0016 '' MOBAR_iDeleteFileRetryLimit 41529 MOBAR[0011]............................ 1 1 0500 '' MOBAR_iDeleteFileSleepMilliseconds 41529 MOBAR[0012]............................ 1 1 0016 '' MOBAR_iFindFirstRetryLimit 41529 MOBAR[0013]............................ 1 1 0500 '' MOBAR_iFindFirstSleepMilliseconds 41529 MOBAR[0014]............................ 1 1 0016 '' MOBAR_iFindNextRetryLimit 41529 MOBAR[0015]............................ 1 1 0500 '' MOBAR_iFindNextSleepMilliseconds 41529 MOBAR[0016]............................ 1 1 0016 '' MOBAR_iGetFileSizeRetryLimit 41529 MOBAR[0017]............................ 1 1 0500 '' MOBAR_iGetFileSizeSleepMilliseconds 41529 MOBAR[0018]............................ 1 1 0016 '' MOBAR_iIORetryLimit 41529 MOBAR[0019]............................ 1 1 0500 '' MOBAR_iIOSleepMilliseconds 41529 MOBAR[0020]............................ 1 1 0005 '' MOBAR_iLockTimeOutSeconds 41529 MOBAR[0021]............................ 1 1 0016 '' MOBAR_iMutexRetryLimit 41529 MOBAR[0022]............................ 1 1 0500 '' MOBAR_iMutexSleepMilliseconds 41529 MOBAR[0023]............................ 1 1 0016 '' MOBAR_iReadFileRetryLimit 41529 MOBAR[0024]............................ 1 1 0500 '' MOBAR_iReadFileSleepMilliseconds 41529 MOBAR[0025]............................ 1 1 0016 '' MOBAR_iRemoveDirRetryLimit 41529 MOBAR[0026]............................ 1 1 0500 '' MOBAR_iRemoveDirSleepMilliseconds 41529 MOBAR[0027]............................ 1 1 0016 '' MOBAR_iSetFilePointerRetryLimit 41529 MOBAR[0028]............................ 1 1 0500 '' MOBAR_iSetFilePointerSleepMilliseconds 41529 MOBAR[0029]............................ 1 1 0016 '' MOBAR_iWriteFileRetryLimit 41529 MOBAR[0030]............................ 1 1 0500 '' MOBAR_iWriteFileSleepMilliseconds 41529 MOBAR[0031]............................ 1 1 0016 '' MOBAR_iOpenRetryLimit 41529 MOBAR[0032]............................ 1 1 0500 '' MOBAR_iOpenSleepMilliseconds 41529 MOBAR[0033]............................ 1 1 0016 '' MOBAR_iCloseRetryLimit 41529 MOBAR[0034]............................ 1 1 0500 '' MOBAR_iCloseSleepMilliseconds 41529 MOBAR[0035]............................ 1 1 0016 '' ATB_itaccessRetryLimit 41529 MOBAR[0036]............................ 1 1 0500 '' ATB_itaccessSleepMilliseconds 41529 MOBAR[0037]............................ 1 1 0004 '' ATB_iBigLoopSleepSeconds 41529 MOBAR[0038]............................ 1 1 0016 '' ATB_iBindRetryLimit 41529 MOBAR[0039]............................ 1 1 0500 '' ATB_iBindSleepMilliseconds 41529 MOBAR[0040]............................ 1 1 0016 '' ATB_iConnectRetryLimit 41529 MOBAR[0041]............................ 1 1 0500 '' ATB_iConnectSleepMilliseconds 41529 MOBAR[0042]............................ 1 1 0016 '' ATB_iCreateSocketRetryLimit 41529 MOBAR[0043]............................ 1 1 0500 '' ATB_iCreateSocketSleepMilliseconds 41529 MOBAR[0044]............................ 1 1 0190 '' ATB_iListen_Queue_Depth 41529 MOBAR[0045]............................ 1 1 0016 '' ATB_iListenRetryLimit 41529 MOBAR[0046]............................ 1 1 0500 '' ATB_iListenSleepMilliseconds 41529 MOBAR[0047]............................ 1 1 0004 '' ATB_iMaxFilesPerPass 41529 MOBAR[0048]............................ 1 1 0016 '' ATB_iThread2000RetryLimit 41529 MOBAR[0049]............................ 1 1 0500 '' ATB_iThread2000SleepMilliseconds 41529 MOBAR[0050]............................ 1 1 0016 '' ATB_iThread5000RetryLimit 41529 MOBAR[0051]............................ 1 1 0500 '' ATB_iThread5000SleepMilliseconds . . . .continued below

41529 MOBAR[0064]............................ 1 1 0004 '' APC_COLLECTOR_iBigLoopSleepSeconds 41529 MOBAR[0065]............................ 1 1 0016 '' APC_COLLECTOR_iCreateFileRetryLimit 41529 MOBAR[0066]............................ 1 1 0500 '' APC_COLLECTOR_iCreateFileSleepMilliseconds 41529 MOBAR[0067]............................ 1 1 1000 '' APC_COLLECTOR_iQuerySleepMilliseconds 41529 MOBAR[0068]............................ 1 1 0016 '' APC_COLLECTOR_iReadRetryLimit 41529 MOBAR[0069]............................ 1 1 0010 '' APC_COLLECTOR_iReadSleepSeconds 41529 MOBAR[0070]............................ 1 1 0016 '' APC_COLLECTOR_iStartDaughterRetryLimit 41529 MOBAR[0071]............................ 1 1 0010 '' APC_COLLECTOR_iStartDaughterSleepSeconds 41529 MOBAR[0072]............................ 1 1 0016 '' APC_COLLECTOR_iWriteRetryLimit 41529 MOBAR[0073]............................ 1 1 0010 '' APC_COLLECTOR_iWriteSleepSeconds 41529 MOBAR[0074]............................ 1 1 0060 '' APC_COLLECTOR_WATCHERLimit 41529 MOBAR[0075]............................ 1 1 0004 '' APC_WATCHER_iBigLoopSleepSeconds

. . . .continued below



04598  05033  05040 Successfully exported 23 records 05058  05068 Begin time ............................ 21 Jan-2011 21:03:43 (GMT) 05077 End time .............................. 21 Jan-2011 21:03:43 (GMT) 05097 Records exported per second ........... 23.000 05103  16276  00366 ArgSoft Table Export Utility PROGRAM TERMINATION 00995 *** End of Run ***



Next, import the calendar information into Argent Job Scheduler



C:\ARGENT\QueueEngine>ARGSOFT_LOADFROMXML.EXE /SERVER_NAME=BETHESDA-SRV-DB /DATABASE_NAME=Argent Job Scheduler /TABLE_NAME=AJS_CALENDAR /INPUT_FILE=\\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\XML\CALENDAR_EXIM\CALENDAR_DATA.XML



00728 Argsoft Supervisor initialization starting 42757 Argsoft Supervisor Log = 'C:\ARGENT\QUEUEENGINE\LOGS\ARGSOFT_LOADFROMXML_EXE_PID_2840_LOG.TXT' 42765 Argsoft Supervisor Mutex = 'Global\ARGSOFT_LOADFROMXML_EXE_PID_2840_TXT' 42915 Argsoft Supervisor Debug level used: LOW 42931 Argsoft Supervisor Initialization completed 41529 MOBAR[0082]............................ 1 1 0003 '' APC_WRITER_BIGLOOP_SleepSeconds

. . . .continued below

 41628  00115 G ..................................... 274331432 00166 G->csDebugRegistryDataType [2] ........ 'REEXPAND_SZ  ' 00180 G->csMonthTable [11] .................. 'Nov' 00193 G->tcSTART_OF_GLOBAL_VECTOR ........... 'G->tcSTART_OF_GLOBAL_VECTOR' 00205 G->tcEND_OF_GLOBAL_VECTOR ............. 'G->tcEND_OF_GLOBAL_VECTOR' 00224  00228  00247  . . . .continued below

00166  00178  00379 Session successfully initialized 00433 Successfully connected to database 'Argent Job Scheduler' 06600  06603 Record set processing controls ........    06609  06614 Table name ............................ 'AJS_CALENDAR' 06623 Primary key ........................... 'name' 06632 Overwrite ............................. '72B0D373-5623-4387-AAFD-8B2437594D6A' 06641 Identity insert ....................... 'OFF' 06650 Special escapement .................... 'ON' 06659 Unique request ID ..................... '72B0D373-5623-4387-AAFD-8B2437594D6A' 06666

06767 Count of records in XML file .......... 23

07132 MODIFY record .........................  07140 Record number ......................... 1 07149 Reason ................................ 'Record exists but OVERWRITE=YES specified' 07158 Filter expression ..................... 'name = '$HOLIDAY$'' 07165

07829

07832 XML dataset summary  ..................  07841 XML dataset record count .............. 23 07850 Records inserted into database ........ 0 07859 Records updated in database ........... 23 07868 Records skipped during processing ..... 0 07874  07882 Begin time ............................ 21 Jan-2011 21:03:44 (GMT) 07891 End time .............................. 21 Jan-2011 21:03:46 (GMT) 07911 Records imported per second ........... 11.500 07918  . . . .continued below





C:\ARGENT\QueueEngine>DEL  \\BETHESDA-SRV-DB\C$\ARGENT\QueueEngine\XML\CALENDAR_EXIM\CALENDAR_DATA.XML



C:\ARGENT\QueueEngine>ECHO We are now done.... ending

We are now done.... ending



-----------------------  JOB COMPLETION INFORMATION  ------------------------

          Started at: 21 Jan 2011 16:03:39

        Completed at: 21 Jan 2011 16:03:46



        Elapsed Time: 00:00:07

       CPU time used: 00:00:00.92

              Status: Completed

         Return code: 0





Promoting Test Job Templates To Production

An interface similar to the preceding example can be easily deployed to accomplish the promotion of job template information from a test environment to a production environment.

The same tools, concepts, and approaches apply as in the above example.