CacheJobCompetenciesForAllOrgani

Cache Job Competencies For All Organizational Levels

Minor Business Rule

Object Name: B0800154

Parent DLL: CHRM

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this function is to store all the confirmed job competencies at an organizational 

level.


Setup Notes and Prerequisites

Records can be Read, Added, Deleted, or Updated to the cache, depending on Cache Action Code, CACTN, 

passed in. The following is a list of the modes used to select cache processing options:

Input

Processing TypeType

============                                  

Cache Get 1

Cache Add 2

Cache Update 3

Cache Delete 4

Cache Delete All 5

Cache Get Next 6

Cache Add/Update 7 (Do Not Use)

Cache End  8

Cache Close Cursor 9


Return errors through Error Message ID, DTAI.


The cache Key is as follows:

mnJobnumberA_Key_1   (from GetInternalNextNumber B0000564)

szJobCompetencyCode_Key_2
szOptionNumber_Key_3

mnRuleNumber_Key_4  

jdDateBeginningEffective_Key_5

jdDateEndingEffective_Key_6

mnCurrentLevelUniqueID_Key_7

  

The data can be accessed using the full key or a partial key using NumberKeys, NKEYS, to distinguish 
between a full or a partial fetch.  mnJobnumberA_Key_1 must always be part of the key. 


The Cache Cursor, GENLNG must be past to and from the BSFN.


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.

Special Logic


Technical Specifications


Initialize the Cache 

Call internal function I0800154_InitCache


If no error initializing cache then Process Action code


If iCacheActionCode past in = 1 (Get) then call internal function 

I0800154_CacheGet.
If iCacheActionCode past in = 2 (Add) then call internal function 

 I0800154_CacheAdd.

If iCacheActionCode past in = 3 (Update) then call internal function

I0800154_CacheUpdate.
If iCacheActionCode past in = 4 (Delete) then call internal function

I0800154_CacheDelete.
If iCacheActionCode past in = 5 (Delete All) then call internal function

I0800154_CacheDeleteAll.

If iCacheActionCode past in = 6 (Get Next) then call internal functionI0800154_CacheGetNext.

If iCacheActionCode past in = 7 (Add Update) then call internal function

I0800154_CacheAddUpdate.

If iCacheActionCode past in = 8 (End) then call JDE function

 JdeCacheTerminateAll.

If iCacheActionCode past in = 9 (Close Cursor) then call internal 

Function I0800154_CloseCursor.
If iCacheActionCode = anything else then Error.


Return value of saved fields after cache processing is completed

szErrorMessageID = szErrorID

cSuppressErrorMessage = cSuppressErrorMessage
    szCacheActionCode = dsSaveData.szCacheActionCode

    mnNumberKeys = mnNumberKeys);



Function Clean Up


Internal functions

Function:  I0800154_InitCache   

If there is an error szErrorID = ERR_INIT_CACHE



Function:  I0800154_CacheGet   

Open the Cursor if error then szErrorID = "ERR_OPEN_CURSOR"

If no error Reset Cursor 

If iNumberOfKeys = '0' then Fetch the first record

Else fetch the record matching the keys

If there is an error with the fetch then szErrorID = ERR_FETCH_RECORD

if the Cursor does not = NULL then close the cursor



Function:  I0800154_CacheAdd 

Add the record the size of DSD0800154

If Add fails then szErrorID = ERR_ADD_RECORD



Function:  I0800154_CacheUpdate   

Fetch the record, if record is found Update the record

If there is an error then szErrorID = ERR_UPDATE_RECORD


Close the Cursor



Function:  I0800154_CacheDelete   

If Number Of Keys = 0 Then call internal function I0800154_CacheDeleteAll

else

Initialize the cursor

Fetch the record

If fetch is successful then delete the record

If there is an error deleting then szErrorID = ERR_DELETE_RECORD

If there is an error fetching then szErrorID = ERR_FETCH_RECORD


Close the cursor



Function:  I0800154_CacheDeleteAll   


