Subprogram NWUTINF: Dates and Times Utility

If you have any questions about the content of this page, please contact CICS Requests for  clarification

The need for this subprogram has diminished in the  last few releases of CICS. The ASKTIME, FORMATTIME and ASSIGN commands have made  all of these items available in native CICS fashion. One difference is the  little utilized "day of the week" number, IBM decided to use "0" for Sunday  through "6" for Saturday.
This utility will be maintained for the indefinite  future. That said, it is our recommendation that native commands be used instead  of this utility.

This program is used to retrieve a variety of data  items of possible use to application programs. The length of the commarea passed  to NWUTINF determines how much data is passed back. You must specify a commarea  at least long enough for the particular data item(s) of interest. The following  table illustrates the data items available. To get all items up (including one  of the table items), use the length in the COMMAREA Length column:

 Field
            Length
COMMAREA
            Length
Gregorian date with slashes (MM/DD/YY)88
Julian date with slashes (YY/DDD)614
Current time with colons (HH:MM:SS)822
Day of the week (e.g., FRIDAY)    931
Word date (e.g., JANUARY 8, 1985)1849
Gregorian date without slashes (MMDDYY)655
Julian date without slashes(YYDDD)560
Current time without colons (HHMMSS)666
Day of week (e.g., SUNDAY=1...SATURDAY=7)167
Security user ID875
Security group code
            (Institution code-two bytes and six spaces)
883
Security logon ID891
Associated printer ID (inactive)495
Filler 196
Security user name   40136
Full year (YYYY)4150

A COPY member is available to define the appropriate commarea layout:  NWUTINFD. The COBOL names returned are as follows:

01 NWUTINF-COMMAREA.

    05 NWUT-G-DATE                PIC X(08).
    05 NWUT-J-DATE              PIC X(06).
    05 NWUT-TIME                PIC X(08).
    05 NWUT-DAY                 PIC X(09).
    05 NWUT-WORD-DATE           PIC X(18).
    05 NWUT-G-DATE-N            PIC X(06).
    05 NWUT-J-DATE-N            PIC X(05).
    05 NWUT-TIME-N              PIC X(06).
    05 NWUT-DAY-N               PIC X(01).
    05 NWUT-UID                 PIC X(08).
    05 NWUT-GROUP.
        10 NWUT-INSTITUTION     PIC X(02).
        10 FILLER               PIC X(06).
    05 NWUT-LOGON-ID            PIC X(08).
    05 NWUT-APID                PIC X(04).
    05 FILLER                   PIC X(01).
    05 NWUT-FULL-NAME           PIC X(40).
    05 NWUT-FULL-YEAR           PIC X(04).

You code:
.
COPY NWUTINFD.
.
    EXEC CICS LINK PROGRAM('NWUTINF')
         COMMAREA(NWUTINF-COMMAREA)
         LENGTH(LENGTH OF NWUTINF-COMMAREA)
    END-EXEC.
    MOVE NWUT-UID    TO .....
    MOVE NWUT-G-DATE TO ......