Problem:
We are running a host application and get a runtime error of 173 'program not found' looking for IGZEDT4. Is there a Mainframe Express equivalent?
Resolution:
This IBM Runtime module (from VS Cobol II but carried on in LE) can be emulated by using a PC version of the IGZEDT4 function. These programs illustrate such an implementation:
Identification Division.
Program-Id. GETY2K.
Author. Lorince Y2K? Because Centuries Happen!
Environment Division.
Data Division.
Working-Storage Section.
1 CurrentY2K-Date Pic 9(8).
Procedure Division.
P1.
Move Zero to CurrentY2K-Date
Call 'IGZEDT4' Using CurrentY2K-Date
Display 'Current Y2K Date = ' CurrentY2K-Date
Goback.
Identification Division.
Program-Id. IGZEDT4.
Environment Division.
Data Division.
Working-Storage Section.
* This program mimics the IBM Cobol Runtime module
* IGZEDT4 to return a formatted CCYYMMDD
1 DateReturned.
2 CCYY Pic 9(4).
2 MO Pic 9(2).
2 DD Pic 9(2).
2 HR Pic 9(2).
2 MM Pic 9(2).
2 SS Pic 9(2).
2 HH Pic 9(2).
2 GMToffset Pic X.
2 GMThr Pic 9(2).
2 GMTmm Pic 9(2).
Linkage Section.
1 DateInOut Pic 9(8).
Procedure Division Using DateInOut.
P1.
Move Function Current-Date to DateReturned
Move DateReturned (1:8) to DateInOut
Goback.
#MFDS
#EnterpriseDeveloper