
  PROCEDURE [INLINE] fmi$put_label_in_lnt (
        checksum_present: boolean;
        p_file_label_header: ^fmt$static_label_header;
    VAR p_file_label: fmt$p_file_label;
    VAR cycle_description: ^fmt$cycle_description;
    VAR status: ost$status);

    VAR
      adjusted_size: integer,
      header: ^fmt$static_label_header,
      label_size: integer,
      p_static_label: ^SEQ ( * ),
      start_of_label: ^cell;

    IF checksum_present THEN
      label_size := #SIZE (p_file_label^) - p_file_label_header^.
            job_routing_label_size - #SIZE (integer);
      NEXT start_of_label IN p_file_label;
      { move the pointer in the p_file_label to the beginning of the job_label }
      adjusted_size := label_size - #SIZE (start_of_label^);
      NEXT p_static_label: [[REP adjusted_size OF cell]] IN p_file_label;
    ELSE
      label_size := #SIZE (p_file_label^) - p_file_label_header^.
            job_routing_label_size;
      start_of_label := p_file_label;
    IFEND;

    IF cycle_description^.system_file_label.static_label <> NIL THEN
      FREE cycle_description^.system_file_label.static_label IN
            osv$job_pageable_heap^;
    IFEND;

    ALLOCATE cycle_description^.system_file_label.static_label:
          [[REP label_size OF cell]] IN osv$job_pageable_heap^;
    IF cycle_description^.system_file_label.static_label = NIL THEN
      osp$set_status_abnormal (amc$access_method_id, ose$job_pageable_full,
            'JOB PAGEABLE FULL in fmp$attach', status);
    ELSE
      i#move (start_of_label, cycle_description^.system_file_label.
            static_label, label_size);
      RESET cycle_description^.system_file_label.static_label;
      NEXT header IN cycle_description^.system_file_label.static_label;
      header^.revision_level := fmc$current_revision_level;
    IFEND;
  PROCEND fmi$put_label_in_lnt;

?? PUSH (LISTEXT := ON) ??
*copyc fmt$cycle_description
*copyc fmt$file_label
*copyc fmt$static_label_header
*copyc ose$heap_full_exceptions
*copyc osp$set_status_abnormal
*copyc ost$status
*copyc osv$job_pageable_heap
?? POP ??

