My Date Utility Programs

This library is a combined collection of code from various sources that I have just merged into usefull programs in the attempt to get any date information I need easily.

I had a lot of programs doing their own date routines, some needing julian dates, some gregorian; and finally I needed to know what day of the week a date was... (wikipedia has some examples of how to work that out) and I decided I was not replicating that between programs; so have merged everything into one library that returns everything about a date that I could use; and I am changing all my programs to use this library instead of doing it themselves.

This is not a macro library, its primary purpose is to provide/assemble useful programs to go into your linklist (or steplib) libraries and only two macros are actually needed in your assembler programs, one to create the data layout or dsect, the other used as an interface that based upon what parameters are passed to the macro will determine the correct program to link to to obtain the desired results.
These utility programs are designed to be called from other assembler programs, not to be run directly.

Note: this copy may not be in sync with the github version as while enhancements and bugfixes are applied to my git directories first whether I 'push' to github or copy the file here first depends upon what I am doing (ie: I may be doing a lot of changes in the massive git collection and if I need to do a tiny change to this library as part of that I may copy this file across to my webserver weeks before I am ready to push lots of changes to github; or I may push to github and forget to update this file on my webserver).

General Use

It is designed to be simple to use. All the key programs are easily accessable via a simple macro call to UDATEMAC to request the function to be preformed, the macro will determine what program is to be called based on the request. The only other thing you need is a data are (dsect or inline) mapped by UDATEVAR to address the returned valued by field name.

Functions available

The programs used by UDATEMAC provided in this library will return text displayable values describing a date and time for the following request types

There are macros that may be used inline where calling a program may be overkill to

All the UDATEnnn programs currently in this library will all always return the following date information as character fields in a mapped DSECT for easy reference (see the UDATEVAR macro used to map the data area).

The SCHEDnnn programs may require a different data area format, however the UDATEMAC will only (currently) invoke those if the CALCARD function is requested. Those SCHEDnnn programs were specifically created as utility programs for my job/command scheduler.
Current status is SCHED001 returns data in the expected structure, input format is not using that structure. SCHED002 is not yet compatible.
TODO: decide if I want the SCHEDnnn programs fully compatible requiring scheduler changes, or as they were created for the scheduler leave them as is with a leave alone warning. As SCHED002 returns a binary timestamp in Hsecs (so the scheduler knows what to put in a timer) rather than a data structure it will never really be compatible but the common macro could be updated to handle that.

The supplied dataset member TESTALL shows how to request each of the available standard UDATEnnn functions using the supplied macros. Additional test jobs are provided for macro-only and scheduler module testing; I may merge them into testall later.

Additional non-core Functionality added for scheduling

Obviously if there is a date library, the best way to show that it is usable is by writing a scheduler; stable eneough that it is the job scheduler I now use on my system :-).

Download Location

If interested download the current datetime library. The JCL will create two files, the main program library which is the JCL and ASM source to assemble the programs, and a TEST library containing jobs to test the programs are working plus a few possibly useful example programs.
The member $DOC explains usage.

This utility library will grow over time as I find more functions I need, for example I may one day handle 'TIME BIN' format, and maybe even take a passed text date and return STCK or TIME values; but I don't need them yet :-).

So keep an eye on this page.