Open the Cursor

Delete all records

If there is an error on delete then szErrorID = ERR_DELETE_RECORD


 Close Cursor



Function:  I0800154_CacheGetNext   

Notes:Assumption is made this function will be performed until the

Cache Index is no longer equal to the input index. If this function is prematurely ended, the cursor 

will have to be closed using function I0800154_CloseCursor, or memory leaks will result from the 

cursor being left open.


Set the cache with the number or keys = mnNumberKeys


Set cursor for either initial fetch or subsequent fetches

If idCacheCursor = 0L then this is a subsequent search 

Open Cursor

Copy the memory needed the size of DSD0800154
Fetch the Next record

if hCursor does not = NULL then fetch the next record

If idCacheCursor <> 0L fetch the first record

If the fetch was successful 

If iNumberOfKeys > 0 then call I0800154_ChangedKey and check that the keys match
If the keys do not match then szErrorID = ERR_FETCH_RECORD

If hCursor does not = NULL then close the cursor

set idCacheCursor   = 0L



Function:  I0800154_CacheAddUpdate 

DO NOT USE THIS FUNCTION



Function:  I0800154_CloseCursor   


Function:  I0800154_ChangedKey   

Test to see if the key matches the key in cache

If it has changed then bChangedKey = True

Else

bChangedKey = FALSE;


End of Internal functions



Data Structure

D0800154 - Cache Job Competencies For All Organizational Levels

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberA_Key_1JOBSMATH_NUMERICREQBOTH

The job number (work station ID) which executed the particular job.

szJobCompetencyCode_Key_2JCCcharOPTNONE

A code that uniquely identifies each job competency. Competencies are high-level human attributes that help an employee achieve the 
goals and objectives of the company. These competencies are also the foundation of an employee's job and job description.

mnRuleNumber_Key_4RULENMATH_NUMERICOPTNONE

Rule Number designates the order in which Employee Competencies will appear within a job competency option.

jdDateBeginningEffective_Key_5EFTBJDEDATEOPTNONE

The date that an address, item, transaction, or table record becomes active.  The meaning of this field differs, depending on the program.  
For example, the effective date could represent the following:    o When a change of address becomes effective.   o When a lease becomes 
effective.   o When a price becomes effective.   o When the currency exchange rate becomes effective.   o When a tax rate becomes effective. 

jdDateEndingEffective_Key_6EFTEJDEDATEOPTNONE

The date on which the item, transaction, or table becomes inactive, or through which you want transactions to appear. This field is used 
generically throughout the system. It could be a lease effective date, a price or cost effective date, a currency effective date, a tax rate effective 
date, or whatever is appropriate.

mnCurrentLevelUniqueID_Key_7UKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnOptionUniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription1UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription2UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription3UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription4UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription5UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription6UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnParentKeyIDInternalPUKIDMATH_NUMERICOPTNONE

A unique number that the system uses to identify a record in a file.

mnNewUniqueIDUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

szJobCompetencySourceJCCScharOPTNONE

The location in the organizational structure where the competency is defined.

cOverridesExistFlagOVREXcharOPTNONE

An option that indicates that overrides of the default competency exist.

mnCompetencyWeightCMWTMATH_NUMERICOPTNONE

A user defined code that indicates a job competency weight. For example, if a job is evaluated based on two competencies, each 
competency is assigned a weight. Thus, if a receptionist's job is evaluated based on a telephone skill competency and a typing competency, the 
telephone skill competency might be weighed more heavily than the typing competency if receptionists spend the majority of their time on the 
telephone.

mnIncludeInGapAnalysisINCLGMATH_NUMERICOPTNONE

An option that specifies whether a competency is included in a gap analysis evaluation. A gap analysis measures how the competencies 
of an employee compare with the competencies required by a particular job. Valid values are: 1 Include the job competency code in the gap 
analysis evaluation. 0 Do not include the job competency code in the gap analysis evaluation.

szOptionNumber_Key_3COPTNcharOPTNONE

