GapAnalysisCache

Cache Gap Analysis

Minor Business Rule

Object Name: B0800213

Parent DLL: CHRM

Location: Client/Server

Language: C

Functional Description

Purpose

This cache contains records from a gap analysis snapshot.  It is then used by the Performance 
Appraisal Review application to display a competency based performance appraisal.  It also holds the values 

entered by the user until the OK button is pressed.  At that point, the values stored in the cache are 

updated to the database.  This cache is also used to auto calculate the employee competency levels 

based on the job competency level entered.


Setup Notes and Prerequisites


Special Logic




Technical Specification

• The 'Cache Cursor', Data Item 'GENLNG', must be passed the value '0' the first time the cache is 
initialized.  A value will be passed back that must be stored in a variable.  Each time this BSFN is 

called the value in that variable must be passed into the BSFN and a new value will be sent back to the 

variable.  This is the cache handle.  If the calling program needs more than one handle on the database 

at a time, then more than one GENLNG can be used.


• Use the following action codes to work with cache:
Cache Action Code, CACTN: '1' = Get Cache Record (using a full key)
'2' = Add Cache Record
'3' = Update Cache Record
'4' = Delete One Cache Record at a Time
'5' = Delete All Cache Records (The cache is left open)
'6' = Get Next Cache Record (using a partial key)

'7' = (Do Not Use)

'8' = End Cache (Cache is deleted and closed)

'9' = Close Cache Cursor


• The Cache Job Number should be the next number from X0010 passing in '00' for the System Code and 
'4' for the Next Number Index. 


• Return errors through Error Message ID, DTAI.

• The data can be accessed using the full key or a partial key using Number Keys and Index ID, to 
distinguish between a full or a partial fetch.  JobNumberAKey1 must always be part of the key. 

• The following Indexes are defined:
• Index 1:  Job Number, Job Competency Code, Rule Number
• Index 2:  Job Number, Job Competency Code, Option Number, Sort Number, Required Level, Rule Number
• Index 3:  Job Number, Job Competency Code, Option Number, Competency Type, Competency Code
• Index 4:  Job Number, Competency Segment ID
• Index 5:  Job Number, Competency Changed Flag
• Index 6:  Job Number, Competency Type, Competency Code, Job Competency Code, Rule Number
• Index 7:  Job Number, Rule Number, Job Competency Code
• When adding a record always attempt to get the record first.  If no error is returned then the 
record already exists and it cannot be added.




Data Structure

D0800213 - Cache Gap Analysis

Job Number - A unique ID for this cache.  Ususally retrieved from Get Internal Next Number function or API.

Cache Action Code - 

1 = Cache Get
2 = Cahce Add

3 = Cahce Update

4 = Cache Delete

5 = Cache Delete All

6 = Cache Get Next

7 = DO NOT USE

8 = Cache End

9 = Cache Close Cursor


Cache Cursor - The cursor ID of the current cache record.  Used by Get Next to identify the location of the last record 

retrieved.


Index ID - The index being used for the current cache action.  To add or update a record, Index 1 must be used since 

that is the only unique ID.

1 - Job Number, Job Competency Code, Rule Number

2 - Job Number, Job Competency Code, Option Number, Sort Number, Required Level, Rule Number

3 - Job Number, Job Competency Code, Option Number, Competency Type, Competency Code

4 - Job Number, Competency Segment ID

5 - Job Number, Competency Changed Flag

6 - Job Number, Competency Type, Competency Code, Job Competency Code, Rule Number

7 - Job Number, Rule Number, Job Competency Code


Number of Keys - The number of keys in the selected index being used for the current operation.  If the value is 1, then 

only the first key of the index is being used, if the value is 2, then the first and the second key are being used, and so on.


Suppress Error Message - Enter a 1 if you wish to suppress the cache error messages, otherwise they will be set.


Error Message ID - Returns the error, if any, encountered during processing.  If an error is reached during Get Next, 

then the end of the selected records has been reached.


Job Competency Code - The JCC for the current gap analysis record.


Option Number - The option number for this record in the gap analysis


Rule Number - the rule within the option for this record in the Gap Analysis.


Summarization Level - The level that the current record is on.  

0 = Job Competency Level

1 = Employee Competency Level


Competency Type - The employee competency type being evaluated.


Competency Code - The employee competency code being evaluated.


Required Competency Level - The level expected by the company for the current competency in this job


Competency Level Rule Weight - the weighted value of the current competency.


Competency Level - the evaluated employee competency level at the time the gap analysis snapshot was taken


Employee Self Appraisal Level - the level the employee feels he/she has achieved at the time of the self appraisal


Employee Self Appraisal Level Description - the description, as defined in the levels table, for the employee self 

appraisal level.


New Competency Level - Currently, a generic competency level field that can be used for any purpose.


