1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to increase the process performance by reducing following codes?

Discussão em 'StackOverflow' iniciado por fdantas, Dezembro 9, 2018.

  1. fdantas

    fdantas Administrator Moderador

    I have written a program using progress 4GL. The syntax is correct but don't know how to reduce the codes..We are the company working for seats and using progress 4gl..we have one table called shift maintenance which has shift time for every hours.Let explain with an example.

    DEFINE VARIABLE FistshiftStartHour AS INTEGER NO-UNDO.
    DEFINE VARIABLE FistShiftEnddHour AS INTEGER NO-UNDO.
    DEFINE VARIABLE SecshiftStartHour AS INTEGER NO-UNDO.
    DEFINE VARIABLE SecShiftEnddHour AS INTEGER NO-UNDO.

    FIND FIRST shift WHERE shift.shiftsequence = 1 NO-LOCK NO-ERROR.
    ASSIGN
    FistshiftStartHour = shift.starthour
    FistShiftEnddHour = shift.endhour.

    FIND FIRST shift WHERE shift.shiftsequence = 2 NO-LOCK NO-ERROR.
    ASSIGN
    SecshiftStartHour = shift.starthour
    SecShiftEnddHour = shift.endhour.


    Like this i need to write a query for every shift hours and assign to two variables for 21 shift sequence.Is there any chance for reducing so much queries?(Note-I must to assign start and end time to individual variables).

    Continue reading...

Compartilhe esta Página