program segstr (input,output); DATABASE PERS = FILENAME 'PERSONNEL'; type lines = varying [80] of char; var linecnt : integer; document : array [0..2] of lines; begin document[0] := 'first line of resume '; document[1] := 'second line of resume '; document[2] := 'last line of resume '; READY PERS; START_TRANSACTION READ_WRITE; STORE R IN RESUMES USING R.EMPLOYEE_ID:= '12345'; for linecnt := 0 to 2 do STORE SEG IN R.RESUME SEG := document[linecnt]; SEG.LENGTH := length(document[linecnt]); END_STORE; END_STORE; FOR R IN RESUMES WITH R.EMPLOYEE_ID = '12345' FOR SEG IN R.RESUME writeln (SEG); END_FOR; END_FOR; COMMIT; FINISH; end.