MERGED.P is a demo program from the Kyan Pascal 2.x Utilities Disk 2.
Source Code
PROGRAM MERGE_DEMO;
(* THIS PROGRAM DEMONSTRATES
SYSTEM UTILITIES MERGE
ROUTINE.
COPYRIGHT (C) 1986
KYAN SOFTWARE, INC. *)
TYPE
#I SRTMERGT.I
VAR
#I SRTMERGV.I
CH:CHAR;
#I MERGE.I
BEGIN
WRITELN('*** MERGE ROUTINE DEMO ***');
WRITELN;
WRITELN('THE MERGE ROUTINE TAKES ORDERED FILES');
WRITELN('AND MERGES THEM INTO 1 LARGE FILE.');
WRITELN('ALTHOUGH IT IS PRIMARILY USED IN');
WRITELN('CONJUNCTION WITH ESORT, YOU CAN USE');
WRITELN('MERGE AS A STAND ALONE UTILITY...');
WRITELN;
WRITELN('IN ORDER TO USE THIS DEMO');
WRITELN('CORRECTLY, IT MUST BE ABLE');
WRITELN('TO FIND FILES "MERGE.12,"');
WRITELN('MERGE.32 AND "MERGE.22" IN THE');
WRITELN('CURRENT DIRECTORY.');
WRITE('IS IT OK TO PROCEED? (Y/N)');
READLN(CH);
IF CH='Y' THEN
BEGIN
WRITELN('MERGING.....');
MERGENAME[1]:=
'MERGE.12 ';
MERGENAME[2]:=
'MERGE.22 ';
MERGENAME[3]:=
'MERGE.32 ';
MERGENAME[6]:=
'DESTFILE ';
MERGENAME[7]:=
'FINALFIL.E ';
MERGE(MERGENAME,7,3,7,5,0,-1,ALPHA_FIELD);
WRITELN('USE "ED" TO SEE THE RESULTS IN');
WRITELN('FILE "FINALFIL.E".')
END
END.
No comments:
Post a Comment