It is always  a benefit to allow operator to enter part serial no. or sample no. at the beginning of a cmm program then write it to the result file (same serial no. can also be used as part of result file name). It\'s very easy to do in any DMIS package:

DECL/COMMON,CHAR,255,SN,FILEPATH,TXT
FILEPATH = ASSIGN/\'C:\\CMM\\PN99603B\\\'
SN=PROMPT/\'ENTER SERIAL NO.: \',55
TXT=ASSIGN/CONCAT(FILEPATH, \'LH_\', SN, \'.txt\')
DID(my_OUT)=DEVICE/STOR,TXT
OPEN/DID(my_OUT),FDATA,V(DEFAULTFORMAT),OUTPUT,OVERWR

$$***** your measurement output here *****

CLOSE/DID(my_OUT)