[Stackoverflow] [Progress OpenEdge ABL] Looping Methods needed here

Status
Not open for further replies.
T

Thiru

Guest
Hell, I have written a query with the help of one experienced person from progress 4GL but i missed one concept to ask.I have shared the query.Here what i need is to calculate the total orders based on start and end hour for every shift sequence (Total 21 seq) and assign to variable.For example look below

DEFINE VARIABLE StartHour06 AS INTEGER NO-UNDO.
DEFINE VARIABLE StartHour07 AS INTEGER NO-UNDO

FIND FIRST gdmf_shift WHERE gdmf_shift.shft_sequence = 1 NO-LOCK NO-ERROR.
StartHour06 = gdmf_shift.shft_start_hour.
StopHour07 = gdmf_shift.shft_stop_hour.


Like this i need to write the query up to 21 shift sequence..actually its not a good code..i need to make it simple and tried one method but from that i don't know how to do assign to variables.Please look below what i tried

DEFINE VARIABLE sSeq AS INTEGER EXTENT 21 NO-UNDO. /* start hour */
DEFINE VARIABLE eSeq AS INTEGER EXTENT 21 NO-UNDO. /* end hour */
FOR EACH gdmf_shift WHERE gdmf_shift.shft_sequence LE 21 NO-LOCK BY gdmf_shift.shft_sequence:
sSeq[1] = gdmf_shift.shft_start_hour.
eSeq[21] = gdmf_shift.shft_stop_hour.
DISP sSeq[1] eSeq[21].


END.

Continue reading...
 
Status
Not open for further replies.
Top