Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
/******************************************************/
/* This program reads a name and address data file */
/* and displays the information on request. */
/******************************************************/
retrieve:
procedure options(main);
%include 'record.dcl';
%replace
true by '1'b,
false by '0'b;
declare
(sysprint, input) file,
filename character(14) varying,
(lower, upper) character(30) varying,
eofile bit(1);
open file(sysprint) print title('$con');
put list('Name and Address Retrieval, File Name: ');
get list(filename);
do while(true);
lower = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
upper = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
put skip(2) list('Type Lower, Upper Bounds: ');
get list(lower,upper);
if lower = 'EOF' then
stop;
open file(input) stream input environment(b(1024))
title(filename);
eofile = false;
do while (^eofile);
get file(input) list(name);
eofile = (name = 'EOF');
if ^eofile then
do;
get file(input)
list(addr,city,state,zip,phone);
if name >= lower & name <= upper then
do;
put page skip(3)list(name);
put skip list(addr);
put skip list(city,state);
put skip list(zip);
put skip list(phone);
end;
end;
end;
close file(input);
end;
end retrieve;