Difference between revisions of "Reading Spectrum Data Change Records"

From Vital Soft Wiki
Jump to: navigation, search
>Johno
(Editing the Job Parameters)
>Johno
(Installing the Data Change Files)
Line 9: Line 9:
 
or
 
or
 
:gunzip datachange_it64.gz
 
:gunzip datachange_it64.gz
The library file (datachng.sl or datachng.so) must remain in the /ASKPLUS directory.  The extract job (ask_datachange_job) should be moved to a location with access to the Spectrum databases and may be renamed.  The contents of the job may also be copied into UC4 script.
+
The library file (datachng.sl or datachng.so) must remain in the /ASKPLUS directory.  The extract job (ask_datachange_job) should be moved to a location with access to the Spectrum databases and may be renamed.  The contents of the job may also be copied into UC4 a script.
  
 
===Editing the Job Parameters===
 
===Editing the Job Parameters===

Revision as of 17:49, 17 January 2014

Reading Spectrum Data Change Records

Overview

The SH-HISTORY and LN-HISTORY datasets (HISTRY database) contain data change records that are stored in a binary format. AskPlus provides two special functions designed to read and interpret these records. To use these functions the datachng.sl (or .so Itanium) must be installed in the /ASKPLUS directory. An AskPlus job is also available that extracts specific data change records based on their TYPE and ENTRY-DATE.

Installing the Data Change Files

The data change library file and the extract job are provided in a single gz download. Choose the pa32 file for PARISC and the it64 file for Itanium. Transfer the gz file to the /ASKPLUS directory on UNIX and execute the command.

gunzip datachange_pa32.gz

or

gunzip datachange_it64.gz

The library file (datachng.sl or datachng.so) must remain in the /ASKPLUS directory. The extract job (ask_datachange_job) should be moved to a location with access to the Spectrum databases and may be renamed. The contents of the job may also be copied into UC4 a script.

Editing the Job Parameters

The job contains a prompts section to customize the extract. You may specify a date range, specific record types and the name of the final SD file that is created. You can also specify whether or not to include share history and/or loan history. "

*** Start of Prompts Section ***
*
*
* START-DATE is the range start-date (YYYYMMDD format)
* END-DATE is the range end-date (YYYYMMDD format)
*
* The range maximum is 100 days from the start-date, regardless of end-date.
*

Enter the date range here:

newreg #START-DATE:I2 = 20140101 
newreg #END-DATE:I2 = 20140131
*
* INCLUDE-SH-HIST is the flag to include SH-HISTORY ("Y" or "N")
* INCLUDE-LN-HIST is the flag to include LN-HISTORY ("Y" or "N")
*

By default, the extract will include both SH-HISTORY and LN-HISTORY.

newreg #INCLUDE-SH-HIST:X1 = "Y" 
newreg #INCLUDE-LN-HIST:X1 = "Y"
*
* VALID-TYPES is the list of the datachange HISTORY.TYPE values to look for.
*

Enter all valid types in a list. Each line (except the last) must be terminated by a cat

newreg VALID-TYPES:x300
load VALID-TYPES =
 "200,201,202,203,204,205,206,210," cat
 "300,303,304,305,306,307,308,309,313,314,315,396,399," cat
 "400,401,403,405,410,430,440,497," cat
 "500,506,510,550,551,552,560,570," cat
 "600,700,800,850,900,910,920,921,930,940,950,960,970"
*
* OUTPUT-FILE is the fully qualified file name of the final Self Describing file .
*

Enter a fully qualified file name for the job to create.

newreg #OUTPUT-FILE:X100 = “/ASKPLUS/visimage/DC-FILE”;
*** End of Prompts section ***