?? RIGHT := 110 ??
?? NEWTITLE := 'NOSVE device management' ??
MODULE dmm$access_avt_job_mode;
?? RIGHT := 110 ??
{
{ PURPOSE:
{      This module contains the procedures used to access active volume table entries in job mode.
{
{ DESIGN:
{      Contains procedures to obtain information from active volume table entries.
{

?? NEWTITLE := 'Global Declarations Referenced By This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc dmt$active_volume_table
*copyc dmt$active_volume_table_index
*copyc dmt$avt_logging_info
*copyc dmt$error_condition_codes
?? POP ??
*copyc dmp$lock_avt_entry
*copyc dmp$search_avt_by_rvsn
*copyc dmp$unlock_avt_entry
*copyc osp$append_status_parameter
*copyc osp$fatal_system_error
*copyc osp$set_status_abnormal
*copyc pmp$cycle
*copyc dmv$active_volume_table
?? OLDTITLE ??
?? NEWTITLE := '[xdcl, #gate] DMP$CHANGE_SET_NAME', EJECT ??

  PROCEDURE [XDCL, #GATE] dmp$change_set_name
    (    vsn: rmt$recorded_vsn;
         new_set_name: stt$set_name;
     VAR status: ost$status);

    VAR
      avt_index: dmt$active_volume_table_index,
      found: boolean;

    status.normal := TRUE;
    dmp$search_avt_by_rvsn (vsn, avt_index, found);
    IF not found THEN
      osp$set_status_abnormal (dmc$device_manager_ident, dme$avt_entry_not_found,
            'Unable to locate AVT entry - dmp$change_set_name.', status);
      osp$append_status_parameter (' ', vsn, status);
      RETURN; {----->
    IFEND;

    dmp$lock_avt_entry (avt_index);

    dmv$active_volume_table.table_p^ [avt_index].mass_storage.set_name := new_set_name;

    dmp$unlock_avt_entry (avt_index);

  PROCEND dmp$change_set_name;
?? OLDTITLE ??
?? NEWTITLE := '[xdcl, #gate] DMP$GET_AVT_LOGGING_INFO', EJECT ??
*copy dmh$get_avt_logging_info

  PROCEDURE [XDCL] dmp$get_avt_logging_info
    (    avt_index: dmt$active_volume_table_index;
     VAR info: dmt$avt_logging_info;
     VAR valid_entry: boolean);

    VAR
      avt_entry_p: ^dmt$ms_active_vol_table_entry;

    valid_entry := FALSE;

    IF (dmv$active_volume_table.table_p <> NIL)
{ } AND (avt_index >= LOWERBOUND (dmv$active_volume_table.table_p^))
{ } AND (avt_index <= UPPERBOUND (dmv$active_volume_table.table_p^))
{ } AND (NOT dmv$active_volume_table.table_p^ [avt_index].entry_available) THEN

      valid_entry := TRUE;
      avt_entry_p := ^dmv$active_volume_table.table_p^ [avt_index].mass_storage;
      info.recorded_vsn := avt_entry_p^.recorded_vsn;
      info.device_log_sfid := avt_entry_p^.p_device_log;
      info.dat_sfid := avt_entry_p^.p_device_allocation_table;
      info.dfl_sfid := avt_entry_p^.p_device_file_list_table;
      info.login_table_sfid := avt_entry_p^.p_login_table;
      info.mainframe_assigned := avt_entry_p^.mainframe_assigned;
      info.volume_unavailable := avt_entry_p^.volume_unavailable;
      info.log_entry_count := avt_entry_p^.device_log_entry_count;
      info.current_log_offset := avt_entry_p^.current_position_offset_in_log;
      info.allocated_log_size := avt_entry_p^.allocated_log_size;
      info.logging_process_damaged := avt_entry_p^.logging_process_damaged;
    IFEND;

  PROCEND dmp$get_avt_logging_info;
?? OLDTITLE ??
MODEND dmm$access_avt_job_mode;