New Competency Level Description - The description, as defined in the level table, of the new competency level.


Performance Appraisal Level - the level the supervisor feels the employee has achieved at the time of the appraisal


Performance Appraisal Level Description - the description, as defined in the levels table, for the performance 

appraisal level.


Job Competency Percent Achieved - the percentage of the required level achieved by the employee at the time the 

gap analysis snapshot was taken.

Auto Calculate Competency - A flag that signifies if this employee competency value can be automatically calculated 

by the software based on a job competency value.  

0 - No, auto. calc. is not allowed

1 - Yes, auto. calc. is allowed


Locked flag - a flag that denotes whether an employee competency is locked from automatic calculation or not.  The 

flag is a 1 if either the competency cannot be updated by the current event based on the competency update event table, or 

if the auto. calc. is not allowed.


Sort Number - This number, when part of an index key, will sort the records in the cache in ascending order.  You can 

set this to any value if you want the records to be sorted in a particular order.


Scale - The scale used by the current employee competency or defaulted for the job competency based on the 

performance appraisal scale.  This is a return parameter if N0800212 is called.


Competency Segment ID:  The segment ID on the text block control for this competency.  Leave blank if not using a text 

block control to display this information.


Level Segment ID:  The segment ID on the text block control where the level is displayed.  This is necessary so the level 

can be updated on the text block control.  If not using a text block to display this information, then leave this parameter 

blank.


Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.


Option Segment ID - The segment on the text block control where the option number for this competency is displayed.  

If not using a text control to display this information, leave blank.


Cache Name:  Convert the Job number to a string and pass it in this parameter.  This is a unique name for the cache in 

string form.


Required Level Description:  The description associated with the required level for this record.


Current Employee Competency Description:  The description associated with the current employee competency level.


Low Level:  The acceptable low level for this employee competency.


Low Level Description:  The associated description for the low level.


High Level:  The acceptable high level for this employee competency.


High Level Description:  The associated description for the high level.


Competency Type Description:  The associated description for this competency type.


Competency Code Description:  The associated description for this competency code.


Competency Changed Flag - Enter a 1 if this record, or the associated media object, has changed.  This flag will allow 

the cache to be read quickly through only the changed records and save them.

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberAJOBSMATH_NUMERICREQINPUT

Job Number - A unique ID for this cache.  Ususally retrieved from Get Internal Next Number function or API.

szCacheActionCodeCACTNcharREQINPUT

Cache Action Code - 
1 = Cache Get

2 = Cache Add

3 = Cache Update

4 = Cache Delete

5 = Cache Delete All

6 = Cache Get Next

7 = DO NOT USE

8 = Cache End

9 = Cache Close Cursor

idCacheCursorGENLNGIDREQBOTH

Cache Cursor - The cursor ID of the current cache record.  Used by Get Next to 
identify the location of the last record retrieved.

mnIndexIDNKEYSMATH_NUMERICREQINPUT

Index ID - The index being used for the current cache action.  To add or update a record, Index 1 must be used since 
that is the only unique ID.


1 - Job Number, Job Competency Code, Rule Number


2 - Job Number, Job Competency Code, Option Number, Sort Number, Required Level, Rule Number


3 - Job Number, Job Competency Code, Option Number, Competency Type, Competency Code


4 - Job Number, Competency Segment ID


5 - Job Number, Competency Changed Flag


6 - Job Number, Competency Type, Competency Code, Job Competency Code, Rule Number


7 - Job Number, Rule Number, Job Competency Code

mnNumberKeysNKEYSMATH_NUMERICREQINPUT

Number of Keys - The number of keys in the selected index being used for the 
current operation.  If the value is 1, then only the first key of the index is being 

used, if the value is 2, then the first and the second key are being used, and so 

on.

cSuppressErrorMessageSUPPScharOPTINPUT

Suppress Error Message - Enter a 1 if you wish to suppress the cache error messages, otherwise they will be set.

szErrorMessageIDDTAIcharOPTOUTPUT

Error Message ID - Returns the error, if any, encountered during processing.  If 
an error is reached during Get Next, then the end of the selected records has been 

reached.

szJobCompetencyCodeJCCcharOPTNONE

Job Competency Code - The JCC for the current gap analysis record.

szOptionNumberCOPTNcharOPTNONE

Option Number - The option number for this record in the gap analysis

mnRuleNumberRULENMATH_NUMERICOPTNONE

Rule Number - the rule within the option for this record in the Gap Analysis.

mnSummarizationLevelSUMLVLMATH_NUMERICOPTNONE

Summarization Level - The level that the current record is on.  
0 = Job Competency Level

1 = Employee Competency Level

szCompentencyTypeCMPEcharOPTNONE

Competency Type - The employee competency type being evaluated.

szCompentencyCodeCMPCcharOPTNONE

Competency Code - The employee competency code being evaluated.

