-
Notifications
You must be signed in to change notification settings - Fork 0
/
irg.mem
2560 lines (1667 loc) · 76.5 KB
/
irg.mem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
THE SYSTEM 1022 INTERACTIVE REPORT GENERATOR
The System 1022 Interactive Report Generator is a utility which allows
the non-programmer to generate System 1022 reports. The report can be
as simple or as complicated as necessary for the user's needs, yet the
user does not have to contend with many of the minor details of
standard report design; the program does that for him.
The format of the program is interactive. The user responds to
questions asked by the program. Each question requires a simple,
direct answer, and questions are grouped together when they are
related. When the user has finished the input for one line, he must
type a carriage-return, <CR>.
The Interactive Report Generator is one of a series of utility
programs designed to supplement the Software House System 1022 Data
Base Management System. It is provided free to System 1022 users in
source language form for purposes of user maintenance and
modification.
Page 2
The first question is
INPUT FROM A LOG FILE? (Y/<CR>=N/FILENAME)
This establishes the source of input for the program. If the user
chooses to be asked questions and respond to them via the teletype,
i.e. interactively, he answers 'N' or merely <CR> to this question.
If, however, he wishes to run from an existing log file, he can either
input the log file name here, or answer 'Y' and then the log file name
in response to the next question.
A log file is a duplicate of the interaction that occurs between the
program and the user, and it is capable of being read in by the
program as the source of input. The user will never have to repeat an
interaction once finished - he can tell the program to run from this
log file. Or, if minor changes must be made, they can be made to the
log file instead of repeating the entire interactive sequence. Log
files are generated automatically while the program is running
interactively. They are called "NAME.DMR", where "NAME" is the file
name of the report control file being generated. When running from a
log file, any errors are fatal and halt execution. The program
announces this fact, plus the type and line number of the error in the
log file. This error must be corrected before the log file will run
completely and correctly through the program.
EXAMPLE:_______
INPUT FROM A LOG FILE? (Y/<CR>=N/FILENAME) <CR> ____
notifies the program that it is to go to interactive mode.
INPUT FROM A LOG FILE? (Y/<CR>=N/FILENAME) CROSS.DMR <CR> _________ ____
notifies the program that its input is to come from the file
"CROSS.DMR". since all log files generated automatically have the
extension ".DMR", the user can omit this with no loss in clarity.
Extensions other than ".DMR" must be specified.
Page 3
SPECIFY NAME OF REPORT CONTROL FILE:
The user types a file name, with a name not longer than six letters,
and optionally a period and an extension of not more than three
letters. The report control file created by the program will exist in
this file name. Since the program also creates a log file with this
name, the user is not permitted to input an extension of ".DMR" here -
this would result in the program attempting to place the report
control file and the log file into the same file.
EXAMPLE:_______
SPECIFY NAME OF REPORT CONTROL FILE: REPORT.DMC <CR> __________ ____
will cause the report control file to be created in the file
"REPORT.DMC", and a corresponding log file to be created in
"REPORT.DMR". If the extension is left off, the default will be .DMC.
Page 4
--- OUTPUT MEDIUM SPECIFICATIONS ---
The format of the output medium is determined at this time. Program
asks
SPECIFY NAME OF REPORT OUTPUT FILE:
POSSIBLE RESPONSES: TTY: or FILENAME or <CR> ____ ________ ____
1) "TTY:"
A) 'INIT 1 TTY:.' command placed in report control file.
B) pagelength set to 60, linewidth to 72, automatically.
C) program asks if these are suitable dimensions with
STANDARD PAGE SIZE CONVENTIONS? (<CR>=Y/N)
1) if user responds 'Y' or <CR>, go to 3.
2) if user responds 'N', program asks
PAGE LENGTH?
LINE WIDTH?
After inputting answers, go to 3.
2) <CR> or "FILENAME"
A) program asks
REPORT DESTINATION TTY, LPT, OR OTHER? (T/L/O)
1) 'T' - sets pagelength to 60, linewidth to 72,
and goes to 1.C above.
2) 'L' - sets pagelength to 60, linewidth to 132,
and goes to 1.C above.
3) 'O' - goes to ask questions in 1.C.2 above.
3) Continue on to next question asked by program.
EXAMPLE:________
SPECIFY NAME OF REPORT OUTPUT FILE: <CR> ____
REPORT DESTINATION TTY, LPT, OR OTHER? (T/L/O) O <CR> _ ____
PAGE LENGTH? 37 <CR> __ ____
LINE WIDTH? 66 <CR> __ ____
Page 5
This causes no 'INIT ...' command in the report control file, and sets
the linewidth to 66 and the pagelength to 37.
SPECIFY NAME OF REPORT OUTPUT FILE: GET.OUT <CR> _______ ____
REPORT DESTINATION TTY, LPT, OR OTHER? (T/L/O) L <CR> _ ____
STANDARD PAGE SIZE CONVENTIONS? (<CR>=Y/N) <CR> ____
This would cause the file GET.OUT to receive the report, with
pagelength 60 and linewidth 132, because it will go to the line
printer.
SPECIFY NAME OF REPORT OUTPUT FILE: TTY: <CR> ____ ____
STANDARD PAGE SIZE CONVENTIONS? (<CR>=Y/N) N <CR> _ ____
PAGE LENGTH? 75 <CR> __ ____
LINE WIDTH? 80 <CR> __ ____
This would cause the command 'INIT 1 TTY:.' in the report control
file, and the pagelength to be 75, the linewidth 80.
Page 6
WHAT IS THE NAME OF THE DATABASE?
Here the user inputs the name of the data base that he wishes the
report control file to open and operate on. This file name is placed
in the "OPEN ..." command in the report control file. Answering this
question with a <CR> will cause no 'OPEN ...' command in the report
control file.
EXAMPLE:_______
WHAT IS THE NAME OF THE DATABASE? SYS:DB1.DMS[101,23] <CR> ___________________ ____
will open the file "SYS:DB1.DMS[101,23]" for the report control file.
WHAT IS THE NAME OF THE DATABASE? <CR> ____
will cause no 'OPEN ...' command in the report control file.
Page 7
WANT TO 'FIND' ANYTHING? (Y/<CR>=N/STRING)
If the user desires a "FIND ..." command in the report control file,
he should either input the find string now, or type 'Y' and input the
string in response to the following question. If he does not want a
"FIND ..." command in the report control file, he should respond with
a 'N' or <CR>. if no "FIND ..." command is included, the report
control file will run on any group of records selected at that time.
EXAMPLE:_______
WANT TO 'FIND' ANYTHING? (Y/<CR>=N/STRING) ALL <CR> ___ ____
will cause the command "FIND ALL." to appear in the report control
file.
WANT TO 'FIND' ANYTHING? (Y/<CR>=N/STRING) <CR> ____
will cause no "FIND ..." command to be placed in the report control
file.
Page 8
IS THE DATA BASE ALREADY SORTED? (Y/<CR>=N)
The user should respond with either <CR> or 'N' if the data base is
not, or 'Y' if it is, sorted already. If the user answers 'N' here,
the report control file will contain a "SORT BY ..." command, where
... will be the list of sort attributes he inputs next.
Regardless of the answer to the above question, the user must input
his list of sort attributes, because they will be needed later in the
program, to drive loops in the TOTALS section of the program.
To denote a DESCENDING attribute, type a 'D ' before the attribute
name.
EXAMPLE:_______
IS THE DATA BASE ALREADY SORTED? (Y/<CR>=N) Y <CR> _ ____
ENTER SORT ORDER USED IN THE DATA BASE:
(<CR> TO END)
* HOUSE <CR> _____ ____
* D FLOOR <CR> _ _____ ____
* ROOMNUM <CR> _______ ____
* <CR> ____
will name "HOUSE", "FLOOR", and "ROOMNUM" as the three sort
attributes, in order of outermost to innermost. "FLOOR" will be
sorted in DESCENDING order.
Had the user answered 'N' to the "ALREADY SORTED?" question, the
program would have placed the following command in the report control
file:
SORT BY HOUSE FLOOR DESCENDING ROOMNUM.
Page 9
ENTER TEXT FOR COVER PAGE, TERMINATE WITH "DONE"
Any text that the user wishes to appear on the front page of the
output can be entered here, line by line, ended by typing a "DONE" on
its own line. The heading and footing will be suppressed on this
front page. Blank lines input here will appear as blank lines in the
body of text.
EXAMPLE:_______
ENTER TEXT FOR COVER PAGE, TERMINATE WITH "DONE"
* <CR> ____
* FIRST LINE OF THE TEXT TO APPEAR _____ ____ __ ___ ____ __ ______
* <CR> ____
* <CR> ____
* ON THE FRONT PAGE. __ ___ _____ _____
* <CR> ____
* <CR> ____
* DONE <CR> ____ ____
The following text lines
[BLANK LINE]
"FIRST LINE OF THE TEXT TO APPEAR"
[BLANK LINE]
[BLANK LINE]
"ON THE FRONT PAGE"
[BLANK LINE]
[BLANK LINE]
as a body, will appear centered vertically and horizontally on the
front page.
Page 10
ENTER TEXT FOR HEADING, TERMINATE WITH "DONE"
This is identical to the previous question in all its inputs and
outputs, except that the text the user types in here will be printed
out on the top of every page, but not on the front page.
Page 11
WANT A FOOTING? (Y/<CR>=N)
Here the user can input any text he likes for the page footing by
answering this question with a 'Y'. Answering 'N' or <CR> means there
will be no "FOOTING ..." command in the report control file.
EXAMPLE:_______
WANT A FOOTING? (Y/<CR>=N) Y <CR> _ ____
HOW MANY LINES IN IT? 4 <CR> _ ____
WANT TEXT? (Y/<CR>=N/TEXT) FOOTING-TEXT <CR> ____________ ____
will cause the command FOOTING 4 PRINT FORMAT "FOOTING-TEXT" END. to
appear as a command in the report control file.
Page 12
-- PAGE HEADINGS --
Four questions are now asked to determine whether or not the user
wants the current page number, date, and time to appear at the top of
every page, and how many blank lines he wants after the field titles
in the heading of every page. If the user wants the date, it is
printed at the left-hand corner; if he wants the page number, it
appears in the middle of the same line; and if he wants the time, it
appears on the right-hand side of the same line. Specifying all three
would result in the following line appearing at the top of every page:
MARCH 14, 1975 PAGE ... 11:45:13
Answering the question STANDARD PAGE HEADINGS? (<CR>=Y/N) with a 'N'
will cause the individual questions listed below to appear, whereas
answering 'Y' or <CR> will set all the defaults to 'Y'. The default
number of blank lines after the field titles is 2.
EXAMPLE:_______
STANDARD PAGE HEADINGS? (<CR>=Y/N) N <CR> _ ____
WANT PAGE NUMBERS? (<CR>=Y/N) <CR> ____
WANT DATE? (<CR>=Y/N) N <CR> _ ____
WANT TIME? (<CR>=Y/N) <CR> ____
NUMBER OF BLANK LINES AFTER TITLES? 3 <CR> _ ____
would produce the following at the top of every page:
PAGE ... 13:05:46
and three blank lines would follow the underlining of the field
titles, or the above line, should there be no field titles.
Page 13
-- FIELDS --
The user must now input all the information the program will need for
the fields. A field is a vertical band on the page. It may be either
a text field or an expression field. Inside a band, the user may have
a title at the top of the page, any number of entry lines having an
item in that band, and totals of the contents of the band, at some
point, if he wishes. A field merely acts to keep the format of the
report columnar.
The user is first asked what type of field he wants with the question
EXPRESSION, "TEXT", OR <CR> TO END:
POSSIBLE RESPONSES:________ __________
<CR> - ends the input of fields.
"TEXT" - must be in double-quotes. This text string is printed
out in this field at every detail line. Main use is to put
spaces between adjacent fields. Another use is to place a
dollar-sign against the left-hand side of a number in the
following field. The user must be careful that the number of
characters is less than or equal to the field width, which he
must input at the next question.
EXPRESSION - The value of this expression will be printed at
every detail line.
Next, the user can input any special format he needs for this
expression. The default format is always "Gxxx", where xxx is
the field width. If the user wants something else, he has the
chance to input it here. a sample is
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) D3P99999XXXXX <CR> _____________ ____
which will cause a date of the form "11/15" to be printed in this
field.
Field titles were mentioned above. The user now can input a text
string which he wants to appear at the top of the page, aligned
over this field, by answering the following question:
FIELD TITLE? (Y/<CR>=N/TITLE) MONETARY RESOURCES <CR> ________ _________ ____
A sample input is demonstrated above. Since a title may easily
be longer than the field width, the title is "scrolled", i.e.
broken up on different lines, such that each line fits within the
field width. The algorithm the program uses for the scrolling is
as follows:
Page 14
first, fit as many whole words as possible onto the current
line; remove these words from the rest of the title,
leaving only what is left to be processed; continue until
the title has been totally processed. If, at any time, you
have a word too long to fit on one line, you break it and
hyphenate it on the first line, and continue it on the next
one.
Thus, if the field length were 19 or wider, the entire title
"MONETARY RESOURCES" would be on one line. If the field width
were between 18 and 10, the title would be broken evenly up into
two lines, one word per line. If the field width were less than
10, each word would be broken up, and the title would take more
than two lines, and the words would be hyphenated.
If the user wants the title of the field to be the same as the
expression, he merely has to answer this question with a 'Y', and
the program will ask the following question:
INPUT TITLE (<CR> = EXPRESSION)
all he has to do then is answer <CR> to this question.
The user can tell the program where he wants his titles divided
for different lines by inserting a slash (/) in the title string
wherever he wants a line break. The way to indicate a literal
slash in the title, since the slash is used as a control
character and is therefore ignored as text, is the construction
'^/'. The up-arrow is a literal flag that protects the slash
following it from interpretation as a scrolling control
character. The up-arrow is of course ignored as text.
Multiple slashes willte blank lines to appear in the title.
An automatic control slash is appended to the end of the title,
so the user does not have to add one to show the end of the
title. If he does add one, the result will appear to be multiple
slashes.
One final note - the program does not allow two titles to butt up
against each other, so it automatically leaves one space after
each segment of any title. What this means is that a title of 10
characters will not fit totally into a field with width 10 - it
will be hyphenated and continued to the next line, to prevent it
from running into a title that may possibly be in the next field.
So when controlling his own line breaks, the user must take care
never to input more then (field width - 1) characters before the
next control slash, else the rest of the title from that line on
will be truncated and lost.
The final question the program asks is whether or not this
expression is totallable, a piece of information necessary for
the TOTALS section of the program later on.
Page 15
The next page contains a sample series of fields and how they
would look on a sample output page.
Page 16
FIELD # 1:
EXPRESSION, "TEXT", OR <CR> TO END: LNAME <CR> _____ ____
FIELD WIDTH -- 6 <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
FIELD TITLE? (Y/<CR>=N/TITLE) LAST NAME <CR> ____ ____ ____
TOTALLABLE? (Y/<CR>=N) <CR> ____
FIELD # 2:
EXPRESSION, "TEXT", OR <CR> TO END: "----" <CR> ______ ____
FIELD WIDTH? 4 <CR> _ ____
FIELD # 3:
EXPRESSION, "TEXT", OR <CR> TO END: INCOME <CR> ______ ____
FIELD WIDTH -- 6 <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) I6 <CR> __ ____
FIELD TITLE? (Y/<CR>=N/TITLE) Y <CR> _ ____
INPUT TITLE (<CR> = EXPRESSION) <CR> ____
TOTALLABLE? (Y/<CR>=N) Y <CR> _ ____
FIELD # 4:
EXPRESSION, "TEXT", OR <CR> TO END: <CR> ____
The above series would print out as something like the following page:
Page 17
LAST INCO-
NAME ME
---- -----
.
.
.
BROWN ----100000
JONES ----120000
SMITH ---- 40000
HALL ---- 15000
.
.
.
Page 18
SUMMARY REPORTING ONLY? (Y/<CR>=N)
A 'Y' answer to this question will cause no detail lines to be printed
out in the report output. Only TOTALS of any sort will be output. A
'N' or <CR> answer to this will cause the detail lines to be printed
out.
Page 19
TITLES ON ATTRIBUTE CHANGES? (Y/N/<CR>=DEFAULT)
This command enables text to be printed when a sort expression
changes, notifying the user of this change, and if requested, its new
value.
POSSIBLE RESPONSES:________ _________
'N' - No titles printed when a sort expression changes value.
'Y' - User can have his own titles printed. He inputs them in
response to a further series of questions, driven by the
sortlist.
<CR> - Default case. Program generates a title at every sort
expression value change, also printing the new value.
EXAMPLE:_______
TITLES ON ATTRIBUTE CHANGES? (Y/N/<CR>=DEFAULT) <CR> ____
If your sort list were COUNTRY STATE CITY, the program would generate
the following commands in the report control file:
ON CHANGE COUNTRY PRINT COUNTRY
FORMAT " COUNTRY: " G /// END.
ON CHANGE STATE PRINT STATE
FORMAT " STATE: " G // END.
ON CHANGE CITY PRINT CITY
FORMAT " CITY: " G / END.
The general default case format is:
ON CHANGE [sort expression] PRINT [sort expression]
FORMAT "[AAA][sort expression]: " G BBB END.
where AAA stands for five spaces indentation per sort level, and BBB
stands for one slash for each sort level above the PRINT command.
Page 20
If the user inputs a 'Y' to the initial question, a dialogue similar
to the following will ensue:
ON CHANGE OF 'COUNTRY'? (Y/N/<CR>=DEFAULT) Y <CR> _ ____
INPUT SUBTITLE EXPRESSION: COUNTRY <CR> _______ ____
INPUT FORMAT: (TEXT IN "") "COUNTRY NOW IS: " G <CR> ________ ___ ___ _ _ ____
ON CHANGE OF 'STATE'? (Y/N/<CR>=DEFAULT) N <CR> _ ____
ON CHANGE OF 'CITY'? (Y/N/<CR>=DEFAULT) <CR> ____
which will cause the following to appear in the report control file:
ON CHANGE COUNTRY PRINT COUNTRY
FORMAT "COUNTRY NOW IS: " G END.
ON CHANGE CITY PRINT CITY
FORMAT " CITY: " G / END.
Page 21
TOTALS ON ATTRIBUTE CHANGES? (Y/N/<CR>=DEFAULT)
This command enables totals of totallable fields to be printed within
that same field, keeping everything columnar. Totals can be generated
at any sort level, of any totallable expression - the user has
complete flexibility. Plus, if there are any totals he cannot
generate within this framework, he has the SUPERTOTALS option later
on.
POSSIBLE RESPONSES:________ _________
'N' - No totals of any kind are to be printed.
'Y' - User can have his choice of totals, by answering a further
series of questions.
<CR> - Default case. Program prints the total of every
totallable expression at every sort level.
EXAMPLE:_______
TOTALS ON ATTRIBUTE CHANGES? (Y/N/<CR>=DEFAULT) <CR> ____
If your sort list were COUNTRY STATE CITY and your totallable
expressions were INCOME SALARY BONUS, then the program might generate
the following in the report control file:
ON CHANGE CITY PRINT TOT INCOME TOT SALARY TOT BONUS
FORMAT / "TOTAL BY CITY: " G10 G8 G8 / END.
ON CHANGE STATE PRINT TOT INCOME TOT SALARY TOT BONUS
FORMAT / "TOTAL BY STATE: " G10 G8 G8 // END.
ON CHANGE COUNTRY PRINT TOT INCOME TOT SALARY TOT BONUS
FORMAT / "TOTAL BY COUNTRY: " G10 G8 G8 /// END.
The general default case format is:
ON CHANGE [sort expression] PRINT TOT ... TOT ... TOT ...
FORMAT / "TOTAL BY [sort expression]: " GXXX GXXX ... BBB END.
where all totallable expressions are mentioned in the ... on the
first line, and a matching format "GXXX" on the second line, where XXX
is the field width of that expression. BBB represents one slash for
every sort level below the PRINT command.
Page 22
If the user inputs a 'Y' to the initial question, a dialogue similar
to the following will occur:
ON CHANGE 'CITY'? (Y/N/<CR>=DEFAULT) N <CR> _ ____
ON CHANGE 'STATE'? (Y/N/<CR>=DEFAULT) <CR> ____
ON CHANGE 'COUNTRY'? (Y/N/<CR>=DEFAULT) Y <CR> _ ____
WANT 'INCOME' TOTALLED? (Y/<CR>=N) Y <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) I10 <CR> ___ ____
WANT 'SALARY' TOTALLED? (Y/<CR>=N) <CR> ____
WANT 'BONUS' TOTALLED? (Y/<CR>=N) Y <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
SPECIAL TEXT? (Y/<CR>=N/TEXT) NO-THANK-YOU <CR> ____________ ____
which will cause the following commands to be placed in the report
control file:
ON CHANGE STATE PRINT TOT INCOME TOT SALARY TOT BONUS
FORMAT / "TOTAL BY STATE: " G10 G8 G8 // END.
ON CHANGE COUNTRY PRINT TOT INCOME TOT BONUS
FORMAT / "NO-THANK-YOU" I10 G8 /// END.
Page 23
GRAND TOTALS? (Y/N/<CR>=DEFAULT)
Grand totals are similar to the TOTALS described immediately above,
except that these are printed only once, at the end of the report.
All the formats and inputs and options are the same as those described
above.
EXAMPLE:_______
GRAND TOTALS? (Y/N/<CR>=DEFAULT> <CR> ____
would cause the following to be placed in the report control file:
ON END PRINT TOT INCOME TOT SALARY TOT BONUS
FORMAT / "GRAND TOTAL: " G10 G8 G8 // END.
and the following sequence:
GRAND TOTALS? (Y/N/<CR>=DEFAULT) Y <CR> _ ____
GRAND TOTAL 'INCOME'? (Y/<CR>=N) <CR> ____
GRAND TOTAL 'SALARY'? (Y/<CR>=N) Y <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) F6.2 <CR> ____ ____
GRAND TOTAL 'BONUS'? (Y/<CR>=N) Y <CR> _ ____
SPECIAL FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
SPECIAL TEXT? (Y/<CR>=N/TEXT) GRAND-TOTAL-TEXT <CR> ________________ ____
would cause the following to be placed in the report control file:
ON END PRINT TOT SALARY TOT BONUS
FORMAT / "GRAND-TOTAL-TEXT" F6.2 G8 // END.
Page 24
WANT SUPER TOTALS? (Y/<CR>=N)
The TOTALS options so far only allow the TOT of an expression.
Furthermore, that which can be totalled by these commands is
restricted to totallable expressions already declared, and they can
only be printed out in their own fields. The SUPERTOTALS option
removes all limitations, by allowing TOT, MEAN, MAX, and MIN of
anything at all, and complete flexibility in terms of positioning
these values on the page. The user has the SUPERTOTALS option after
answering 'Y' to the "TOTALS ON ATTRIBUTE CHANGES" question, and after
answering <CR> or 'Y' to the "GRAND TOTALS" question.
EXAMPLE:_______
WANT SUPER TOTALS? (Y/<CR>=N) Y <CR> _ ____
EXPRESSION: (<CR> FOR NEW LINE) TOT 1 <CR> ___ _ ____
FIELD: (<CR> FOR START/END) <CR> ____
START: 3 <CR> _ ____
END: 15 <CR> __ ____
TITLE? (Y/<CR>=N/TITLE) NUMBER OF RECORDS <CR> ______ __ _______ ____
FORMAT? (Y/<CR>=N/FORMAT) I3 <CR> __ ____
EXPRESSION: (<CR> FOR NEW LINE) <CR> ____
WANT ANOTHER LINE? (Y/<CR>=N) <CR> ____
The above would generate a total of the number of records operated on
at the time this was evaluated and printed into the report. The field
width was set at 13, running from the third to the fifteenth column on
that line. A title was placed in this field, above the number and
underlined, which read "NUMBER OF RECORDS". The number was printed in
I3 format. No further expressions were desired on this line (any
number of expressions can be placed on any one line) and only one line
of SUPERTOTALS was desired (any number of lines can be generated).
The user must be careful that he does not overlap fields here, as the
program makes no check on that. The user can also input his
expressions in any order he wants, regardless of where on the line
they are to go - the program sorts them into the order that they are
to appear on the line. Also, should the user wish to have any
expressions printed out within a declared field, he can answer the
FIELD question above with the field number he wants.
Page 25
A lengthier example follows:
WANT SUPER TOTALS? (Y/<CR>=N) Y <CR> _ ____
SUPER TOTALS LINE # 1:
EXPRESSION: (<CR> FOR NEW LINE) MIN SALARY <CR> ___ ______ ____
FIELD: (<CR> FOR START/END) 5 <CR> _ ____
TITLE? (Y/<CR>=N/TITLE) Y <CR> _ ____
INPUT TITLE: (<CR>=EXPRESSION) <CR> ____
FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
EXPRESSION: (<CR> FOR NEW LINE) MIN BONUS <CR> ___ _____ ____
FIELD: (<CR> FOR START/END) 3 <CR> _ ____
TITLE? (Y/<CR>=N/TITLE) SMALLEST BONUS <CR> ________ _____ ____
FORMAT? (Y/<CR>=N/FORMAT) I6 <CR> __ ____
EXPRESSION: (<CR> FOR NEW LINE) <CR> ____
WANT ANOTHER LINE? (Y/<CR>=N) Y <CR> _ ____
SUPER TOTALS LINE # 2:
EXPRESSION: (<CR> FOR NEW LINE) MAX COMMISSION <CR> ___ __________ ____
FIELD: (<CR> FOR START/END) <CR> ____
START: 35 <CR> __ ____
END: 42 <CR> __ ____
TITLE? (Y/<CR>=N/TITLE) <CR> ____
FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
EXPRESSION: (<CR> FOR NEW LINE) MAX INCOME <CR> ___ ______ ____
FIELD: (<CR> FOR START/END) <CR> ____
START: 20 <CR> __ ____
END: 27 <CR> __ ____
TITLE? (Y/<CR>=N/TITLE) <CR> ____
FORMAT? (Y/<CR>=N/FORMAT) <CR> ____
Page 26
EXPRESSION: (<CR> FOR NEW LINE) <CR> ____
WANT ANOTHER LINE? (Y/<CR>=N) <CR> ____
would cause the following to be generated in the report control file:
ON CHANGE ... PRINT ...
MIN BONUS MIN SALARY
MAX INCOME MAX COMMISSION
FORMAT / "TOTAL BY ... :" 29T G10 6X G8
//
" SMALLEST MIN" /
" BONUS SALARY" /
" --------- -------" /
29T I6 45T G8 //
20T G8 35T G8 //
assuming that the first five field widths were, in this case, 15, 13,
10, 6, and 8. The first totallable expression was in field 3, hence
the skip of 29T to get there. The fourth field here was a text field,
hence the 6X. Notice that answering 'Y' to the TITLE question allows
the user to answer <CR> to the following question, thereby permitting
him to repeat this expression for the title. Since there were no
titles to be printed on the second SUPERTOTALS line, none were
printed, and no underlines were generated; only the formats were
listed.
Titles here may be scrolled just as before, when inputting for the
field titles.
Page 27
WANT TO RUN REPORT NOW? (Y/<CR>=N)
The user can ask to have his report generated immediately by answering
this question in the affirmative. This program will cause 1022 to be
entered, and the report file to be run.
The user has the further option of remaining in 1022 or exitting back
to the monitor. He must answer the following question concerning