DYLDATE4 blank when DYLDATE is populated
search cancel

DYLDATE4 blank when DYLDATE is populated

book

Article ID: 25083

calendar_today

Updated On:

Products

Vision:Results

Issue/Introduction

Why is DYLDATE4 blank when DYLDATE is filled in?

Cause

Many applications use the date flags to display the date a report was run. In some cases the report is printed even if there is no data in the input file, for example, to print a notice message. If one of the 4-digit date flags is used, DYLDATE4, DYLGREG4, DYLJULIAN4, that date field is empty. However, if a 2-digit date flag such as DYLDATE is used, the field is populated with the correct date.

The 2-digit date flags are in the original code design and are populated during program decode. The problem is that original control block was full at the time the 4-digit year dates were implemented, so they were put into the Reformat Area. This is populated during the first input phase cycle, but if no records are read these fields are not populated. 

Resolution

The workaround is to add an explicit READ to the program. This forces the user logic path to be taken and the date flags to be populated. There is no negative impact to the program and no other change needs to be made.

Additional Information

Refer to VISION:Results V6 Reference Guide page 301