Example of Retaining Attribute Values in Future-Dated Records
When you update a date-effective object, you can leave attribute values in future-dated records unchanged. To retain these values, you set the maintenance mode to Retain and specify the #RETAIN token instead of an effective end date.
This token ensures that your changes take effect from the supplied effective start date to the start of the next record. If no future-dated records exist, then your changes apply until the end date of the record. This topic provides an example showing the effects of Retain mode.
Retaining Future-Dated Attribute Values in an Assignment Object
Consider the date-effective history of the Assignment object shown in this table.
Effective Start Date |
Effective Sequence |
Effective End Date |
Action Code |
Job Code |
Grade |
Location |
Hours |
---|---|---|---|---|---|---|---|
2010/06/08 |
1 |
2012/03/03 |
HIRE |
ACC1 |
IC2 |
HQ |
40 |
2012/03/04 |
1 |
2012/03/04 |
PROMOTION |
ACC1 |
IC4 |
HQ |
40 |
2012/03/04 |
2 |
2012/03/04 |
TRANSFER |
ACC1 |
IC4 |
LVP |
40 |
2012/03/04 |
3 |
2012/06/01 |
JOB_CHANGE |
ACC3 |
IC4 |
LVP |
40 |
2012/06/02 |
1 |
4712/12/31 |
JOB_CHANGE |
ACC2 |
IC4 |
LVP |
40 |
To change the working hours to 37.5 from 2012/01/10 without affecting future-dated records, you use this data file:
SET PURGE_FUTURE_CHANGES N
METADATA|Assignment|SourceSystemId|EffectiveStartDate|EffectiveSequence|EffectiveLatestChange|EffectiveEndDate|ActionCode|NormalHours
MERGE|Assignment|2724|2012/01/10||Y|#RETAIN|ASG_CHANGE|37.5
After update, the Assignment object is as shown in this table.
Effective Start Date |
Effective Sequence |
Effective End Date |
Action Code |
Job Code |
Grade |
Location |
Hours |
---|---|---|---|---|---|---|---|
2010/06/08 |
1 |
2012/01/09 |
HIRE |
ACC1 |
IC2 |
HQ |
40 |
2012/01/10 |
1 |
2012/03/03 |
ASG_CHANGE |
ACC1 |
IC2 |
HQ |
37.5 |
2012/03/04 |
1 |
2012/03/04 |
PROMOTION |
ACC1 |
IC4 |
HQ |
40 |
2012/03/04 |
2 |
2012/03/04 |
TRANSFER |
ACC1 |
IC4 |
LVP |
40 |
2012/03/04 |
3 |
2012/06/01 |
JOB_CHANGE |
ACC3 |
IC4 |
LVP |
40 |
2012/06/02 |
1 |
4712/12/31 |
JOB_CHANGE |
ACC2 |
IC4 |
LVP |
40 |
Attributes in records with effective start dates after 2012/01/10 retain their current values.
As recommended, the data file includes no effective sequence number. Therefore, the next available number in the sequence is allocated automatically.