00001  IDENTIFICATION DIVISION.                                         08/06/98
00002  PROGRAM-ID.             DTSCU014                                 DTSCU014
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV004
00004  DATE-WRITTEN            DECEMBER 1991.                           DTSCU014
00005  DATE-COMPILED.                                                   DTSCU014
00006      SKIP3                                                        DTSCU014
00007 *****                                                             DTSCU014
00008 *                                                                 DTSCU014
00009 *    FUNCTION:   EDIT AND FORMAT AUDIT HOURS FROM SCREEN          DTSCU014
00010 *                                                                 DTSCU014
00011 *                                                                 DTSCU014
00012 *    MODIFICATION LOG:                                            DTSCU014
00013 *                                                                 DTSCU014
00014 *    08/03/98    INITIAL DEVELOPMENT.  MODIFIED FROM MACCU013        CL**2
00015 *                AND TXCU014.                                     DTSCU014
00016 *                WORK ORDER:                 PROGRAMMER: ZL1         CL**2
00017 *                                                                 DTSCU014
00018 *    XX/XX/XX    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     DTSCU014
00019 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     DTSCU014
00020 *                WORK ORDER:                 PROGRAMMER:          DTSCU014
00021 *                                                                 DTSCU014
00022 *    DESCRIPTION:                                                 DTSCU014
00023 *                                                                 DTSCU014
00024 *        EDIT AND FORMAT L014-S-CNT, PLACING FORMATTED            DTSCU014
00025 *        VALUE IN L014-CNT                                        DTSCU014
00026 *                                                                 DTSCU014
00027 *        NEGATIVE VALUES ARE ALLOWED                              DTSCU014
00028 *                                                                 DTSCU014
00029 *        DECIMAL POINT REQUIRED IF NEEDED (NOT ASSUMED)           DTSCU014
00030 *                                                                 DTSCU014
00031 *****                                                             DTSCU014
00032  SKIP3                                                            DTSCU014
00033  ENVIRONMENT DIVISION.                                            DTSCU014
00034  DATA DIVISION.                                                   DTSCU014
00035  SKIP3                                                            DTSCU014
00036  WORKING-STORAGE SECTION.                                         DTSCU014
000365 77  PAN-VALET PICTURE X(24) VALUE '004DTSCU014  08/06/98'.       DTSCU014
00037  01  WRK-AREA.                                                    DTSCU014
00038      05  TO-RIGHT-CNT                        PIC S9(04)    COMP.  DTSCU014
00039      05  DECIMAL-FOUND-IND                   PIC  X(01).          DTSCU014
00040      05  VALID-NUMBER-IND                    PIC  X(01).          DTSCU014
00041      05  NEGATIVE-FOUND-IND                  PIC  X(01).          DTSCU014
00042      05  WS-SUB                              PIC S9(04)    COMP.  DTSCU014
00043      05  IN-SUB                              PIC S9(04)    COMP.  DTSCU014
00044      05  WS-AREA                             PIC  9(07).          DTSCU014
00045  LINKAGE SECTION.                                                 DTSCU014
00046  01  DFHCOMMAREA.                                                 DTSCU014
00047  ++INCLUDE DTSIL014                                                  CL**3
00048  PROCEDURE DIVISION.                                              DTSCU014
00049      INSPECT L014-S-CNT CONVERTING LOW-VALUE TO SPACE.            DTSCU014
00050      SKIP2                                                        DTSCU014
00051      IF L014-S-CNT = SPACES                                       DTSCU014
00052          SET L014-NO-ENTRY TO TRUE                                   CL**2
00053          MOVE ZERO  TO L014-CNT                                      CL**2
00054          GO TO INIT0199-GO-BACK.                                  DTSCU014
00055                                                                      CL**2
00056      SET L014-VALID TO TRUE.                                         CL**2
00057      MOVE +0  TO L014-CNT.                                           CL**2
00058      MOVE +0  TO TO-RIGHT-CNT.                                       CL**2
00059      MOVE 0   TO WS-AREA.                                            CL**2
00060      MOVE 'N' TO VALID-NUMBER-IND.                                DTSCU014
00061      MOVE 'N' TO NEGATIVE-FOUND-IND.                              DTSCU014
00062      MOVE 'N' TO DECIMAL-FOUND-IND.                               DTSCU014
00063      MOVE +8  TO WS-SUB.                                             CL**2
00064      PERFORM P1000-LOOP THRU P1000-LOOP-EXIT                         CL**2
00065        VARYING IN-SUB FROM 7 BY -1                                DTSCU014
00066        UNTIL IN-SUB < 1.                                          DTSCU014
00067                                                                      CL**2
00068      IF L014-NOT-VALID                                            DTSCU014
00069          GO TO INIT0199-GO-BACK.                                  DTSCU014
00070                                                                      CL**2
00071      IF DECIMAL-FOUND-IND = 'N' OR                                   CL**2
00072              TO-RIGHT-CNT = +0                                       CL**2
00073          MOVE WS-AREA TO L014-CNT                                 DTSCU014
00074      ELSE                                                         DTSCU014
00075      IF TO-RIGHT-CNT = +1                                         DTSCU014
00076         COMPUTE L014-CNT = WS-AREA / 10                              CL**2
00077      ELSE                                                         DTSCU014
00078         SET L014-NOT-NUMERIC TO TRUE                                 CL**2
00079         SET L014-NOT-VALID   TO TRUE.                                CL**2
00080                                                                      CL**2
00081      IF (L014-MIN-CNT NOT < +0) AND                                  CL**2
00082         (L014-CNT < +0)                                           DTSCU014
00083          SET L014-INVALID-NEGATIVE TO TRUE                           CL**2
00084          SET L014-NOT-VALID        TO TRUE                           CL**2
00085          GO TO INIT0199-GO-BACK.                                  DTSCU014
00086                                                                      CL**2
00087      IF (L014-CNT < L014-MIN-CNT) OR                                 CL**2
00088         (L014-CNT > L014-MAX-CNT)                                 DTSCU014
00089          SET L014-EXCEEDS-MIN-MAX  TO TRUE                           CL**2
00090          SET L014-NOT-VALID        TO TRUE.                          CL**2
00091  INIT0199-GO-BACK.                                                DTSCU014
00092      EXEC CICS                                                    DTSCU014
00093          RETURN                                                   DTSCU014
00094      END-EXEC.                                                    DTSCU014
00095      GOBACK.                                                      DTSCU014
00096  P1000-LOOP.                                                      DTSCU014
00097      IF L014-S-CNT (IN-SUB : 1)  = SPACE OR                          CL**2
00098         L014-S-CNT (IN-SUB : 1)  = LOW-VALUE OR                      CL**2
00099         L014-S-CNT (IN-SUB : 1)  = ','                               CL**2
00100         GO TO P1000-LOOP-EXIT.                                       CL**2
00101                                                                      CL**2
00102      IF L014-S-CNT (IN-SUB : 1) = '.'                             DTSCU014
00103          IF DECIMAL-FOUND-IND   = 'Y'                                CL**2
00104             SET L014-NOT-NUMERIC TO TRUE                             CL**2
00105             SET L014-NOT-VALID   TO TRUE                             CL**2
00106             GO TO P1000-LOOP-EXIT                                    CL**2
00107          ELSE                                                     DTSCU014
00108             MOVE 'Y' TO DECIMAL-FOUND-IND                            CL**2
00109             GO TO P1000-LOOP-EXIT.                                   CL**2
00110                                                                      CL**2
00111      IF L014-S-CNT (IN-SUB : 1) = '-'                             DTSCU014
00112         IF NEGATIVE-FOUND-IND   = 'Y'                                CL**2
00113             SET L014-NOT-NUMERIC TO TRUE                             CL**2
00114             SET L014-NOT-VALID   TO TRUE                             CL**2
00115             GO TO P1000-LOOP-EXIT                                    CL**2
00116          ELSE                                                     DTSCU014
00117             MOVE 'Y' TO NEGATIVE-FOUND-IND                           CL**2
00118             GO TO P1000-LOOP-EXIT.                                   CL**2
00119                                                                      CL**2
00120      IF L014-S-CNT (IN-SUB : 1) NUMERIC                           DTSCU014
00121         SUBTRACT 1 FROM WS-SUB                                       CL**2
00122         MOVE L014-S-CNT (IN-SUB : 1) TO WS-AREA (WS-SUB : 1)         CL**2
00123         MOVE 'Y' TO VALID-NUMBER-IND                                 CL**2
00124        IF DECIMAL-FOUND-IND = 'N'                                    CL**2
00125           ADD +1 TO TO-RIGHT-CNT                                     CL**2
00126        ELSE                                                          CL**2
00127           NEXT SENTENCE                                              CL**2
00128      ELSE                                                         DTSCU014
00129         SET L014-NOT-NUMERIC TO TRUE                                 CL**2
00130         SET L014-NOT-VALID   TO TRUE.                                CL**2
00131  P1000-LOOP-EXIT.                                                    CL**4
00132      EXIT.                                                        DTSCU014
