I developed a code to do the work - see ttached file.
The code generates a program in a directory as defined in first line - FILENAME statement.
Adapt the filename to your instalation.
To run the generated program add at end the line:
%include pgm;
For test I looped from FEB 2014 to FEB 2015;
Addapt required dates on lines: 4, 5, 13.
It can be done dynamicaly if you put the code into a macro:
%macro create(y_start, m_start, y_end, m_end);
/* copy the code here and change lines: */
/* line 4 */ y1 = &y_start;
/* line 5 */ m1 = &m_start;
/* line 13 */ do until(y1 = &y_end and m1 = &m_end);
%mend create;
%create (2014, 02, 2016, 09);
%include pgm;
... View more