CICS 12 - Very Useful Program Display Date & Time on Screen

IDENTIFICATION DIVISION.
PROGRAM-ID. PGM2.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TSTAMP PIC S9(15) COMP-3.
01 OUTDATE PIC X(10).
01 OUTTIME     PIC X(8).
          COPY MAPSETNM.
PROCEDURE DIVISION.
MAIN-P.
                   EXEC CICS
                             ASKTIME
                             ABSTIME(TSTAMP)
                   END-EXEC.
                   EXEC CICS
                             FORMATTIME
                             ABSTIME(TSTAMP)
                             DATESEP(‘/’)
                             YYYYMMDD(OUTDATE)
                   END-EXEC
                   EXEC CICS
                             FORMATTIME
                             ABSTIME(TSTAMP)
                             TIMESEP(‘:’)
                             TIME(OUTTIME)
                   END-EXEC
          MOVE OUTDATE TO DATE0.
          MOVE OUTTIME  TO TIMEO.
                   EXEC CICS
                             SEND MAP(‘MAPNAME’) MAPSET(‘MAPSET’) FREEKD ERASE
                   END-EXEC
          EXEC CICS
                   RETURN
          END-EXEC
          STOP RUN.
      


For more information click on Below Video

Previous
Next Post »