ACCEPT FROM DATE & COBOL II
Quote:
>> We are doing a COBOL to COBOL II/Y2K conversion at the same time. I
>> can't beleive there is not a 4-digit year available from the system.
>> It is easy to code around, but if there is a feature of the ACCEPT FROM
>> statement I don't know of that returns a 4-digit year, it would make
>> things a little easier.
> Some time ago, I saw a reference to an IBM APAR number PN76666 which would
> provide a callable routine named IGZEDT4, which would return an 8-byte date
> in YYYYMMDD format. But the person who posted that said he couldn't get it
> to work.
> Would you be interested in a short ASM370 program to obtain YYYYMMDD and
> YYYYDDD dates from the system? It's 31-bit compatible but for batch only.
> There is also a trick you can do in CICS 3.3 and above using ASKTIME and
> FORMATTIME to obtain the 4-digit year from CICS.
The CALL to IGZETD4 from VS COBOL II works fine after APPLYing APAR
PN76666. The trouble I experienced at first was my own dang fault. The
program I coded to test the call to IGZEDT4 had IGZEDT4 in the PROGRAM-ID
so guess what -- a recursive call error. Ooops!
The syntax for IGZEDT4 is:
YYYYMMDD PIC 9(8).
CALL "IGZEDT4" USING YYYYMMDD.
--
"There was no respect for youth when I was young, and now that I am old,
there is no respect for age -- I missed it coming and going."
J.B. Priestley