! crs_reserve_mso.scp reb, 14-Feb-1990 08:30 ! mso = multiple set owner .LABEL BEGIN_HERE .IF $CRS_PRV EQS "Y" THEN .GOTO PROMPT_ONE .GOTO NO_PRV .LABEL PROMPT_ONE GET #WHERE="P1" GET #INFOTYPE=- "Current Owner: " GET OA$DCL='$ SET MESS/NOF/NOI/NOS/NOT' FORM EXTDATA/PRE='GET EXTDATA=""' .IF OA$FORM_TERMINATOR = 112 THEN .GOTO CANCELLED GET #RESERVER = #EXTDATA ! GET #TRESERVER = PROFIL.USER[#RESERVER] ! .IF #TRESERVER EQS "" THEN .GOTO INVALID .GOTO PROMPT_TWO .LABEL PROMPT_TWO GET #WHERE="P2" ! preceeded by 'Enter '... GET #INFOTYPE=- "Intended New Owner of " #RESERVER "'s Reservations: " GET OA$DCL='$ SET MESS/NOF/NOI/NOS/NOT' FORM EXTDATA/PRE='GET EXTDATA=""' .IF OA$FORM_TERMINATOR = 112 THEN .GOTO CANCELLED GET #NEW_OWNER = #EXTDATA GET #TNEW_OWNER = PROFIL.USER[#NEW_OWNER] .IF #TNEW_OWNER EQS "" THEN .GOTO INVALID .IF #NEW_OWNER EQS #RESERVER THEN .GOTO DUPLICATE .GOTO INDEX .LABEL DUPLICATE PROMPT - "You entered '" #NEW_OWNER "' as FROM & TO Owners. Press RETURN. " .GOTO PROMPT_ONE .LABEL INVALID PROMPT - "'" #RESERVER "' is NOT a valid ALL-IN-1 username. Press RETURN." .IF #WHERE EQS "P1" THEN .GOTO PROMPT_ONE ELSE - .GOTO PROMPT_TWO .LABEL INDEX GET OA$DISPLAY=- "Checking reservations for '" #RESERVER "' . . . "\FORCE FORM AUTO SELECT FOR CRS_RESERVE WITH .RESERVER BEGINNING #RESERVER DO - SEL_STYLE .MEETING:25 " " .ROOM " " .BEG_DT " " .BEG_TIME - /STYLE=DISPLAY .IF OA$SRC_COUNT = 0 THEN .GOTO NOTHING_FOUND .LABEL PROMPT_THREE PROMPT "Set Owner from " #RESERVER " to " #NEW_OWNER "? [Y/N] " OA$FLD_STAY .IF OA$FORM_TERMINATOR = 112 THEN .GOTO CANCELLED .IF OA$PROMPT_TEXT:1 NES "Y" THEN .GOTO CANCELLED .LABEL PROCESS DISPLAY Setting ownerships... \FORCE FOR CRS_RESERVE WITH .RESERVER BEGINNING #RESERVER DO - WRITE CHANGE CRS_RESERVE CRS_KEY= .CRS_KEY, RESERVER= #NEW_OWNER OA$MSG_PURGE GET OA$DISPLAY=- "Ownerships changed from '" #RESERVER "' to '" #NEW_OWNER "'." .GOTO EXIT_PROCEDURE .LABEL ERROR OA$MSG_PURGE DISPLAY This procedure failed; please try again. .GOTO EXIT_PROCEDURE .LABEL NOTHING_FOUND OA$MSG_PURGE DISPLAY No records were found for this Owner. .GOTO EXIT_PROCEDURE .LABEL CANCELLED OA$MSG_PURGE DISPLAY Operation has been cancelled at the User's request. .GOTO EXIT_PROCEDURE .LABEL NO_PRV OA$MSG_PURGE DISPLAY You may not use the MSO option. .GOTO EXIT_PROCEDURE .LABEL EXIT_PROCEDURE GET OA$DCL='$ SET MESS/F/I/S/T' .EXIT