%begin
! PASSES A RECORD BY VALUE
%recordformat fm((%integer i %or %byte b1,b2,b3,b4))
%record(fm) a,b

%routine fred(%record(fm) x,%integer y, %record(fm) z)
   write(x_b1,1)
   write(x_b2,1)
   write(x_b3,1)
   write(x_b4,1)
   write(z_b1,1)
   write(z_b2,1)
   write(z_b3,1)
   write(z_b4,1)
%end

a_i=x'01020304'
b_i=x'05060708'
fred(a,9,b)
%endofprogram
