PROC qcm$display_sfid, dissfid(
sfid:integer = $required
output,o=$output
continue, c:boolean = false
display_option, do:key brief, b, full, f = full
status)




IF $file($value(output) open_position)='$BOI' THEN
  output_file=$string($value(output))//'.$asis'
  ELSE
  output_file=$string($value(output))
IFEND

fid_index=$integer($value(sfid)/10000(16))
fid_file_residence=$integer($value(sfid)-(fid_index*10000(16)))/100(16)
fid_file_hash=$integer($mod($value(sfid),100(16)))

IF fid_file_residence<>01 THEN
  pftr=$symbol_address(dmv$job_file_table_root)
ELSE
  pftr=$symbol_address(dmv$system_file_table_root)
IFEND

dmt$fdt_pointer_size=$mem(pftr+14,4)
first_fte=$mem(pftr)
fde_size=$memory(first_fte+2c(16) 4)
fde_entry_size=$memory(first_fte+34(16) 4)
entries_per_chunk=fde_size/fde_entry_size
pftr_entry_offset=26(16)
p_chunk_residence=$mem((fid_index/entries_per_chunk)*dmt$fdt_pointer_size+first_fte+pftr_entry_offset)
offset_within_chunk=(($MOD(fid_index,entries_per_chunk))*fde_entry_size)
current_fde_entry=(p_chunk_residence+offset_within_chunk)
create_variable name=file_types kind=string dimension=0..6
file_types(0)='dmc$permanent file'
file_types(1)='dmc$device file'
file_types(2)='dmc$temp named file'
file_types(3)='dmc$temp unnamed file'
file_types(4)='dmc$catalog'
file_types(5)='dmc$temp global'
file_types(6)='dmc$server file'
file_type_offset=3f(16)
create_variable name=queue_statuses kind=string dimension=0..2
queue_statuses(0)='dmc$global_shared'
queue_statuses(1)='dmc$job_shared'
queue_statuses(2)='dmc$job_working_set'
queue_status_offset=5a(16)
create_variable name=monitor_flags kind=string dimension=0..3
monitor_flags(0)='dmc$no monitor flag'
monitor_flags(1)='dmc$assign file'
monitor_flags(2)='dmc$build subfile FAT'
monitor_flags(3)='dmc$allocate more space'
create_variable name=monitor_flag_offset      kind=integer value=50(16)
create_variable name=modified_offset          kind=integer value=34(16)
create_variable name=attached_in_write_offset kind=integer value=55(16)
create_variable name=purged_offset            kind=integer value=59(16)
create_variable name=global_name_offset       kind=integer value=19(16)
create_variable name=asid_offset              kind=integer value=24(16)
create_variable name=available_offset         kind=integer value=26(16)
create_variable name=clear_space_offset       kind=integer value=27(16)
create_variable name=eof_byte_address_offset  kind=integer value=28(16)
create_variable name=eoi_byte_address_offset  kind=integer value=2e(16)
create_variable name=file_limit_offset        kind=integer value=35(16)
create_variable name=file_lock_offset         kind=integer value=3b(16)
create_variable name=preset_value_offset      kind=integer value=40(16)
create_variable name=p_file_medium_des_offset kind=integer value=48(16)
create_variable name=usage_count_offset       kind=integer value=51(16)
create_variable name=read_write_count_offset  kind=integer value=53(16)
create_variable name=delete_count_offset      kind=integer value=56(16)
create_variable name=file_hash_thread_offset  kind=integer value=5b(16)
create_variable name=file_entry_index_offset  kind=integer value=61(16)
create_variable name=time_stamp_offset        kind=integer value=63(16)

IF $strrep($value(output))='$OUTPUT' THEN
  put_line '1FILE DESCRIPTOR ENTRY   SFID = '//$strrep($value(sfid),16)//' (16)' o=$fname(output_file)
IFEND

