You are currently viewing How to add SET commands in HDL file using HDL Transformation Formula?
How to add SET commands in HDL file using HDL Transformation Formula?
- How to add SET commands in HDL file using HDL Transformation Formula?
Total Visits: 10

In this article we will look into how to pass the SET commands to HDL file using HCM Data Loader Transformation formula.

If you are new to HDL Transformation formula, please go through the posts at the link https://fusionhcmknowledgebase.com/tag/transformation-formula/ to get an idea of how the transformation formula converts the fixed/delimited files to HDL format.

However, if there is a need to add SET commands to the HDL file to trigger other events, it was not possible earlier. Oracle has added this functionality from 20D.

Sample logic:

ELSE IF OPERATION = 'SETINSTRUCTIONS' THEN
(
SET1[1] = 'Worker' /*FileName*/
SET1[2] = 'ENABLE_INCREMENTAL_LOAD_EVENTS Y'
RETURN SET1
)

We need to use the SETINSTRUCTIONS operation and pass the filename and the SET command and return the set command.

This operation can be used after the DELIMITER operation on the FF.

Sample FF will look like;

INPUTS  ARE OPERATION (text),
LINENO (number),
POSITION1 (text),
POSITION2 (text),
POSITION3 (text),
POSITION4 (text),
LINEREPEATNO (number)
DEFAULT FOR LINEREPEATNO IS 1
DEFAULT FOR LINENO       IS 1
DEFAULT FOR POSITION1    IS 'NO DATA'
DEFAULT FOR POSITION2    IS 'NO DATA'
DEFAULT FOR POSITION3    IS 'NO DATA'
DEFAULT FOR POSITION4    IS 'NO DATA'
IF OPERATION='FILETYPE' THEN
	OUTPUTVALUE='DELIMITED'
ELSE IF OPERATION='DELIMITER' THEN
	OUTPUTVALUE=','
ELSE IF OPERATION = 'SETINSTRUCTIONS' THEN
(
SET1[1] = 'Worker' /*FileName*/ /* ElementEntry etc */
SET1[2] = 'ENABLE_INCREMENTAL_LOAD_EVENTS Y'
RETURN SET1
)
ELSE IF OPERATION='READ' THEN
	OUTPUTVALUE='NONE'
ELSE IF OPERATION = 'NUMBEROFBUSINESSOBJECTS' THEN
	(
	OUTPUTVALUE = '1'
	RETURN OUTPUTVALUE
	)
ELSE IF OPERATION = 'METADATALINEINFORMATION' THEN
	(
     METADATA1[1] = 'ElementEntry' /*FileName*/
     METADATA1[2] = 'ElementEntry' /*FileDiscriminator*/
     METADATA1[3] = 'AssignmentNumber'
     METADATA1[4] = 'EffectiveStartDate'
     METADATA1[5] = 'EffectiveEndDate'
     METADATA1[6] = 'ElementName'
     METADATA1[7] = 'EntryType'
     METADATA1[8] = 'LegislativeDataGroupName'
     METADATA1[9] = 'MultipleEntryCount'
	 RETURN METADATA1
	 )
ELSE IF OPERATION = 'MAP' THEN
....
Core Processing Logic
....
....
)
ELSE
OUTPUTVALUE = 'NONE'
RETURN OUTPUTVALUE

The output HDL will look something like below based on what values we actually return in the core processing logic:

SET ENABLE_INCREMENTAL_LOAD_EVENTS Y
METADATA|WorkTerms|ActionCode|ReasonCode|EffectiveStartDate|EffectiveEndDate|EffectiveLatestChange|PersonNumber|EffectiveSequence|AssignmentNumber|PeriodOfServiceId|LegalEmployerName|AssignmentType
If you like the content, please follow us on LinkedInFacebook, and Twitter to get updated with the latest content.