HP OpenVMS Systems

ask the wizard
Content starts here

Validating user-specified date? (DCL)

» close window

The Question is:

How do I check a date to see if it is valid inside a DCL script?  I am trying
 to take in the date as a paramater and am then searching files for records of
 that date, but I want to ensure a valid date.

The Answer is :

  Parse the user-specified date via one of the available DCL lexical
  functions.  eg: f$cvtime.  If the parse fails, then the user-specified
  date is not valid.

answer written or last revised on ( 15-MAY-2000 )

» close window