% % accept time slot and confirm slot choice % % a slot number was requested % _Sms.Body trim any? { % % check for an x to end the scheduling attempt % dup 1 left upper "X" eq$ { % % the driver wishes to end the current scheduling attempt % pop "We will stop trying to schedule this Pickup number," &" send the Pickup number when you are ready to schedule it." "ReqRsv" *skednumb } { % % insure that slot can still be set for that day % length 1 gt { % % more than 1 digit, check if they sent in a time instead of slot % 0 !Sked.Ix *skedspan _Sked.Ix any? { % % valid time in schedule % } { % % not a valid time in schedule % 99 } ifelse } { 1 left dup numeric { % % number is good % } { upper 0x40 sub 9 add } ifelse } ifelse "skedokletr" log)( *skedopen { % % slot is confirmed, reserve it % "ReqRsv" *skednumb "Reserved" *skedslot _Sked.Slot *skedspan "That time slot is now reserved for you, " &_Sked.Name &", see you at " &_Sked.Stime &" sharp on " _Sked.Date " " left$ trim & &"." catcr &"You are registered with us, so for your next pickup," &" text your new Pickup number." } { % % list the slots that are open for the requested date % *skedlist isnull { % % no slots are available for that day % pop % % slot no longer available % empty !Sked.Slot "ReqDate" *skednumb "Sorry, that time slot was just now assigned for " &_Sked.Desired &", and no slots are available for it, please pick another day." &" Text us a six digit date (example 011423)." catcr &"Text the letter x to end scheduling of this Pickup number." } { % % slots are available % empty !Sked.Slot "ReqSched" *skednumb &"Text the number of the preferred time slot to reserve it." catcr &"Text the letter x to end scheduling of this Pickup number." } ifelse } ifelse } ifelse } { "We will stop trying to schedule this Pickup number," &" send the Pickup number when you are ready to schedule it." "ReqRsv" *skednumb } ifelse *skedxmit /* % % list the slots that are open for the requested date % *skedlist isnull { % % no slots are available for that day % pop empty !Sked.Slot "ReqDate" *skednumb "No slots are available for " &_Sked.Desired &", please pick another day." &" Text us a six digit date (example 011423)." } { % % slots are available % empty !Sked.Slot "ReqSched" *skednumb &"Text the number of the preferred time slot to reserve it." } ifelse */