define data parameter using sxsmi-a object using sxsnat-o local 1 #filename (a) dynamic 1 #i(N1) end-define * * Added by pjf examine sxsmi-a.document for 'ZZZ' giving number in #i if #I >0 *ERROR-NR := 8001 compress '8001' sxsmi-a.document into sxsmi-a.document leaving no end-if * end PJF additions * Build a file name from object id and element id. callnat 'fname-n' sxsmi-a.object-id sxsmi-a.element-id #filename * * Open/create this file and write the document into it. define work file 3 #filename type "unformatted" write work file 3 variable sxsmi-a.document close work file 3 * on error stop end-error * end