Skip to main content

In an older version of MF COBOL I used "current-date" as the Source for a field in the screen section.  That triggers a compiler error now.  What replaced "current-date"?


#screensection
#date

In an older version of MF COBOL I used "current-date" as the Source for a field in the screen section.  That triggers a compiler error now.  What replaced "current-date"?


#screensection
#date
sweetster,

According to the language reference documentation the CURRENT-DATE special register is specific to the OSVS dialect and can only be used as the source in a MOVE statement. This worked for me using Visual COBOL :

$set osvs
working-storage section.
01 datevar pic x(8).
screen section.
01 screen1.
03 blank screen.
03 line 1 column 1 pic x(8) using datevar
procedure division.
move current-date to datevar
display screen1.

Gael

In an older version of MF COBOL I used "current-date" as the Source for a field in the screen section.  That triggers a compiler error now.  What replaced "current-date"?


#screensection
#date
Actually, CURRENT-DATE is also an intrinsic function and it can still be used as the source of a screen section item.
01 my-screen blank screen.
05 my-date pic x(8) from function current-date.
05 my-key pic x using any-key.

In an older version of MF COBOL I used "current-date" as the Source for a field in the screen section.  That triggers a compiler error now.  What replaced "current-date"?


#screensection
#date

We employ venture help specialists that are capable in helping you with various points you may require.