With Datamaker 4.2 GA, the function string @string(~stime~,HHMMSS)@ produces HH:MM:SS instead of HHMMSS

Document ID : KB000007823
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

I need to capture the System Time and put it into a format that I can transfer back to my DB2 tables.  There is a function that I used in 3.5 GTDatamaker that works the way the documentation states.  I am doing a proof of concept to take my 3.5 version generated scripts and migrate them to the latest GA Release, 4.2.  While doing this, I noticed that a previous working string function is no longer working as documented.

Environment:
Datamaker 4.2
Cause:

The function '@string(~stime~,HHMMSS)@' is used in most of my core scripts. For some reason, after the upgrade from 3.5 to 4.2 GA, the function output has become HH:MM:SS instead of HHMMSS.  To rectify this issue, the function '@replace(@string(~stime~,HHMMSS)@,:,)@' is substituted.  However, this is not an acceptable long term workaround as the function is clearly defective in 4.2 GA.

The format needed sometimes requires seconds added to the time. The following function is used: 

@replace(@string(@addseconds(~STIME~,20)@,HHMMSS)@ 

The function resolves properly some of the time but will then fail about every 3rd run with the following error: 

Publish errors 

Data in var line/iteration #1/1 row #1 of table "PFVEHICLE" column "STIMES" in step "Transactional Base Vehicles" contains data "@replace(@string(@addseconds(~STIME~,20)@,HHMMSS)@,:,)@" [2008-09-26 000020 Line 1 Column 53: incorrect syntax.] which is invalid/unresolved. 
Column details: STIMES decimal (6) NOT NULL
Data in var line/iteration #2/1 row #1 of table "PFVEHICLE" column "STIMES" in step "Transactional Base Vehicles" contains data "@replace(@string(@addseconds(~STIME~,20)@,HHMMSS)@,:,)@" [2008-09-28 000020 Line 1 Column 53: incorrect syntax.] which is invalid/unresolved. 
Column details: STIMES decimal (6) NOT NULL
Data in var line/iteration #3/1 row #1 of table "PFVEHICLE" column "STIMES" in step "Transactional Base Vehicles" contains data "@replace(@string(@addseconds(~STIME~,20)@,HHMMSS)@,:,)@" [2008-09-29 000020 Line 1 Column 53: incorrect syntax.] which is invalid/unresolved. 
Column details: STIMES decimal (6) NOT NULL
Data Preparation errors - STOPPING 

In the three lines, the 'XXXX-XX-XX' output is incremented up as time would.  As you cycle through the system time, the function continues to act in a seemingly unpredictable behavior.   However, while cycling it through the GUI, as the seconds pass the 31 second mark, it fails until after the 01 second mark.  This points to the seconds being interpreted as Days in a Month.

Resolution:

There is an error in the 4.2 GA code of Datamaker.  Please contact Support if you need a patch.  This was fixed in  GTDataMakerPB-4.2.0.151 and should be available in the next TDM GA. 

Additional Information:

To download the latest version of TDM, follow the directions in this document: https://support.ca.com/us/knowledge-base-articles.TEC1903942.html.
To contact support, go to https://www.ca.com/us/services-support/ca-support/contact-support.html