
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) | 8 | 8 |
Julian date with slashes (YY/DDD) | 6 | 14 |
Current time with colons (HH:MM:SS) | 8 | 22 |
Day of the week (e.g., FRIDAY) | 9 | 31 |
Word date (e.g., JANUARY 8, 1985) | 18 | 49 |
Gregorian date without slashes (MMDDYY) | 6 | 55 |
Julian date without slashes(YYDDD) | 5 | 60 |
Current time without colons (HHMMSS) | 6 | 66 |
Day of week (e.g., SUNDAY=1...SATURDAY=7) | 1 | 67 |
Security user ID | 8 | 75 |
Security group code (Institution code-two bytes and six spaces) | 8 | 83 |
Security logon ID | 8 | 91 |
Associated printer ID (inactive) | 4 | 95 |
Filler | 1 | 96 |
Security user name | 40 | 136 |
Full year (YYYY) | 4 | 150 |
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 ......