Page 1 of 1

Function current-date

PostPosted: Mon Feb 13, 2012 8:16 pm
by JorenWillems
Hi all

I need to rewrite a PL/1 programme into a new COBOL program.

If you use in PL/1 the function 'DATE', what is the returned result?
Same question in cobol for the function current-date.

I need to rewrite substr(date,1,6) and substr(time,1,10) into cobol.

Thx

Re: Function current-date

PostPosted: Mon Feb 13, 2012 8:25 pm
by Akatsukami
DATE returns CHAR(6) in the format "YYMMDD". TIME returns CHAR(9) in the format "HHMMSS999". The COBOL CURRENT-DATE function returns "YYYYMMDDHHMISS99±HHMI (the last five characters being the offset of WULT from UTC).