! crs_reserve_sar.scp reb, 12-Oct-1990 Fri 10:49 ! Purpose: to show available rooms for a specific date & times .label get_date get #screen_title="Enter DATE desired: " form valid_date .if oa$form_terminator = 112 then .goto cancelled date_convert #dt,#reg_date,7 get #from_date=#reg_date .label get_beg_time get #screen_title="Enter BEGINNING TIME desired: " get #reenter="N" form valid_time .if oa$form_terminator = 112 then .goto cancelled .if #reenter eqs "Y" then .goto get_beg_time get #from_time=#reg_time get #from = #dt:8 #reg_time .label get_end_time get #screen_title="Enter ENDING TIME desired: " get #reenter="N" form valid_time .if oa$form_terminator = 112 then .goto cancelled .if #reenter eqs "Y" then .goto get_end_time get #to_time=#reg_time get #to = #dt:8 #reg_time .label check_span .if #to gts #from then .goto process display - Ending time earlier than beginning time! Please re-enter! .goto get_beg_time .label process get oa$display="Checking available rooms . . . "\force delete crs_reserve_sar_lis.wpl delete crs_reserve_sar.tmp get oa$dcl='$ open/write outfile crs_reserve_sar.tmp' for crs_rooms with .type eqs "CR" do - get #in_use="N"\\- get #room=.room\\- for crs_reserve with .crs_key:30:30 beginning #room and - .crs_key:8 beginning #from:8 do - .if .crs_key:13:15 ges #from and - .crs_key:13 les #to then get #in_use="Y"\\- .if #in_use nes "Y" then - get oa$dcl='write outfile "' #room '"' get oa$dcl='$ close outfile' merge oa$lib:crs_reserve_sar.wpl,crs_reserve_sar_lis.wpl list crs_reserve_sar_lis.wpl close_prior prompt "Do you want to print this list [Y/N] ? " oa$fld_stay .if oa$prompt_text:1 nes "Y" then .goto cleanup get #print_file="crs_reserve_sar_lis.wpl" get #print_format="WPSPLUS" do wpprint .label cleanup delete crs_reserve_sar.tmp delete crs_reserve_sar_lis.wpl .goto exit_procedure .label cancelled oa$msg_purge display Operation has been cancelled at the User's request. .goto exit_procedure .label exit_procedure .exit