× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Ideas on cutting run time
  • From: John Hall <jhall@xxxxxxxxxxx>
  • Date: Fri, 24 Jul 1998 15:38:47 -0400
  • Organization: Home Sales Co.

Allen, Mark wrote:
> 
> We have a program that runs each night that is the majority of our
> nightly processing time.  This job ran for about an 70 minutes last
> night.  There are no users or other batch jobs on the system while this
> job is running.
> 
> Any ideas on making this run faster:  Last night MU7TRANS had 410,663
> records for that 70 minute run.  The L1 fields are the key to the file
> and the select criteria is used so only records we want are in the file
> (all need processed).
> 
>      FMU7TRANSUP  E           K        DISK                      A
>      FMUTTRNSVO   E                    DISK                      A
> SAM01****FQSYSPRT O   F     132     OF     PRINTER
>       *
>      IRLPTRANS
>      I                                              CMPYTCL1
>      I                                              TCODTCL1
>      I                                              FACLTCL1
>      I                                              TOYNTCL1
>      I                                              PARTTCL1
>      I                                              PATYTCL1
>      I                                              PAPTTCL1
>      I                                              TDATTCL1
>      I                                              SHIFTCL1
>      I                                              WIP1TCL1
>      I                                              WIP2TCL1
>      I                                              RCDCTCL1
> HL   I                                              FRTOTCL1
>       *
>      C           *ENTRY    PLIST
>      C                     PARM           CMPYDS  4
>       *
>      C*****************************************************************
>       *

Move this to the *INZSR subroutine - that will save you 410,000 tests
(not much but everything helps)

> SAM01C**         *IN20     IFEQ *OFF
>      C**                   TIME           UTIME   60
>      C**                   EXCPTHEAD
>      C**                   SETON                     20
> SAM01C**                   END
>       *
>       * ZERO WORK FIELDS
>       *
>      C           *INL1     IFEQ *ON
>      C                     Z-ADD0         TOTQTY 112
>      C                     Z-ADD0         PATQTY 112
>      C                     Z-ADD0         CNT1    50
>      C                     SETOF                     22
>      C                     END
>       *
>       * BYPASS SUMMARY TRANSACTIONS ALREADY WRITTEN
>       *
> SAM01C                     MOVELDOC#TC    WORKCK  2
Can you eliminate the 'SM' fields or otherwise restrict the records you
are processing with an OPNQRYF ?

> SAM01C           WORKCK    CABEQ'SM'      ENDDET
>       *
> SAM02 *
> SAM02 * DO NOT SUMMARIZE NEGATIVE QTYS
> SAM02 *

> SAM02C           TQTYTC    CABLT0         ENDDET
>       * SUMMARIZE TRANSACTIONS
>       *
>      C                     SETON                       22
>       C                     ADD  TQTYTC    TOTQTY 112
>       C                     ADD  COSATC    PATQTY 112
>       C                     ADD  1         CNT1
>  SAM01C** OF                EXCPTHEAD
>  SAM01C** OF                SETOF                     OF
>  SAM01C**                   EXCPTDTL1
>  SAM01C           CMPYTC    IFEQ 'MURY'
>  SAM01C                     MOVE 'MSAV'    CMPYTC
>  SAM01C                     ELSE
>  SAM01C           CMPYTC    IFEQ 'JSCC'
>  SAM01C                     MOVE 'JSAV'    CMPYTC
>  SAM01C                     ENDIF
>  SAM01C                     ENDIF
>       C                     MOVE 'P'       RP01TC
>       C                     WRITERLPTRNSV

Is it possible to set the file to delay the access path maintenance on
key (Dup keys must be allowed)

>       C                     DELETRLPTRANS
>        *
>       *
>       * END OF DETAIL CALCULATIONS
>       *
>      C           ENDDET    TAG
>       *
>      CL1 22                EXSR WTRSUM
> SAM01C**LR                   EXCPTTAIL
>       ****************************************************************
>       *                                                              *
>       * WTRSUM - WRITE SUMMARY TRANSACTION                           *
>       *                                                              *
>       ****************************************************************
>      C           WTRSUM    BEGSR
>       *
>      C                     MOVE CMPYDS    CMPYTC
>      C                     MOVE TDATTC    WORK02  2
>      C                     MOVEL'SM'      WORK07  7
>       C                     MOVE CNT1      WORK07
> 
>       C                     MOVELWORK07    DOC#TC
> 
>       C                     MOVE WORK02    DOC#TC
> 
>       C                     Z-ADDTOTQTY    TQTYTC
> 
>       C                     Z-ADDPATQTY    COSATC
> 
>       C                     MOVE *BLANKS   PGIDTC
> 
>       C                     MOVE *BLANKS   RP01TC
> 
>       C                     SETON                     60
> 
>  SAM01C** OF                EXCPTHEAD
> 
>  SAM01C** OF                SETOF                     OF
> 
>  SAM01C**                   EXCPTDTL1
> 
>  SAM01C**                   EXCPTDTL2
> 
>       C                     SETOF                     60
> 
>       C                     WRITERLPTRANS
> 
>        *
> 
>       C                     ENDSR
> 
>        *
> 
> Mark Allen
> MIS Manager
> Mattel-Murray
> allenma1@mattel.com
> 502 767 1377
> 

The real key to speeding this up is to minimize disk activity.  Maximize
record blocking (OVRDBF) and memory allocated to the subsystem that is
running this program.  Sometimes OPNQRYF can speed things up but it can
also slow things down so you have to experiment.  How long would it take
to simply copy this file on your system?  If copying the file is much
quicker (say 3-5 minutes) then it may pay to make the file sequential
only - process it - recreate the key.  if the keys on the file must be
updated with each delete this can really slow things down.  Also if
there are any logicals which refer to this file make sure those keys are
not being updated with each delete.


John L. Hall
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.