A number that represents a user defined approach that an employee can use to demonstrate proficiency in a particular job competency. 
There can be more than one option for a job competency.

szCompentencyTypeCMPEcharOPTNONE

A code that identifies a competency table or category for which you can track employee competencies. Valid values 
are: 01 Training 02 Skill 03 Accomplishment 04 Certification 05 Degree 06 Language  It is a user defined code (05/CY), but the values are hard-coded and cannot be 
changed. Therefore, each of the competencies that you track must pertain to one of these competency types. Adding additional values to this 
list requires system customizations.

szCompentencyCodeCMPCcharOPTNONE

A code that specifies a competency within a competency type. For example, a competency for the competency type "Skill" might be "C 
programming" or  "Driving a forklift."

mnCompetencyLevelCMPVMATH_NUMERICOPTNONE

Obsolete, Do not use
^

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

idCacheCursorGENLNGIDREQBOTH

General purpose ID variable.

szCacheActionCodeCACTNcharREQINPUT

Cache  Getab  ab  ab  ab  1
Cache  Addab  ab  ab  ab  2

Cache  Updateab  ab  ab  3

Cache  Deleteab  ab  ab  4

Cache Delete  Allab  ab  ab  5

Cache Get  Nextab  ab  ab  6

Cache  Add/Updateab  ab  ab  7 (Do Not Use)

Cache End  ab  ab  ab  ab  8
Cache Close  Cursorab  ab  9

mnNumberKeysNKEYSMATH_NUMERICREQINPUT

The number of keys in an index that will be used to retrieve, delete, or update a record.

cSuppressErrorMessageSUPPScharOPTNONE

1 = Suppress Error Messages

mnRequiredCompetencyLevelREQLMATH_NUMERICOPTNONE

The required competency level for a particular job.

mnCompetencyLevelRuleWeightLVWTMATH_NUMERICOPTNONE

The relative value of each option within a job competency code. The weights of the combined options add up to 100%.

cPreferredMethodPFMTHcharOPTNONE

A code that indicates what option in the Competency Options - Overrides table (F0800606) is the preferred method to achieve the 
competency. For example, if the job requires either a degree or "equivalent work experience," you can indicate a preference between these two 
options. It is for informational purposes only and does not impact processes that use competencies.

mnCompetencyLevelExpectedLowLOWCMATH_NUMERICOPTNONE

The low point in a range for a particular job competency.  For example, if an employee's competency level falls above the low competency 
level and below the high competency level, the employee's job competency level is sufficient.

mnCompetencyLevelExpectedHighHIGHCMATH_NUMERICOPTNONE

The high point in a range for a particular job competency.  For example, if an employee's competency level falls above the low 
competency level and below the high competency level, the employee's job competency level is sufficient.

mnInheritedIncludeInGapFlagINCLGMATH_NUMERICOPTNONE

Special Output Returned
This value is the Include in Gap Analysis/Performance Appraisal (INCLG) flag that would be inherited 

if the current INCLG record did not exist.  This value is used when a change is made to the INCLG 

value to determine whether to write/end date an override record or not.

^

mnDefaultUniqueIDUKIDMATH_NUMERICOPTNONE

Special Output Returned
This is the default UKID for the Job Competency Code.  This value is from F0800602.

^

cAutoCalculateCompetencyACCOMPcharOPTNONE

An option that indicates whether this competency can be automatically calculated during an employee performance appraisal. During an 
employee performance appraisal, supervisors might have the option to complete only the job competency ratings and have the program 
derive the new competency ratings for the employee. This option decreases the time required to complete performance appraisals and keeps 
the employee competency ratings up-to-date. For some competencies, automatically-calculated values would be erroneous. For example, if 
a job requires a training class, you typically would not want the system to automatically calculate a rating of 3 (Complete) if the employee has 
not completed the class. You set up the default value for this option when you define job competency options. You can override the default 
value at any level where you attach job competency options.

Related Functions

None

Related Tables

None
UnconfirmedCompetencyCache