IF ($strrep($value(display_option))='BRIEF') = ($strrep($value(display_option))='B') THEN
  display_memory current_fde_entry b=fde_entry_size title='                  SFID='//$strrep($value(sfid),16)..
  o=$fname(output_file)
IFEND


put_line '   ' o=$fname(output_file)
put_line ' file type = '//file_types($memory(current_fde_entry+file_type_offset,1)) o=$fname(output_file)
put_line ' queue status = '//queue_statuses($memory(current_fde_entry+queue_status_offset,1)) o=$fname(output_file)
put_line ' monitor flag = '//monitor_flags($memory(current_fde_entry+monitor_flag_offset,1)) o=$fname(output_file)
available_integer=$memory(current_fde_entry+available_offset,1)
available=(available_integer=$integer(true))
put_line ' available = '//$strrep(available) o=$fname(output_file)
modified_integer=$memory(current_fde_entry+modified_offset,1)
modified=(modified_integer=$integer(true))
put_line ' file_modified = '//$strrep(modified) o=$fname(output_file)
attached_in_write_integer=$memory(current_fde_entry+attached_in_write_offset,1)
attached_in_write=(attached_in_write_integer=$integer(true))
put_line ' attached_in_write = '//$strrep(attached_in_write) o=$fname(output_file)
purged_integer=$memory(current_fde_entry+purged_offset,1)
purged=(purged_integer=$integer(true))
put_line ' purged = '//$strrep(purged) o=$fname(output_file)
clear_space_integer=$memory(current_fde_entry+clear_space_offset,1)
clear_space=(clear_space_integer=$integer(true))
put_line ' clear_space = '//$strrep(clear_space) o=$fname(output_file)
display_binary_unique_name pva=current_fde_entry+global_name_offset o=$value(output) cs=' global_file_name = '
put_line ' asid = '//$strrep($memory(current_fde_entry+asid_offset,2),16)//' (16)'    o=$fname(output_file)
put_line ' eof byte address= '//$strrep($memory(current_fde_entry+eof_byte_address_offset,6),16)//' (16)' o=$fname(output_file)
put_line ' eoi byte address = '//$strrep($memory(current_fde_entry+eoi_byte_address_offset,6),16)//' (16)' o=$fname(output_file)
put_line ' file limit = '//$strrep($memory(current_fde_entry+file_limit_offset,6),16)//' (16)' o=$fname(output_file)
put_line ' preset value = '//$strrep($memory(current_fde_entry+preset_value_offset,8),16)//' (16)' o=$fname(output_file)
put_line ' file medium descriptor offset = '//$strrep($memory(current_fde_entry+p_file_medium_des_offset,8),16)//' (16)'..
 o=$fname(output_file)

IF $value(continue)=true THEN
  create_variable name=pass_parameter kind=integer scope=xref
  IF fid_file_residence=1 THEN
    pass_parameter=$memory(current_fde_entry+p_file_medium_des_offset,8)+100000000(16)
  ELSE
    pass_parameter=$memory(current_fde_entry+p_file_medium_des_offset,8)+300000000(16)
  IFEND
IFEND

put_line ' usage count = '//$strrep($memory(current_fde_entry+usage_count_offset,2),16)//' (16)'  o=$fname(output_file)
put_line ' read write count = '//$strrep($memory(current_fde_entry+read_write_count_offset,2),16)//' (16)' o=$fname(output_file)
put_line ' delete count = '//$strrep($memory(current_fde_entry+delete_count_offset,3),16)//' (16)' o=$fname(output_file)
put_line ' file hash thread = '//$strrep($memory(current_fde_entry+file_hash_thread_offset,6),16)//' (16)' o=$fname(output_file)
put_line ' file entry index = '//$strrep($memory(current_fde_entry+file_entry_index_offset,2),16)//' (16)' o=$fname(output_file)
put_line ' time stamp = '//$strrep($memory(current_fde_entry+time_stamp_offset,5),16)//' (16)' o=$fname(output_file)

dl_asid=$memory(current_fde_entry+asid_offset,2)

PROCEND qcm$display_sfid