mnRequiredCompetencyLevelREQLMATH_NUMERICOPTNONE

Required Competency Level - The level expected by the company for the current competency in this job

mnCompetencyLevelRuleWeightLVWTMATH_NUMERICOPTNONE

Competency Level Rule Weight - the weighted value of the current competency.

mnCompetencyLevelCMPVMATH_NUMERICOPTNONE

Competency Level - the evaluated employee competency level at the time the gap analysis snapshot was taken

mnEmployeeSelfAppraisalLevelSAPLMATH_NUMERICOPTNONE

Employee Self Appraisal Level - the level the employee feels he/she has achieved at the time of the self appraisal

szEmployeeSelfAppraisalLevelSAPLDScharOPTNONE

Employee Self Appraisal Level Description - the description, as defined in the levels table, for the employee self 
appraisal level.

mnNewCompetencyLevelNCMPVMATH_NUMERICOPTNONE

New Competency Level - Currently, a generic competency level field that can be used for any purpose.

szNewCompetencyLevelDescriNCMPDScharOPTNONE

New Competency Level Description - The description, as defined in the level table, of the new competency level.

mnPerformanceAppraisalLevelPAPLMATH_NUMERICOPTNONE

Performance Appraisal Level - the level the supervisor feels the employee has achieved at the time of the appraisal

szPerformanceAppraisalLevePAPLDScharOPTNONE

Performance Appraisal Level Description - the description, as defined in the levels table, for the performance 
appraisal level.

mnJobCompetencyPercentAchiJCPCTRQDMATH_NUMERICOPTNONE

Job Competency Percent Achieved - the percentage of the required level achieved by the employee at the time the 
gap analysis snapshot was taken.

cAutoCalculateCompetencyACCOMPcharOPTNONE

Auto Calculate Competency - A flag that signifies if this employee competency value can be automatically calculated 
by the software based on a job competency value.  


0 - No, auto. calc. is not allowed

1 - Yes, auto. calc. is allowed

cLockedFlagEV01charOPTNONE

Locked flag - a flag that denotes whether an employee competency is locked from automatic calculation or not.  The 
flag is a 1 if either the competency cannot be updated by the current event based on the competency update event table, or 

if the auto. calc. is not allowed.

mnSortNumberMATH01MATH_NUMERICOPTNONE

Sort Number - This number, when part of an index key, will sort the records in the cache in ascending order.  You can 
set this to any value if you want the records to be sorted in a particular order.

szScaleSCLEcharOPTNONE

Scale - The scale used by the current employee competency or defaulted for the job competency based on the 
performance appraisal scale.  This is a return parameter if N0800212 is called.

iCompetencySegmentIDINT01integerOPTNONE

Competency Segment ID:  The segment ID on the text block control for this competency.  Leave blank if not using a text 
block control to display this information.

iLevelSegmentIDINT01integerOPTNONE

Level Segment ID:  The segment ID on the text block control where the level is displayed.  This is necessary so the level 
can be updated on the text block control.  If not using a text block to display this information, then leave this parameter 

blank.

mnUniqueID1UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

mnUniqueID2UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

mnUniqueID3UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

mnUniqueID4UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

mnUniqueID5UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

mnUniqueID6UKIDMATH_NUMERICOPTNONE

Unique ID 1-6:  The unique ID for the Job Competency User Defined Description.

iOptionSegmentIDINT01integerOPTNONE

Option Segment ID - The segment on the text block control where the option number for this competency is displayed.  
If not using a text control to display this information, leave blank.

szCacheNamePIDcharREQINPUT

Cache Name:  Convert the Job number to a string and pass it in this parameter.  This is a unique name for the cache in 
string form.

szRequiredCompetencyLevelDRQDScharOPTNONE

Required Level Description:  The description associated with the required level for this record.

szCurrentEmployeeCompetenc_2CCMPDScharOPTNONE

Current Employee Competency Description:  The description associated with the current employee competency level.

mnLowLevelLOWCMATH_NUMERICOPTNONE

Low Level:  The acceptable low level for this employee competency.

szLowLevelDescriptionLODScharOPTNONE

Low Level Description:  The associated description for the low level.

mnHighLevelHIGHCMATH_NUMERICOPTNONE

High Level:  The acceptable high level for this employee competency.

szHighLevelDescriptionHIDScharOPTNONE

High Level Description:  The associated description for the high level.

szCompetencyTypeDescriptionCTDScharOPTNONE

Competency Type Description:  The associated description for this competency type.

szCompetencyCodeDescriptionCCDScharOPTNONE

Competency Code Description:  The associated description for this competency code.

cCompetencyChangedFlagEV01charOPTNONE

Competency Changed Flag - Enter a 1 if this record, or the associated media object, has changed.  This flag will allow 
the cache to be read quickly through only the changed records and save them.

Related Functions

None

Related Tables

None