-
Notifications
You must be signed in to change notification settings - Fork 0
/
117b.mem
5086 lines (3751 loc) · 212 KB
/
117b.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
***********************************************************************
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* SYSTEM 1022 *
* *
* DOCUMENTATION OF NEW FEATURES *
* *
* VERSION 117B *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
***********************************************************************
Software House
1105 Massachusetts Avenue
Cambridge, Massachusetts 02138
----
(617)661-9440
Version 117B, May 1986
copyright 1986, SOFTWARE HOUSE
1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . 1
2.0 SYSTEM 1022 DOCUMENTATION . . . . . . . . . . . . . 1
3.0 SUMMARY OF CHANGES TO 1022 . . . . . . . . . . . . . 3
4.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . 4
5.0 THE LARGE DATA SETS MODULE . . . . . . . . . . . . . 5
5.1 Multifile Data Sets . . . . . . . . . . . . . . . 5
5.1.1 Overview . . . . . . . . . . . . . . . . . . . . . 5
5.1.2 Determining File Size . . . . . . . . . . . . . . 7
5.1.3 Relocating Auxiliary Files . . . . . . . . . . . . 7
5.1.4 Checking For Auxiliary File Damage, Loss, Or Skew 9
6.0 PC EXTRACT: CREATING DIF AND WKS FILES . . . . . 11
6.1 Introduction . . . . . . . . . . . . . . . . . . 11
6.2 DIF Files . . . . . . . . . . . . . . . . . . . 11
6.2.1 The INIT DIF Command . . . . . . . . . . . . . . 11
6.2.2 Printing To A 1022 DIF File . . . . . . . . . . 13
6.2.2.1 Data Type Conversion . . . . . . . . . . . . . . 13
6.2.2.2 Print Formats . . . . . . . . . . . . . . . . . 13
6.2.2.3 Example . . . . . . . . . . . . . . . . . . . . 14
6.2.2.4 Data-Positioning Information . . . . . . . . . . 17
6.3 WKS Files . . . . . . . . . . . . . . . . . . . 19
6.3.1 The INIT 123 Command . . . . . . . . . . . . . . 19
6.3.2 Printing To A WKS File . . . . . . . . . . . . . 21
6.3.2.1 Data Type Conversion . . . . . . . . . . . . . . 21
6.3.2.2 Print Formats . . . . . . . . . . . . . . . . . 22
6.3.2.2.1 L Format . . . . . . . . . . . . . . . . . . . . 23
6.3.2.2.2 Other Formats . . . . . . . . . . . . . . . . . 25
6.3.2.2.3 Other Formats . . . . . . . . . . . . . . . . . 25
6.3.2.2.3.1X, /, And $ Formats . . . . . . . . . . . . . . 25
6.3.2.2.3.2Other 1022 Formats . . . . . . . . . . . . . . 29
6.3.2.3 Example . . . . . . . . . . . . . . . . . . . . 30
6.3.2.4 Data-Positioning Options . . . . . . . . . . . . 33
6.4 Error Handling . . . . . . . . . . . . . . . . . 37
7.0 WILDCARD MATCHING WITH FIND AND SEARCH . . . . . . 38
7.1 Overview . . . . . . . . . . . . . . . . . . . . 38
7.2 Examples . . . . . . . . . . . . . . . . . . . . 40
7.3 Comments . . . . . . . . . . . . . . . . . . . . 41
8.0 RECORD-LEVEL LOCKING . . . . . . . . . . . . . . . 41
8.1 Record-level Locking . . . . . . . . . . . . . 41
8.1.1 Enabling Record-level Locking For A Data Set . 42
8.1.2 Locking Records With GETREC $LOCK . . . . . . . 43
8.1.3 Locking Records With LOCK ON RECORD . . . . . . 44
8.2 User-defined Locks On A Data Set . . . . . . . 45
8.2.1 Userlocks With Collections . . . . . . . . . . 48
8.3 Host Language Calls For Record Level And
User-defined Locking . . . . . . . . . . . . . 48
8.3.1 FORTRAN . . . . . . . . . . . . . . . . . . . . 48
8.3.1.1 The GETREC Command -- DBGREC . . . . . . . . . 48
8.4 Retrieving An Entire Record -- DBGET . . . . . 49
8.4.0.1 The LOCK Command -- DBLOCK . . . . . . . . . . 51
8.4.1 COBOL . . . . . . . . . . . . . . . . . . . . . 53
8.4.1.1 The GETREC Command -- DBGREC . . . . . . . . . 53
8.5 Retrieving An Entire Record -- DBGET . . . . . 54
8.5.0.1 The LOCK Command -- DBLOCK . . . . . . . . . . 54
8.6 Locking Error Messages . . . . . . . . . . . . . 56
9.0 PL1022 DEBUGGING TOOLS . . . . . . . . . . . . . . 57
10.0 TOPS-20 FORTRAN VERSION 10 WITH EXTENDED SECTIONS 58
11.0 EXPANDED INFORM COMMAND . . . . . . . . . . . . . 58
11.1 INFORM DMX . . . . . . . . . . . . . . . . . . . 58
11.1.1 Overview . . . . . . . . . . . . . . . . . . . . 58
11.1.2 Example . . . . . . . . . . . . . . . . . . . . 60
11.1.3 Comments . . . . . . . . . . . . . . . . . . . . 61
11.2 INFORM STRUCTURE . . . . . . . . . . . . . . . . 62
11.3 INFORM STRUCTURE TABLE . . . . . . . . . . . . . 63
11.4 INFORM STRUCTURE DATA . . . . . . . . . . . . . 65
11.5 INFORM ATTRIBUTE . . . . . . . . . . . . . . . . 65
11.6 INFORM STATUS . . . . . . . . . . . . . . . . . 66
11.7 INFORM VERSION . . . . . . . . . . . . . . . . . 66
12.0 WILDCARDED ADMIT LISTS (TOPS-20) . . . . . . . . . 67
13.0 DBA AS DIRECTORY STRING (TOPS-20) . . . . . . . . 67
14.0 1022SA INFORM DBA COMMAND . . . . . . . . . . . . 68
15.0 1022SA BANNER COMMAND . . . . . . . . . . . . . . 68
16.0 CUSTOM DMI READER . . . . . . . . . . . . . . . . 69
16.1 Overview . . . . . . . . . . . . . . . . . . . . 69
16.2 Examples . . . . . . . . . . . . . . . . . . . . 70
16.2.1 FORTRAN Example . . . . . . . . . . . . . . . . 70
16.2.2 COBOL Example . . . . . . . . . . . . . . . . . 71
17.0 THE NODME OPTION OF LOAD, APPEND, AND TRANSACT . . 72
18.0 THE SCRATCH AREA . . . . . . . . . . . . . . . . . 73
18.1 Overview . . . . . . . . . . . . . . . . . . . . 73
18.2 SYSDCORESS And SYSCORESS . . . . . . . . . . . . 74
18.3 SET SCRATCH . . . . . . . . . . . . . . . . . . 74
18.4 SYSSCRFILE . . . . . . . . . . . . . . . . . . . 75
19.0 KEY $SCAN, KEY $CHECKSUM, AND KEY $VERIFY . . . . 75
20.0 SYSERRTEXT AND THE ERFCHK UTILITY . . . . . . . . 77
21.0 SYSTOPSID AND SYSTOPIID . . . . . . . . . . . . . 78
22.0 TEXT CONVERSION FUNCTIONS . . . . . . . . . . . . 78
22.1 $TEXT . . . . . . . . . . . . . . . . . . . . . 78
22.2 $TEXTL And $TEXTR . . . . . . . . . . . . . . . 79
23.0 $MOD FUNCTION . . . . . . . . . . . . . . . . . . 80
24.0 SYSFMSG . . . . . . . . . . . . . . . . . . . . . 80
25.0 SYSEXECKP . . . . . . . . . . . . . . . . . . . . 81
26.0 SYSNOYMD . . . . . . . . . . . . . . . . . . . . . 81
26.1 Eight-Digit Dates . . . . . . . . . . . . . . . 81
26.2 Six-Digit Dates . . . . . . . . . . . . . . . . 82
26.3 Seven-Digit And Five-Digit Dates . . . . . . . . 82
27.0 MAP BY SORT . . . . . . . . . . . . . . . . . . . 82
28.0 ENFORCEMENT OF RESERVED WORDS . . . . . . . . . . 82
29.0 DBRETN (FORTRAN) . . . . . . . . . . . . . . . . . 83
30.0 DBEND DEBUGGING MESSAGE . . . . . . . . . . . . . 84
31.0 SORT22 . . . . . . . . . . . . . . . . . . . . . . 84
32.0 FEATURES RELATING TO TOPS-20 MONITOR VERSION 6.1 . 85
33.0 MISCELLANEOUS IMPROVEMENTS . . . . . . . . . . . . 85
34.0 TABLE OF SYSTEM VARIABLES . . . . . . . . . . . . 87
Page 1
1.0 INTRODUCTION
This document lists the 1022 documentation and summarizes the new
features of version 117B.
2.0 SYSTEM 1022 DOCUMENTATION
The current documentation for System 1022 is:
1. User's Reference Manual, Revision 4, May 1986. This contains ______ _________ ______
complete information about the interactive use of 1022. This
manual is MANUAL.MEM on the distribution tape. It is also
available in printed form from Software House.
2. Documentation of New Features, Version 117B. This documents _____________ __ ___ _________ _______ ____
new features and improvements in version 117B. It is
available in the file 117B.MEM on the 1022 distribution tape.
3. Host Language Interface User's Reference Manual, Revision 5, ____ ________ _________ ______ _________ ______
May 1986. This contains information needed to write and run
FORTRAN, COBOL, and MACRO application programs using the
System 1022 subroutine library. This manual is HOST.MEM on
the distribution tape. It is also available in printed form
from Software House.
4. Data Base Administrator's Manual, Revision 12, January, 1986. ____ ____ _______________ ______
This explains to the data base administrator how to install
and maintain 1022. This is available in printed form from
Software House. The file is DBA.MEM on the 1022 distribution
tape.
5. INSTAL.EXE. This file enables the data base administrator to
generate a set of instructions for the installation of MACRO
and the particular versions of FORTRAN and COBOL used at the
site. INSTAL.EXE is included on the 1022 distribution tape.
6. Primer, 1st edition, October 1982. This is an introduction ______
to the interactive use of 1022. It is available only in
printed form from Software House.
7. Report Writer Manual. This contains a collection of reports, ______ ______ ______
each with a detailed description to illustrate how custom
reports are written. It supplements the Reports chapter of
the User's Reference Manual. This is available in printed ______ _________ ______
form from Software House and in the file REPMAN.MEM on the
1022 distribution tape.
8. System 1022 Reference Book. This is a pocket guide to using ______ ____ _________ ____
1022 published by CompuServe. It is available in printed
form from Software House.
Page 2
9. 1022.BWR. This "beware" file contains warnings of version
incompatibilities and potential problems in using the system
for the current release. It is available in the file
1022.BWR on the 1022 distribution tape. All of the items in
this file belong to the data set BEWARE.DMS which Software
House also includes on the distribution tape.
10. BEWARE.DMC. This report program uses BEWARE.DMS to report on
version incompatibilities as well as fixed and outstanding
bugs.
11. BEWARE.DMS. This data set lists outstanding bugs and changes
made to System 1022. This information is also given in the
beware file, 1022.BWR.
To order printed copies of 1022 manuals, contact:
Documentation Distribution
Software House
1105 Massachusetts Avenue
Cambridge, MA 02138
USA
(617) 661-9440
Page 3
3.0 SUMMARY OF CHANGES TO 1022
o The Large Data Sets Module
o Multifile Data Sets for the Large Data Sets Module
o PC Extract: Creating DIF and WKS Files
o Wildcard Matching with FIND and SEARCH
o Record-Level Locking
o PL1022 Debugging Tools
o TOPS-20 FORTRAN Version 10 with Extended Sections
o Expanded INFORM Command
- INFORM DMX
- INFORM STRUCTURE
- INFORM STRUCTURE TABLE
- INFORM STRUCTURE DATA
- INFORM ATTRIBUTE
- INFORM STATUS
- INFORM VERSION
o Wildcarded ADMIT Lists (TOPS-20)
o DBA as Directory String (TOPS-20)
o 1022SA INFORM DBA Command
o 1022SA BANNER Command
o CUSTOM DMI READER
o The NODME Option of LOAD, APPEND, and TRANSACT
o The Scratch Area
- SYSDCORESS and SYSCORESS
- SET SCRATCH
- SYSSCRFILE
Page 4
o KEY $SCAN, KEY $CHECKSUM, and KEY $VERIFY
o SYSERRTEXT and the ERFCHK Utility
o SYSTOPSID and SYSTOPIID
o Text Conversion Functions
o $MOD Function
o SYSFMSG
o SYSEXECKP
o SYSNOYMD
o MAP BY SORT
o Enforcement of Reserved Words
o DBRETN (FORTRAN)
o DBEND Debugging Message
o SORT22
o Features Relating to TOPS-20 Monitor Version 6.1
o Miscellaneous Improvements
o Table of System Variables
4.0 INTRODUCTION
Version 117B introduces two major internal changes: version 117B
contains the internal structures that make it possible to support the
Large Data Sets Module, and each distribution tape has been custom
tailored for a site's particular licensed configuration.
Data sets created under 117A and 117B have an internal format that is
different from that of data sets created under previous versions of
1022. 117B supports both formats but operates more efficiently on
data sets in new format than on data sets in pre-117A format. Thus,
conversion from old format to new is recommended.
Conversion from old to new format is a two-stage process. First, the
user issues an UPTO command. If there are key tables or delete lists
in the old format, UPTO issues a warning. The UPTO command sets a
flag in the data set so that subsequent KEY or OPTIcommands will
produce key tables in the new format. Then, OPTIMIZE or KEY is used
to perform the actual format conversion. The user can then repeat the
UPTO command to verify that all conversions have been done. Until the
Page 5
old format structures are converted, data sets cannot exceed the block
and record maxima of previous versions of System 1022.
To use 117A or 117B data sets with previous versions of System 1022, a
similar conversion is necessary. A BACKTO command specifies the old
format for creating key tables, and it issues a warning that key
tables are in the new format. After applying OPTIMIZE or KEY to
produce key tables in the old format, the user can repeat the BACKTO
command to verify that the data set is ready for the pre-117 version.
A new DMV file format is used in 117A and 117B. Versions 117A and
117B can read DMV files from prior versions of System 1022, but they
only write DMV files in the new format. Prior versions of 1022 cannot
read new-format DMV files.
5.0 THE LARGE DATA SETS MODULE
The Large Data Sets Module increases to more than 134,000,000 the
number of records that can be contained in a System 1022 data set.
Data sets can now occupy up to 268,000,000 blocks each. The Large
Data Sets Module also supports multifile data sets.
Further enhancements to System 1022 optimize the handling of large
data sets. Users can now choose the appropriate format for selection
sets and can control the amount of scratch space that is allocated to
selection set formation. There are tools that provide statistical
information about the key tables and data set inconsistencies. All of
these features are described in detail below.
5.1 Multifile Data Sets
5.1.1 Overview
As of version 117A, it is possible for sites that have acquired the
Large Data Sets module to split large System 1022 data sets over
several files on multidisk devices. The user can place groups of
records or the key tables for individual attributes in separate
auxiliary files. The user can thereby maintain the contiguity of the
data and can also control the allocation of space and balance the
system load.
The distribution of records and key tables over separate files is
specified in the DMD file with the SET and AUXFILE statements in the
LOADING SECTION, and with the KEYFILE clause of the ATTRIBUTE
statements in the STRUCTURE SECTION. Consider the following sample
DMD file:
LOADING SECTION
SET MYFILE.DMS RECORDS 0
AUXFILE AUX1.DMM RECORDS 10000
AUXFILE AUX2.DMM
Page 6
AUXFILE AUX3.DMM RECORDS 10000
.
.
.
STRUCTURE SECTION
ATTRIBUTE LAST_NAME ABBREV LN KEYED TEXT KEYFILE AUX2.DMM LENGTH 15
.
.
.
In this case, the SET statement specifies that no records are to be
stored in MYFILE.DMS. Instead, they are to be stored in the auxiliary
files AUX1.DMM and AUX3.DMM. If the RECORDS argument is omitted from
the SET statement, the default number of records that the DMS file may
hold is the maximum (134,000,000). The SET statement with an explicit
RECORDS specification must appear in the DMD file if auxiliary files
are to be used to store records. The SET statement need not appear if
auxiliary files are to be used for storing key tables.
Auxiliary files, whether to hold records or key tables, are specified
in the LOADING SECTION of the DMD file after the SET statement. The
keyword AUXFILE precedes the name of each auxiliary file. The default
extension for auxiliary files is DMM. If an auxiliary file is to hold
records, the keyword RECORDS followed by a number must appear in the
AUXFILE statement. Otherwise, it is assumed that the file will hold
key tables.
When an auxiliary file is named without a RECORDS clause in the
LOADING SECTION of a DMD file, that file may only be used to store key
tables. In the STRUCTURE SECTION of that file, the KEYFILE clause of
an ATTRIBUTE statement assigns the key table associated with that
attribute to that auxiliary file as shown in the example given above.
It is not necessary that the attribute be KEYED in the DMD file to use
the KEYFILE clause. The KEYFILE clause can mean that if the attribute
is keyed in the future, the key tables will be stored in the specified
auxiliary file.
5.1.2 Determining File Size
SET and AUXFILE statements may include a BLOCKS clause to specify the
maximum size that the file can reach. (On TOPS-20, a PAGES
specification may take the place of the BLOCKS clause.) For example,
SET MYFILE.DMS RECORDS 100000000 PAGES 10000000
or
AUXFILE AUX1.DMM RECORDS 60000000 BLOCKS 6000000
If no BLOCKS (or PAGES) specification is explicitly made, each named
file, except the last, defaults to an upper limit of 8,000,000 blocks
(2,000,000 pages). The last file named in the LOADING SECTION may be
as large as the difference of the combined limits of the other named
Page 7
files and the maximum of 268,000,000 blocks (67,000,000 pages).
User-specified limits on the last file are ignored by System 1022 up
to this number.
As a general rule, it suffices to let the size of the key tables (or
the set of records) limit the size of the files to which they are
assigned with no explicit mention of blocks or pages. The BLOCKS
(PAGES) clause has essentially two uses. When the default limits are
too small for the projected size of your auxiliary files, you may
specify a larger number of blocks (pages) with the BLOCKS (PAGES)
clause. Numbers smaller than the default may be specified when the
key tables and records are to be split over more than 64 separate
files (the maximum number of blocks for a file as a whole divided by
the 8,000,000 block auxiliary file default).
The BLOCKS (PAGES) clause should be used with caution. Suppose that
the block limits for a record-holding auxiliary file are too low to
accommodate the number of records specified. System 1022 then stores
the excess records in the next auxiliary file capable of holding them.
If no other auxiliary file named in the DMD can hold the records, a
warning is issued and no more records are added.
5.1.3 Relocating Auxiliary Files
The user has the option of moving an auxiliary file to a new location,
such as to a different device, by following a six-step procedure, the
first step of which is optional:
1. Before entering 1022, create an empty file whose descriptor
names the new location;.le;Enter 1022 and open the main file
2. Issue the RELOCATE AUXFILE command
3. Close the main file
4. Exit from 1022
5. Either rename the auxfile to its new location or copy it to
the new location and delete the original.
If you omit step 1, the following message will appear when the
RELOCATE AUXFILE command finishes executing:
%WARNING: New AUXFILE does not currently exist
For example, on TOPS-20
*OPEN MYFILE
*RELOCATE AUXFILE AUX2.DMM PS:<LOPEZ>MYAUX2.DMM
*CLOSE
Page 8
*EXIT
@RENAME AUX2.DMM PS:<LOPEZ>MYAUX2.DMM
or
@COPY AUX2.DMM PS:<LOPEZ>MYAUX2.DMM
@DELETE AUX2.DMM
Or, on TOPS-10
*OPEN MYFILE
*RELOCATE AUXFILE AUX2.DMM DSKA:MYAUX2.DMM[203,507]
*CLOSE
*EXIT
.RENAME DSKA:MYAUX2.DMM[203,507] = AUX2.DMM
or
.COPY DSKA:MYAUX2.DMM[203,507] = AUX2.DMM
.DELETE AUX2.DMM
Note that both the old and new names for the auxiliary file must be
given in issuing the RELOCATE AUXFILE command. The device on which
the file is to reside must also be specified. To successfully
relocate (and later retrieve) an auxiliary file, all of these steps
must be executed in the order given here.
5.1.4 Checking For Auxiliary File Damage, Loss, Or Skew
When an OPEN command is given for a multifile data set, System 1022
automatically checks to make sure that all of the data set's auxiliary
files are present. When the system variable SYSAUXCHK set to 0 (the
default), 1022 gives an error message if any of the data set's
auxiliary files are damaged or skewed. When SYSAUXCHK is set to 1, no
such checking is performed and no such error messages are displayed.
SYSAUXCHK is both user settable and default settable.
If an auxiliary file is lost, whether through improvident deletion,
renaming, relocation, or disk damage, an attempt to open the data set
to which it belongs will produce a system error message:
1022 GTJFN error (600104) File not found, File: <filespec>
or
1022 GTJFN error (600077) No such file type, File: <filespec>
where <filespec> is the file specification of the first auxiliary file
Page 9
that 1022 discovers missing from the data set. This is followed by a
1022 error message:
? (OP15) Auxiliary file not found or has invalid dataset ID.
To open the data set when one or more of its auxiliary files has been
lost, issue the command:
OPEN <data set name> $MISSING
The system error message is then repeated, followed by the message:
%%MISSING AUXFILE, CONTINUING...
If more than one auxiliary file has been lost, the system error
message is repeated with the name of the next missing file, followed
by another %%MISSING AUXFILE, CONTINUING... These messages are
repeated until all the missing auxiliary files have been listed.
At this point, 1022 distinguishes among three types of auxiliary file
loss. If all that has been lost is an empty file (an auxiliary file
with no records or key tables in it), no further error messages are
issued. If an empty file was lost, a replacement will be created for
it when the user issues an update command (such as UPDATE ON, ADD, or
KEY). If key tables were lost, 1022 issues a warning message
informing the user of that fact when the first command involving key
tables is issued. The user should then rekey with a KEY NOREUSE
command. System 1022 will create a new auxiliary file to hold the key
tables. Note that when key tables have been lost, rekeying must be
accomplished before any update commands can be safely issued.
The other two kinds of loss involve missing records. If an auxiliary
file holding records becomes lost, another warning message is
displayed. It lists the SYSIDs of the missing records and gives the
file specification of the lost file. For example, if the auxiliary
file AUX1.DMM of the data set MYFILE.DMS holds records 1000-2000 and
this file is lost, the command
OPEN MYFILE $MISSING
will produce the following messages:
1022 GTJFN error (600104) File not found: File DSK:AUX1.DMM
%%MISSING AUXFILE, CONTINUING ...
%%WARNING: records 1000 through 2000 in AUXFILE AUX1.DMM are
missing!
If the lost file does not contain the last records in the data set,
the user has two options:
1. FIND the missing records, DELETE them, and then, if possible,
append a back-up copy of the records in the lost file. You
will probably then wish to DUMP all of the records to a new
file, since you cannot rekey until you do so.
Page 10
2. FIND all but the lost records, DUMP the found records to a
new file, and reload.
If the lost file holds the last records in the data set, 1022 will
only open the data set READONLY and will issue the following
additional message:
%%New records would be liable to be added to this AUXFILE
%%Data set restricted to READONLY access
This restriction keeps users from trying to add records to the end of
the data set after that part of the data set has been lost. When an
auxiliary file holding the last records in the data set is lost, the
best the user can do is to FIND all of the records except those whose
SYSIDs are listed as missing, DUMP the found records to a new DMI
file, and reload.
6.0 PC EXTRACT: CREATING DIF AND WKS FILES
6.1 Introduction
Enhancements to the INIT and PRINT commands enable the user to create
files in Data Interchange Format (DIF) and Lotus 1-2-3 worksheet (WKS)
format from within 1022 and to write 1022 data directly to them *.
These files can then be down-loaded to a personal computer with any of
the standard communications protocols (such as Kermit) or accessed
with an integration tool (such as Mobius) for spreadsheeting or other
PC applications **. DIF files created from within 1022 are in 8-bit
ASCII format, and WKS files created from within 1022 are in 8-bit
binary format. Care should therefore be taken when down-loading these
files to make sure that your communication protocol expects an 8-bit
file rather than a standard TOPS-10 or TOPS-20 7-bit file.
6.2 DIF Files
6.2.1 The INIT DIF Command
The DIF option of the INIT command lets you create an 8-bit ASCII DIF
file from within 1022. A DIF file may be seen as a table of data in
which vectors and tuples correspond, respectively, to the columns and
rows of a standard spreadsheet grid. Each tuple (row) of a DIF file
is a uniform number of vectors (columns) wide. Tuples are either
filled with data or padded out with blanks. A 1022 DIF file can have
.............
* DIF is a trademark of Software Arts Products Corporation. Lotus
1-2-3 is a registered trademark of Lotus Development Corporation.
............
** Mobius is a trademark of FEL Computing, a division of FEL
Industries.
Page 11
up to 2^18-1 columns (vectors) and 2^18-1 rows (tuples). The syntax
of the INIT DIF command is:
INIT DIF [ COL <c> ] [ ROW <r> ]
[ NCOLS <n> ] <channel number> <file name>
where:
COL <c> Directs 1022 to begin printing data at column <c> of
the DIF file when the first PRINT ON <channel number>
command is given (see below). <c> is an alphabetic
string representing a spreadsheet column in the
sequence A,B,C,...Z,AA,AB... within the range of A to
NWTL. The default is A. When a letter greater than A
is specified in the COL clause, 1022 prints blanks in
each of the columns from A to column <c-1> and then
begins printing data at column <c>.
ROW <r> Directs 1022 to begin printing data at row <r> of the
DIF file when the first PRINT ON <channel number>
command is given. <r> is a positive integer between 1
and 2^18-1. The default is 1. When an integer
greater than 1 is specified in the ROW clause, 1022
fills each row of the file from 1 to <r-1> with blanks
before printing data at row <r>.
NCOLS <n> Specifies the number of columns that the DIF file is
to have in addition to any included as blanks as the
result of a COL specification greater than A. <n> is
a positive integer between 1 and 2^18-1. The default
is 100.
System 1022 enforces the NCOLS limit by padding out
the row with blanks when more columns have been
specified than are needed to hold the data and by
truncating any print list that is too long for the
number of columns specified. In the latter case, a
warning is issued. It is strongly recommended that
you use the NCOLS option to limit the size of your DIF
file for greatest efficiency.
channel number Is the number of the channel on which the DIF file is
to be created. The number is between 1 and 8.
file name Is the name of the DIF file. The default extension is
.DIF.
For example:
INIT DIF 2 MYFILE
This command creates the file MYFILE.DIF on channel 2. The
file will be 100 vectors (columns) wide, and 1022 will begin
printing data at cell A1 (column A, row 1) when the first PRINT
Page 12
ON 2 command is given. Rows only partially filled with data
will be padded out to 100 columns with blanks.
INIT DIF COL B NCOLS 20 2 MYFILE
This command creates the file MYFILE.DIF on channel 2. The
file will be 21 vectors wide. When the first PRINT ON 2
command is given, 1022 will write a blank in column A of row 1
and then begin printing data at column B of row 1, padding out
any unfilled columns in the row with blanks. Each succeeding
PRINT ON 2 command will write a blank in column A, begin
printing data at column B, and pad out any unfilled columns
with blanks.
6.2.2 Printing To A 1022 DIF File
Once you have created a DIF file on a specified channel with the INIT
DIF command, you direct 1022 data to that file with the PRINT ON
<channel number> command. System 1022 data types are automatically
converted to DIF data types. Most of the conventional 1022 print
formats and defaults can be used to format the data written to the DIF
file.
6.2.2.1 Data Type Conversion
The DIF file standard recognizes only two data types: text and
numeric. Numeric data is represented by ASCII digit strings. Text
data is represented by ASCII character strings enclosed in double
quotation marks. When 1022 data is printed to a DIF file, its
representation as a string is essentially the same as it would be if
it were the output of a regular 1022 PRINT command. Whether a given
string is interpreted as text or numeric is determined by an automatic
translation between 1022 and DIF data types. This translation takes
the following form:
1022 Data Type --> DIF Data Type ____ ____ ____ ___ ____ ____
Integer Numeric
Double Integer Numeric
Real Numeric
Date Text
Text Text
Note the conversion of the 1022 Date type to DIF text. This means
that a 1022 date will appear as a text string in the DIF file and will
therefore not be able to be used in any calculations. If your
application needs a computational date, you can write one to the DIF
file with the 1022 command:
PRINT ON <channel number> $INT(date-item)
Page 13
This will return the number of days since 1/1/1800 in integer form,
which may or may not correspond to the way in which the target
spreadsheet or application calculates computational dates. If it does
not, you can offset the $INT result by the appropriate amount to make
up the difference.
6.2.2.2 Print Formats
Most of the conventional 1022 print formats can be used in writing to
a DIF file with PRINT ON <channel number> commands. The 1022 print
formats that are not supported in writing to DIF files are $, $3, $4, ___
S, T, C, and L.
With only two exceptions (X and /), format statements in PRINT ON
<channel number> commands directed to DIF files produce text and digit
strings that are essentially the same as the ones normally produced by
1022 PRINT commands. PRINT ON <channel number> commands in which no
format statement is included assume the customary 1022 defaults (G
format). The default formats for Date, Text, Integer, and Real data
are illustrated in the example in the following section.
Ordinarily, the X specification in a 1022 print format statement
generates a blank. In a PRINT ON <channel number> command directed to
a DIF file, the X causes a vector (column) to be written as a blank.
Thus, if you had created a DIF file with the standard defaults on
channel 2, the command
PRINT ON 2 LAST_NAME FIRST_NAME FMT G 2X G END
would print the value of the attribute LAST_NAME in column A, print
blanks in columns B and C, and print the value of the attribute
FIRST_NAME in column D.
Similarly, while the / specification in a PRINT command generates a
blank line, in a PRINT ON <channel number> directed to a DIF file a /
causes a tuple (row) to be filled with blanks. Thus, the command
PRINT ON 2 LAST_NAME FIRST_NAME FMT 2A / END
would print the value of LAST_NAME in column A and the value of
FIRST_NAME in column B of tuple (row) n and would fill the next tuple
(row n+1) with blanks before writing any more data to the file.
6.2.2.3 Example
A university administration maintains two System 1022 data sets,
STDNTS.DMS and WRKRS.DMS. STDNTS.DMS contains information about every
currently enrolled student, including the grade point average (GPA) of
each student. WRKRS.DMS contains information about every student
employed by the university, including the number of hours each
employee has worked during the past month (MTOT) and the total number
Page 14
of hours each student has worked up to the beginning of the present
month (TOTH). Every student is uniquely identified by his or her
student-identification number (ID). ID is an attribute common to
STDNTS and WRKRS.
The description files for the two data sets look like this:
STDNTS.DMD
ATTRIBUTE STUDENT_ID ABBREV ID INTEGER KEYED COL 1 6
ATTRIBUTE GRADE_POINT_AVERAGE ABBREV GPA REAL COL 7 10
WRKRS.DMD
ATTRIBUTE LAST_NAME ABBREV LN TEXT KEYED COL 1 15
ATTRIBUTE FIRST_NAME ABBREV FN TEXT COL 16 30
ATTRIBUTE STUDENT_ID ABBREV ID INTEGER KEYED COL 31 36
ATTRIBUTE YEAR_OF_BIRTH ABBREV YOB DATE COL 37 42
ATTRIBUTE HOURS_THIS_MONTH ABBREV MTOT REAL COL 43 48
ATTRIBUTE RATE_OF_PAY ABBREV RATE REAL COL 49 52
ATTRIBUTE HOURS_TO_DATE ABBREV TOTH REAL COL 53 58
Periodically, someone at the university monitors the academic standing
of all student employees by running a PL1022 program (WARNEM.DMC) that
extracts information from STDNTS.DMS and WRKRS.DMS and writes it to a
DIF file (WARNEM.DIF) that is then down-loaded to a personal computer
and read into a spreadsheet.
WARNEM.DMC and a sample of its output (WARNEM.DIF) are reproduced
below.
WARNEM.DMC
!WARNEM.DMC locates the student employees whose GPA's
!have fallen below 3.5 and writes their names, ID's,
!current GPA's, and total hours worked to date to
!the file WARNEM.DIF.
OPEN STDNTS WRKRS.
JOIN STDNTS WRKRS VIA ID.
DBSET WRKRS.
FIND ALL.
SORT LN.
LET SYSIFTYPE 1.
INIT DIF NCOLS 5 2 WARNEM.DIF. !We only need 5 columns
!to hold the data
PL START.
PRINT ON 2 SYSDATE.
REPEAT
GETREC LEAVE.
IF 1.GPA LT 3.5 THEN
PRINT ON 2 LN FN ID 1.GPA MTOT+TOTH.
ENDIF.
UNTIL 1 EQ 2. !Or until we run out of records
PL END.
Page 15
RELEASE 2.
WARNEM.DIF
TABLE
0,1
""
VECTORS