cat > script.c <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
# include  <mscc.h>

int	msmain (argc, argv)
	int	argc;
	char	**argv;
{
	char	*name_value, *phone_value;

	mxopen (argv[1], "personnel", "r");	

	printf ("Phone Numbers of Employees in Local Area\n\n");
	printf (" Name     Phone\n\n");
	fflush (stdout);

	mxqmch ("match", "phone", "*961*");
	mxgetbegin ("personnel", CHARNIL);
	while (mxget ())
	{
		name_value = mxgetvs ("name");
		phone_value = mxgetvs ( "phone" );
		printf ("%-12s%-12s\n", name_value, phone_value);
		fflush (stdout);
	}
	mxgetend ();

	mxclose ("personnel");
	return 0;
}
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script.c
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Phone Numbers of Employees in Local Area

 Name     Phone

Scarlatti   9617363     
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Using "match", select all the records with the digits 961 in the phone #.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
