StephenJSpiro
Programmer
Terry Heinze posted this in comp.lang.cobol, and I thought it was so great, I want to share it!
*-----------------
You could save yourself some overhead by using:
MULTIPLY YYMMDD BY 100.0001 GIVING MMDDYY
and
MULTIPLY MMDDYY BY 10000.01 GIVING YYMMDD.
Those can be modified to include century for Y2K, also.
....Terry
P.S. Here in MN, we use shortcuts, Mike!
*-----------------
Of course, the receiving fields truncate the result! Try the arithmetic ... it really works!
Stephen J Spiro
*-----------------
You could save yourself some overhead by using:
MULTIPLY YYMMDD BY 100.0001 GIVING MMDDYY
and
MULTIPLY MMDDYY BY 10000.01 GIVING YYMMDD.
Those can be modified to include century for Y2K, also.
....Terry
P.S. Here in MN, we use shortcuts, Mike!
*-----------------
Of course, the receiving fields truncate the result! Try the arithmetic ... it really works!
Stephen J Spiro