/* itemvalue.aml /* /* extracts the value of an item from an INFO file by record number and /* loads it to an AML variable. /* /* Author: Douglas D. Nebert 5/1/90 Original coding. &args infile itemname recnum amlvar &if [null %infile%] &then &return &warning Usage: ITEMVALUE ~ &if ^ [exists %infile% -info] &then &return &warning INFO file %infile% ~ not found... &if ^ [iteminfo %infile% -info %itemname% -exists] &then &return &warning ~ Item %itemname% not found... &if [exists varfile.txt -file] &then &s delerr [delete varfile.txt -file] &s home = [dir [pathname *]] &data arc info SEL %INFILE% RES BY $RECNO = %RECNUM% OUTPUT %home%varfile.txt PRINT %itemname% Q STOP &end &s fileunit [open varfile.txt stat -r] &s amlvar = [read %fileunit% err] &s err [close %fileunit%] /*&s delerr [delete varfile.txt -file]