UnconfirmedCompetencyCache

Cache Job Competencies For All Organizational Levels

Minor Business Rule

Object Name: B0800154

Parent DLL: CHRM

Location: Client/Server

Language: C

CacheJobCompetenciesForAllOrgani
Functional Description


Purpose

The purpose of this function is to store all the confirmed job competencies at an organizational 
level.


Setup Notes and Prerequisites

Records can be Read, Added, Deleted, or Updated to the cache, depending on Cache Action Code, CACTN, 
passed in. The following is a list of the modes used to select cache processing options:

Input

Processing TypeType

============                                  

Cache Get 1

Cache Add 2

Cache Update 3

Cache Delete 4

Cache Delete All 5

Cache Get Next 6

Cache Add/Update 7 (Do Not Use)

Cache End  8
Cache Close Cursor 9


Return errors through Error Message ID, DTAI.


The cache Key is as follows:

mnJobnumberA_Key_1   (from GetInternalNextNumber B0000564)

szJobCompetencyCode_Key_2
szOptionNumber_Key_3
mnRuleNumber_Key_4  

jdDateBeginningEffective_Key_5

jdDateEndingEffective_Key_6

mnCurrentLevelUniqueID_Key_7

  

The data can be accessed using the full key or a partial key using NumberKeys, NKEYS, to distinguish 
between a full or a partial fetch.  mnJobnumberA_Key_1 must always be part of the key. 


The Cache Cursor, GENLNG must be past to and from the BSFN.


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.

Special Logic


Technical Specifications


Initialize the Cache 

Call internal function I0800154A_InitCache

If no error initializing cache then Process Action code


If iCacheActionCode past in = 1 (Get) then call internal function 

I0800154A_CacheGet.
If iCacheActionCode past in = 2 (Add) then call internal function 

 I0800154A_CacheAdd.

If iCacheActionCode past in = 3 (Update) then call internal function

I0800154A_CacheUpdate.
If iCacheActionCode past in = 4 (Delete) then call internal function

I0800154A_CacheDelete.
If iCacheActionCode past in = 5 (Delete All) then call internal function

I0800154A_CacheDeleteAll.

If iCacheActionCode past in = 6 (Get Next) then call internal functionI0800154A_CacheGetNext.

If iCacheActionCode past in = 7 (Add Update) then call internal function

I0800154A_CacheAddUpdate.

If iCacheActionCode past in = 8 (End) then call JDE function

 JdeCacheTerminateAll.

If iCacheActionCode past in = 9 (Close Cursor) then call internal 

Function I0800154A_CloseCursor.
If iCacheActionCode = anything else then Error.


Return value of saved fields after cache processing is completed

szErrorMessageID = szErrorID

cSuppressErrorMessage = cSuppressErrorMessage
    szCacheActionCode = dsSaveData.szCacheActionCode

    mnNumberKeys = mnNumberKeys);



Function Clean Up


Internal functions

Function:  I0800154A_InitCache   
If there is an error szErrorID = ERR_INIT_CACHE



Function:
  I0800154A_CacheGet   
Open the Cursor if error then szErrorID = "ERR_OPEN_CURSOR"

If no error Reset Cursor 

If iNumberOfKeys = '0' then Fetch the first record

Else fetch the record matching the keys

If there is an error with the fetch then szErrorID = ERR_FETCH_RECORD

if the Cursor does not = NULL then close the cursor



Function:  I0800154A_CacheAdd 

Add the record the size of DSD0800154A

If Add fails then szErrorID = ERR_ADD_RECORD



Function:  I0800154A_CacheUpdate   

Fetch the record, if record is found Update the record

If there is an error then szErrorID = ERR_UPDATE_RECORD


Close the Cursor



Function:  I0800154A_CacheDelete   

If Number Of Keys = 0 Then call internal function I0800154A_CacheDeleteAll

else

Initialize the cursor

Fetch the record

If fetch is successful then delete the record

If there is an error deleting then szErrorID = ERR_DELETE_RECORD

