Functional Description
Purpose
The purpose of this function is to store all the information related to employee level in
relationship to the employee's supervisor.
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:
mnJobnumberAKey1 (from next number server X0010)
szModelName9Key3
mnModelOwnerKey4
cReviewTypeKey5
between a full or a partial fetch. JobNumberA 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
include the header file b0800199.h
Declare Variable
IDnJDBReturn;
ID idReturnValue= ER_SUCCESS;
char szErrorID[11];
int iCacheActionCode;
Declare Data Structures
DSD0800199 dsCacheKey;
DSD0800199 dsSaveData;
Declare pointers
HUSER hUser = (HUSER) NULL;
HCACHE hCacheHandle = (HCACHE) NULL;
Check for NULL pointers, if there are null pointers set error '4363'
Begin Main Processing
Initialization Of DS Structure and Save of Workfields
Initialize the Behavior
If an error occurs initializing the behavior and if cSuppressErrorMessage does not = '1' then
set error.
iCacheActionCode=atoi(lpDS->szCacheActionCode);
Initialize the Cache
Call internal function I00800199_InitCache
If no error initializing cache then Process Action code
If iCacheActionCode past in = 1 (Get) then call internal function
I0800199_CacheAdd.
If iCacheActionCode past in = 3 (Update) then call internal function
I0800199_CacheDeleteAll.
If iCacheActionCode past in = 6 (Get Next) then call internal functionI0800199_CacheGetNext.
If iCacheActionCode past in = 7 (Add Update) then call internal function
I0800199_CacheAddUpdate.
If iCacheActionCode past in = 8 (End) then call JDE function
JdeCacheTerminateAll.
If iCacheActionCode past in = 9 (Close Cursor) then call internal
Return value of saved fields after cache processing is completed
szErrorMessageID = szErrorID
mnNumberKeys = mnNumberKeys);
Function Clean Up
Free the Behavior
If the pointer szErrorMessageID is not blank and cSuppressErrorMessage does not = '1' then set error.
Internal functions
Function: I0800199_InitCache
Initialize cache for Benefit Categories
Declare Variables
DSD0800199dsCacheKey;
JDECMINDEXSTRUCTIndex[1];
Main Processing
Initialize output
SzErrorID = ""
Initialize the cache
Setup And Initialize Cache-Keys to Create Cache once
Set Memory, memset(Index, 0x00, sizeof(JDECMINDEXSTRUCT));
Set the number of segments of the key to = '5'
The first segment of the key is mnJobNumberA
Index->CacheKey[0].nOffset = offsetof(DSD0800199, mnJobnumberAKey1);
Index->CacheKey[1].nOffset = offsetof(DSD0800199, mnAddressNumberKey2);
Index->CacheKey[2].nOffset = offsetof(DSD0800199, szModelName9Key3);
Index->CacheKey[3].nOffset = offsetof(DSD0800199, mnModelOwnerKey4);
Index->CacheKey[4].nOffset = offsetof(DSD0800199, cReviewTypeKey5);
Set lphCacheHandle = "B0800199",
If there is an error szErrorID = ERR_INIT_CACHE
Function: I0800199_CacheGet
Declare Variables
JDECM_RESULT jdeCacheCode = JDECM_PASSED;
int iNumberOfKeys;
HJDECURSOR hCursor = (HJDECURSOR) NULL;
DSD0800199dsCacheData;
BOOLbChangedKey;
Main Processing
Initialize output
Set Memory
szErrorID = ""
Initialize Variables
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: I0800199_CacheAdd
Declare Variables
ID idCacheCursor;
Initialize output
SzErrorID = ""
Set the cache with the number or keys = mnNumberKeys
Set the cursor = idCacheCursor
Copy the memory needed the size of DSD0800199
Add the record the size of DSD0800199
If Add fails then szErrorID = ERR_ADD_RECORD
Function: I0800199_CacheUpdate
Declare Variables
HJDECURSOR hCursor = (HJDECURSOR) NULL;
DSD0800199dsCacheData;
Initialize output
SzErrorID = ""
Set the cache with the number or keys = mnNumberKeys
Set the cursor = idCacheCursor
Set the memory needed the size of DSD0800199
Fetch the record, if record is found Update the record
If there is an error then szErrorID = ERR_UPDATE_RECORD
Close the Cursor
Function: I0800199_CacheDelete
Declare Variables
JDECM_RESULT jdeCacheCode = JDECM_PASSED;
int iNumberOfKeys;
HJDECURSOR hCursor = (HJDECURSOR) NULL;
Main Processing
Initialize Variables
SzErrorID = ""
Set the cache with the number or keys = mnNumberKeys
If Number Of Keys = 0 Then call internal function I0800199_CacheDeleteAll
else
Initialize the cursor
Set the memory the size of DSD0800199
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: I0800199_CacheDeleteAll
Declare Variables
JDECM_RESULT jdeCacheCode = JDECM_PASSED;
int iNumberOfKeys;
HJDECURSOR hCursor = (HJDECURSOR) NULL;
Main Processing
Initialize input and output
SzErrorID = ""
Copy the memory needed the size of DSD0800199
Set the cache with the number or keys = mnNumberKeys
Open the Cursor
Delete all records
If there is an error on delete then szErrorID = ERR_DELETE_RECORD
Close Cursor
Function: I0800199_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 I0800199_CloseCursor, or memory leaks will result from the
cursor being left open.
Declare Variables
JDECM_RESULTjdeCacheCode = JDECM_PASSED;
intiNumberOfKeys;
BOOLbMatchKey=FALSE;
BOOLbChangedKey;
HJDECURSOR hCursor = (HJDECURSOR) NULL;
DSD0800199dsCacheData;
ID idCacheCursor;
Main Processing
Initialize output
SzErrorID = ""
Set the memory needed the size of DSD0800199
Initialize Variables
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
Fetch the Next record
If idCacheCursor <> 0L fetch the first record
If the fetch was successful
If the keys do not match then szErrorID = ERR_FETCH_RECORD
set idCacheCursor = 0L
Function: I0800199_CacheAddUpdate
DO NOT USE THIS FUNCTION
Function: I0800199_CloseCursor
Declare Variables
If idCacheCursor does not equal 0L then close cursor
Set idCacheCursor = 0L
Function: I0800199_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
D0800199 - Compensation Root Work Table Cache
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnJobnumberAKey1 | JOBS | MATH_NUMERIC | REQ | INPUT |
The job number (work station ID) which executed the particular job. | ||||
szModelName9Key3 | MNAME | char | OPT | BOTH |
The model name. Valid values are:
MASTER is a model name to be used for the Final Submitted Compensation.
PUBLIC model is
| ||||
mnModelOwnerKey4 | MOWNR | MATH_NUMERIC | OPT | BOTH |
The address book number of the person creating the model. | ||||
cReviewTypeKey5 | RWTYP | char | OPT | BOTH |
A code that indicates the last compensation review type. | ||||
mnAddressNumberKey2 | AN8 | MATH_NUMERIC | OPT | BOTH |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
cSuppressErrorMessage | SUPPS | char | OPT | INPUT |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
szErrorMessageID | DTAI | char | OPT | OUTPUT |
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
| ||||
idCacheCursor | GENLNG | ID | REQ | BOTH |
General purpose ID variable. | ||||
mnNumberKeys | NKEYS | MATH_NUMERIC | REQ | INPUT |
The number of keys in an index that will be used to retrieve, delete, or update a record. | ||||
szCacheActionCode | CACTN | char | REQ | INPUT |
A code that indicates the activity you want to perform. Valid codes:
o Get - Retrieve the cache element
o Add - Add a cache element
o
| ||||
cModelTypeCode | MTYPC | char | OPT | BOTH |
There are three types of models:
PUBLIC model can be viewed by owner and anyone above.
MASTER model is used for final
| ||||
szModelDescription | MDL01 | char | OPT | BOTH |
This field is for a description of the data item. | ||||
szNameAlpha | ALPH | char | OPT | BOTH |
The text that names or describes an address. This 40-character alphabetic field appears on a number of forms and reports. You can enter
| ||||
mnSupervisor | ANPA | MATH_NUMERIC | OPT | BOTH |
The address book number of the supervisor. | ||||
szSupervisorName | SPRVN | char | OPT | BOTH |
The address book name of the supervisor. | ||||
szCompany | CO | char | OPT | BOTH |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szCostCenterHome | HMCU | char | OPT | BOTH |
The number of the business unit in which the employee generally resides. | ||||
cEmploymentStatus | EST | char | OPT | BOTH |
A user defined code (07/ES) that specifies an employee's status within the company. You can change the default codes or set up new
| ||||
cEmployeePayStatus | PAST | char | OPT | BOTH |
The code used to indicate whether an employee's pay status is active or inactive. Codes for active pay status employees are numeric,
| ||||
szUnionCode | UN | char | OPT | BOTH |
A user defined code (06/UN) that represents the union or plan in which the employee or group of employees work or participate. | ||||
cPayTypeHSP | SALY | char | OPT | BOTH |
A code that specifies how an employee is paid. Valid codes are: H Hourly S Salaried P Piecework | ||||
mnCompanyStdHoursYear | COIHR | MATH_NUMERIC | OPT | BOTH |
The number of work hours in the year for the company. | ||||
mnFullTimeEquivalents | FTE | MATH_NUMERIC | OPT | BOTH |
The full-time equivalent (FTE) amount. This figure is the portion of a full-time worker that an employee represents within the business unit.
| ||||
mnWorkHoursPerYear | IH | MATH_NUMERIC | OPT | BOTH |
The number of work hours in the year. When you do not set your payroll company constants to use the Pay Grade Step table as the
| ||||
mnRtHourly | PHRT | MATH_NUMERIC | OPT | BOTH |
The employee's hourly rate, which is retrieved during time entry. If you enter a rate in this field on any other form, that rate can override the
| ||||
mnCurrentAnnualizedSalary | CASAL | MATH_NUMERIC | OPT | BOTH |
This is the current annual salary earned by an employee. For salaried employees, this annual salary is the current actual annual salary
| ||||
mnCompaRatio | CMPA | MATH_NUMERIC | OPT | BOTH |
A calculation used to compare an employee's salary/wage against a midpoint amount set up within a pay grade or salary range. | ||||
szJobTitle | JBCX | char | OPT | BOTH |
A title associated with an employee's job. | ||||
jdDateCurrentPosition | CPDT | JDEDATE | OPT | BOTH |
The date the employee started the current position. | ||||
mnRtSalary | SAL | MATH_NUMERIC | OPT | BOTH |
The amount that an employee is paid in one year, assuming that the employee is paid every pay period of the year.
For WorldSoftware:
For
| ||||
szSalaryDataLocality | SLOC | char | OPT | BOTH |
A user defined code (07/SL) that defines the different salary localities within an organization. For example, you can compare salaries for
| ||||
szPositionID | POS | char | OPT | BOTH |
A code that you use for budgetary (position) control purposes. The position ID consists of:
o Position (position code and its description)
| ||||
szDescription001 | DL01 | char | OPT | BOTH |
A user defined name or remark. | ||||
jdDateinCurrentJob | CDIJ | JDEDATE | OPT | BOTH |
The date when an employee started working in this job. | ||||
szJobCategory | JBCD | char | OPT | BOTH |
A user defined code (07/G) that defines the jobs within your organization. You can associate pay and benefit information with a job type and
| ||||
szDescription01002 | DL02 | char | OPT | BOTH |
Additional text that further describes or clarifies a field in the system. | ||||
szJobStep | JBST | char | OPT | BOTH |
A user defined code (07/GS) that designates a specific level within a particular job type. The system uses this code in conjunction with job
| ||||
szPayGrade | PGRD | char | OPT | BOTH |
A code that designates a category for grouping employees according to pay ranges. For each pay grade, you enter a pay range that
| ||||
szPayGradeStep | PGRS | char | OPT | BOTH |
A code that identifies a pay grade and pay step. You can use this code to determine an employee's pay rate.
If you have set up your
| ||||
mnTimeinJobmonth | TIJM | MATH_NUMERIC | OPT | BOTH |
The number of months the employee has been in this job. | ||||
mnTimeinPositionmonth | TIPM | MATH_NUMERIC | OPT | BOTH |
The number of months the employee has in this position. | ||||
mnLengthinservicemonth | LISM | MATH_NUMERIC | OPT | BOTH |
The number of months an employee has worked for the company. | ||||
jdDateLastRaise | DR | JDEDATE | OPT | BOTH |
The date of the employee's last raise. For the stand-alone HR system, this is the date when you update salary and wages. If you also have
| ||||
jdLastSalaryreviewdate | LSRD | JDEDATE | OPT | BOTH |
The date the last compensation review was given. | ||||
jdNextSalaryreviewdate | NSRD | JDEDATE | OPT | BOTH |
The date on which the employee is scheduled for the next compensation review. | ||||
cCompanychange | COCHG | char | OPT | BOTH |
If the company changed, enter 1 in this field. Leave the field at 0 if the company did not change. | ||||
cBUchange | BUCHG | char | OPT | BOTH |
If the Business Unit was changed, enter 1 in this field. If the Business Unit did not change, leave the field at 0. | ||||
cPayStatuschange | PSCHG | char | OPT | BOTH |
If the pay status was changed, enter 1 in this field. Leave the field at 0 if the pay status did not change. | ||||
cUnionchange | UNCHG | char | OPT | BOTH |
Use this processing option to specify a change in the union code. Valid values are:
0 The union code is not changed
1 The union code
| ||||
cLocalityChange | LOCHG | char | OPT | BOTH |
If the locality was changed, enter 1 in this field. Leave the field at 0 if the locality did not change. | ||||
cPayClassChange | PCCHG | char | OPT | BOTH |
If the pay class was changed, enter 1 in this field. Leave the field at 0 if the pay class did not change. | ||||
cCurrentSalarychange | CSCHG | char | OPT | BOTH |
If the current salary was changed, enter 1 in this field. Leave the field at 0 if the current salary did not change. | ||||
cCurrentCompachange | CCCHG | char | OPT | BOTH |
If the Current Compa Ratio was changed, enter 1 in this field. If the Current Compa Ratio did not change, leave the field at 0. | ||||
cCurrentPositonchange | CPCHG | char | OPT | BOTH |
If the current position was changed, enter 1 in this field. Leave the field at 0 if the current position did not change. | ||||
cPositionDateChange | PDCHG | char | OPT | BOTH |
If the current date on position was changed, enter 1 in this field. Leave the field at 0 if the current date on position did not change. | ||||
cJobDateChange | JDCHG | char | OPT | BOTH |
If the Current Date on Job was changed, enter 1 in this field. Leave the field at 0 if the Current Date on Job did not change. | ||||
cSupervisorChange9 | SPCHG | char | OPT | BOTH |
The employee's supervisor change flag. | ||||
cCurrentJobTypechange | CJTCHG | char | OPT | BOTH |
If the Current Job Type was changed, enter 1 in this field. If the Current Job Type did not change, leave the field at 0. | ||||
cCurrentJobStepchange | CJSCHG | char | OPT | BOTH |
If the Current Job Step was changed, enter 1 in this field. If the Current Job Step did not change, leave the field at 0. | ||||
cCurrentPayGradechange | CPGCHG | char | OPT | BOTH |
If the current pay grade was changed, enter 1 in this field. Leave the field at 0 if the current pay grade did not change. | ||||
cCurrentPayStepchange | CPSCHG | char | OPT | BOTH |
If the current pay step was changed, enter 1 in this field. Leave the field at 0 if the current pay step did not change. | ||||
cLastRaiseDateChange | LRDCHG | char | OPT | BOTH |
The date of the last raise. | ||||
jdNewSalaryEffectveDate | NSEFTO | JDEDATE | OPT | BOTH |
A future date on which you want salary changes to take effect. | ||||
mnNewAnnualizedSalary | NAS | MATH_NUMERIC | OPT | BOTH |
The recalculated annual salary earned by an employee. For salaried employees,this annual salary is the current actual annual salary with
| ||||
cNewSalaryOutsiderange | NSOR | char | OPT | BOTH |
A code that indicates that salary is above or below the range specified in the salary range guideline table. | ||||
mnNewCompaRatio | NCR | MATH_NUMERIC | OPT | BOTH |
A calculation you will use to compare an employee's salary or wage against a midpoint amount that is set up within a pay grade or salary
| ||||
szNewPosition | NPOS | char | OPT | BOTH |
This is the new position ID to be used for budgetary (position) control purposes. The position ID consists of the position code and its
| ||||
szNewExternalJobTitle | NEJT | char | OPT | BOTH |
The name for the employee's new job that the company uses externally, such as on business cards. | ||||
mnNewHourlyRate9 | NHRR | MATH_NUMERIC | OPT | BOTH |
The employee's new hourly rate. | ||||
cNewPayTypeHSP | NSALY | char | OPT | BOTH |
A code that indicates how an employee will be paid. Valid values are: H Hourly S Salaried P Piecework | ||||
szNewPositionDescription | NPDL01 | char | OPT | BOTH |
This field is for a new position description. | ||||
szNewJobType | NJT | char | OPT | BOTH |
A code that defines jobs within your organization. You can associate pay and benefit information with a job type and apply that information
| ||||
szNewJobTypeDescrition | NJTDL | char | OPT | BOTH |
This field is for a user defined name or remark. | ||||
szNewJobStep | NJS | char | OPT | BOTH |
A code that designates a specific level within a particular job type. The system uses this code in conjunction with job type to determine pay
| ||||
szNewPayGrade | NPGR | char | OPT | BOTH |
A code that designates a category for grouping employees according to pay ranges. For each pay grade, you enter a pay range that
| ||||
szNewPayStep | NPST | char | OPT | BOTH |
A code that identifies a pay grade and pay step. You can use this code to specify an employee's pay rate. | ||||
cPayFrequency | PFRQ | char | OPT | BOTH |
A user defined code (07/PF) that indicates how often an employee is paid. Valid codes are:
B
Biweekly
W
Weekly
S
Semimonthly
| ||||
cFlsaExemptYN | FLSA | char | OPT | BOTH |
A code that indicates whether the employee fits the rules of the Fair Labor Standards Act (FLSA) and thus does not have to be paid for
| ||||
szNewUnionCode | NUN | char | OPT | BOTH |
A code that indicates the new union or new plan in which the employee or group of employees work or participate. | ||||
szBenefitGroupCode | DIVC | char | OPT | BOTH |
The benefit group to which the employee is assigned. Benefit groups facilitate employee enrollment by categorizing benefit plans and
| ||||
szChangereasonforjobtitlec | JTTRS | char | OPT | BOTH |
A code that indicates the reason why the job title was changed. | ||||
mnPerformanceAppraisalLevel | PAPL | MATH_NUMERIC | OPT | BOTH |
A code that specifies the level of proficiency at which a supervisor rates a person or asset for a particular competency type and
| ||||
jdDateLastReviewed | DATRVW | JDEDATE | OPT | BOTH |
A date that indicates when the process was last reviewed. | ||||
mnTierRanking | TIRNK | MATH_NUMERIC | OPT | BOTH |
A value that allows a supervisor to either rank employees individually or group them into tiers. When employees are ranked, each
| ||||
jdLastTierRankdate | TRNKD | JDEDATE | OPT | BOTH |
The date the Tier/Rank was last updated. | ||||
mnTotalJobCompetencyPercen | JBPCTRQD | MATH_NUMERIC | OPT | BOTH |
A number that indicates how an employee is progressing in relation to the required competency level for a particular job.
The system
| ||||
jdLastTotalJobCompetencyre | LTJCRW | JDEDATE | OPT | BOTH |
The date on which the last job competency review took place. | ||||
mnTotalBudgetAmount | TBAM | MATH_NUMERIC | OPT | BOTH |
The amount that is budgeted for a particular position within a business unit. | ||||
mnTotalIncreaseAmount | TIAM | MATH_NUMERIC | OPT | BOTH |
This field indicates the total amount of all increases. | ||||
cApprovalStatus | APPST | char | OPT | BOTH |
A code that indicates whether an employee status change has been approved.
Valid values are:
Blank Pending
1 Approved
2
| ||||
mnRespondingSupervisor | ANAB | MATH_NUMERIC | OPT | BOTH |
The supervisor responding to a request. | ||||
jdDateEmploymentStart | DST | JDEDATE | OPT | BOTH |
The date on which the employee actually reported to work for the most recent period of hire. When an employee initially begins working,
| ||||
jdLastApprovedRejectedDate | LARD | JDEDATE | OPT | NONE |
This field is for the last approved or rejected date. |
None |
None |