Hi,
Currently we are using below code to send a report to the user on THURSDAY but now our requirement is to send the report on FRIDAY.Could you please let me know how we can acheive this by using below code :-
IF #KL6015P0-IN-MSG-TYPE = 535
MOVE EDITED #CAL-IN-DATE (EM=WW) TO #WEEK-NO1-A
MOVE EDITED #CAL-OUT-NEXT-WORKING-DAY (EM=WW) TO #WEEK-NO2-A
MOVE EDITED #CAL-IN-DATE (EM=O) TO #DAY-IN-WEEK1-A
MOVE EDITED #CAL-OUT-NEXT-WORKING-DAY (EM=O) TO #DAY-IN-WEEK2-A
* --- TODAY & NEXT DAY IN THE SAME WEEK AND NEXT DAY IS FRIDAY
IF ( #WEEK-NO1 = #WEEK-NO2 AND #DAY-IN-WEEK2 = 5 )
* --- NEXT DAY IN FUTURE WEEK & TODAY IS NOT FRIDAY
* ==> LAST WORKING DAY IF FRIDAY IS A HOLIDAY
IF ( #WEEK-NO1 = #WEEK-NO2 AND #DAY-IN-WEEK2 = 5 )
OR ( #WEEK-NO2 > #WEEK-NO1 AND #DAY-IN-WEEK1 NE 5 )
OR ( #WEEK-NO2 NE #WEEK-NO1 AND #DAY-IN-WEEK1 NE 5 )
END-IF
#KL6015P0-OUT-SWIFT-REQUIRED := TRUE
ELSE
#KL6015P0-OUT-SWIFT-REQUIRED := FALSE
END-IF
Note :- If it is a holiday on a THRUSDAY then it sends the on the current business day