If there is an error fetching then szErrorID = ERR_FETCH_RECORD


Close the cursor



Function:  I0800154A_CacheDeleteAll   


Open the Cursor

Delete all records

If there is an error on delete then szErrorID = ERR_DELETE_RECORD


 Close Cursor



Function:  I0800154A_CacheGetNext   

Notes:Assumption is made this function will be performed until the

Cache Index is no longer equal to the input index. If this function is prematurely ended, the cursor 

will have to be closed using function I0800154A_CloseCursor, or memory leaks will result from the 

cursor being left open.


Set the cache with the number or keys = mnNumberKeys

Set cursor for either initial fetch or subsequent fetches

If idCacheCursor = 0L then this is a subsequent search 

Open Cursor

Copy the memory needed the size of DSD0800154A
Fetch the Next record

if hCursor does not = NULL then fetch the next record

If idCacheCursor <> 0L fetch the first record

If the fetch was successful 

If iNumberOfKeys > 0 then call I0800154A_ChangedKey and check that the keys match
If the keys do not match then szErrorID = ERR_FETCH_RECORD

If hCursor does not = NULL then close the cursor

set idCacheCursor   = 0L



Function:  I0800154A_CacheAddUpdate 

DO NOT USE THIS FUNCTION



Function:
  I0800154A_CloseCursor   

Function:  I0800154A_ChangedKey   

Test to see if the key matches the key in cache

If it has changed then bChangedKey = True

Else

bChangedKey = FALSE;


End of Internal functions




Data Structure

D0800154A - Unconfirmed Competency Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberA_Key_1JOBSMATH_NUMERICREQINPUT

The job number (work station ID) which executed the particular job.

mnParentID_Key_2PUKIDMATH_NUMERICOPTNONE

A unique number that the system uses to identify a record in a file.

mnLevel_Key_3MATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

mnUniqueID_Key_4UKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

jdDateBeginningEffective_Key_5EFTBJDEDATEOPTNONE

The date that an address, item, transaction, or table record becomes active.  The meaning of this field differs, depending on the program.  
For example, the effective date could represent the following:    o When a change of address becomes effective.   o When a lease becomes 
effective.   o When a price becomes effective.   o When the currency exchange rate becomes effective.   o When a tax rate becomes effective. 

jdDateEndingEffective_Key_6EFTEJDEDATEOPTNONE

The date on which the item, transaction, or table becomes inactive, or through which you want transactions to appear. This field is used 
generically throughout the system. It could be a lease effective date, a price or cost effective date, a currency effective date, a tax rate effective 
date, or whatever is appropriate.

mnDescription1UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription2UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription3UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription4UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription5UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnDescription6UniqueIDToShowUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnCompetencyWeightCMWTMATH_NUMERICOPTNONE

A user defined code that indicates a job competency weight. For example, if a job is evaluated based on two competencies, each 
competency is assigned a weight. Thus, if a receptionist's job is evaluated based on a telephone skill competency and a typing competency, the 
telephone skill competency might be weighed more heavily than the typing competency if receptionists spend the majority of their time on the 
telephone.

szErrorMessageIDDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

idCacheCursorGENLNGIDREQBOTH

General purpose ID variable.

szCacheActionCodeCACTNcharREQINPUT

Cache  Getab  ab  ab  ab  1
Cache  Addab  ab  ab  ab  2

Cache  Updateab  ab  ab  3

Cache  Deleteab  ab  ab  4

Cache Delete  Allab  ab  ab  5

Cache Get  Nextab  ab  ab  6

Cache  Add/Updateab  ab  ab  7 (Do Not Use)

Cache End  ab  ab  ab  ab  8
Cache Close  Cursorab  ab  9

mnNumberKeysNKEYSMATH_NUMERICREQINPUT

The number of keys in an index that will be used to retrieve, delete, or update a record.

cSuppressErrorMessageSUPPScharOPTNONE

1 = Suppress Error Message

Related Functions

None

Related Tables

None