If possible I would avoid macros unless there is no other way. As I understand you want to create a function with columnheaders as input parameters to calculate some values.
In gnuplot you can either give column numbers, e.g. using 1:2:3 or using (column(1)):(column(2)):(column(3)) or shorter using ($1):($2):($3) or variables which contain numbers, e.g. for a=1, b=2, c=3 then you can write using a:b:c.
Alternatively, you can use columnheaders using "length":"width":"height" or variables, e.g. L="length", W="width", H="height" and then write using L:W:H or using (column(L)):(column(W)):(column(H)).
So, probably you are looking for something like:
Script:
### functions with headercolumns as parameters
reset session
$Data <<EOD
length width height
11 12 13
21 22 23
31 32 33
EOD
volume(l,w,h) = column(l) * column(w) * column(h)
l = "length"
w = "width"
h = "height"
set table $Test
plot $Data u l:w:h:(volume(l,w,h)) w table
unset table
print $Test
### end of script
Result:
11 12 13 1716
21 22 23 10626
31 32 33 32736