This Subroutine checks if a date is in the YYYYMMDD format, if not then it raises and error.
Syntax
gosub check_dateformat ("YYYYMMDD")
Code Snippet
subroutine check_dateformat {
match date "^(([0-9]{4}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])))" ${SUBARG_1}
if (${date.STATUS} != MATCH) {
print Argument error: ${SUBARG_1} is not in YYYYMMDD format
terminate with error
}
}