UIB-DATE-TIME-STAMP VALUE different with MetaCobol 15.1
search cancel

UIB-DATE-TIME-STAMP VALUE different with MetaCobol 15.1

book

Article ID: 77113

calendar_today

Updated On:

Products

Datacom Datacom/DB MetaCOBOL Plus

Issue/Introduction

Why is the Datacom support for Metacobol Version 15.1 generated UIB-DATE-TIME-STAMP VALUE different than with MetaCOBOL+ Version 1.1?

For example, when the translation was run: 

Version 15.1 generated:     02 UIB-DATE-TIME-STAMP PIC S9(05) COMP-3 VALUE +42036

Version 1.1 generated:   
   02 UIB-DATE-TIME-STAMP PIC S9(05) COMP-3 VALUE +82057

Environment

z/OS

MetaCOBOL Plus 15.1

Cause

A solution was needed for 15.1 to the DLM macro (MCT#DLM).

According to the DatacomĀ® support for MetaCOBOL - 15.1 documentation section on "Other Generated Data-Names":

UIB-DATE-TIME-STAMP PIC S9(5) COMP-3.

This data item assures a unique UIB. It is initialized to the following at translation: The first byte contains the least significant character of the current day, and the remaining bytes contain the current time. A data item containing the date and time of the access.

But, with 15.1, the first byte contains the least significant character of the current month, rather than the current day. This is a change from the processing in version 1.1.

Resolution

Install Datacom/DB 15.1 PTF SO04526

Note that the process for uniqueness is different in version 15.1 with this solution, and you may need to update your program processing logic to deal with the different value format.