Report No. IAEA - R - 4169-F TITLE Development of a personal computer-based state system of accounting for/and control of nuclear materials. FINAL REPORT FOR THE PERIOD 1985-07-01 1986-06-30 AUTHOR(S) Dr. Markov, A. INSTITUTE Committee on Peaceful Uses of Atomic Energy, Dept, of Nuclear Safety Computer Centre of the Dept. of Nuclear Safety and Safeguards Sofia, Bulgaria INTERNATIONAL ATOMIC ENERGY AGENCY DATE September 1986
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Report No. IAEA - R - 4169-F
TITLE
Development of a personal computer-based state system of accountingfor/and control of nuclear materials.
FINAL REPORT FOR THE PERIOD
1985-07-01 1986-06-30
AUTHOR(S)
Dr. Markov, A.
INSTITUTE
Committee on Peaceful Uses of Atomic Energy, Dept, of Nuclear SafetyComputer Centre of the Dept. of Nuclear Safety and Safeguards
Sofia, Bulgaria
INTERNATIONAL ATOMIC ENERGY AGENCY
DATE September 1986
L _ . i :i ; V
BULGARIAN COMMITTEE ON USE OF ATOMIC ENERGY FOR PEACEFUL PURPOSES
Department of Nuclear Safety and Safeguards
Research Contract No 4169/RB
Development
of a Personal Computer Based
State System
of
Accounting -for and Control of
Nuclear Materials CSSAC)
Final Report
Time period covered: 01.07.85 - 3O.O9.B6
Chief Scientific Investigator: Dr. A. Markov
Sofia, September 1986
TABLE OF CONTENTS
I. Beneral
II. Description of research carried out
III. Results obtained
IV. Conclusions drown
Page
3
6
15
17
I. General
1. Introduction
This document, is prepared as a -final report on Research
Project NO. 4.169/RP "State System o-f Accounting -for and Control
of nuclear materials <SSAC)" by the Department of Nuclear Safety
and Safeguards, Committee on Use of Atomic Energy -for Peaceful
Purposes, Bulgaria. It covers the fifteen months progress on
the project, namely from July 1985 to September 19S6.
During the stated period of time the major efforts were
directed towards the fallowing items:
- Definition of Requirements;
- Establishment of Hardware Configuration;
- Acquisition of Software;
- Creation of Algorithm and Programming;
- Test of the System with Control Examples;
- Creation of a SSAC System Documentation.
A brief introduction to these items is given below.
?.. Definition of Requirements
The current reporting obligations as pertaining to the
INFCIRC/153 from State Authority to the IAEA is based on th»
harclcopy format. As a consequence the data have to b» manually
re-entered at the JAHA into the ISIS data base, followed by
add i t. i (.mal time-consuming error checks as well as quality control.
A PC based SSAC not only may improve reporting, but may as well
contribute to:
- Saving of time and additional manual efforts;
- Reduction of transcription errors;
- Allow the State Authority to use it for its own
national accounting system.
In future the SSAC may be expanded in different ways to suit
the particular needs of any State Authority reporting under the
same requirements. Now, in this Project, a base level is aimed at
an efficient interface between the State level and the Agency with
an IBM PC, taken as a suitable computer for the needs of a
Member State with small-scale nuclear activity. The results could
be offered cost—free to any Member States as an inexpensive
solution to meet their reporting requirements.
2.1 Design specification
The computer system, which was determined to accomplish the
given requirements i & reposed to be an IBM PC in the frame work
of this project. The project is expected to answer questions
about:
- Minimum amount of operative and external memory;
- Abilities for short and long term data storage;
- Physical data carrier for data transport -from the State
to the IAEA, which will meet the needs of both sides
involved;
- Data format on the physical carrier;
- Data security.
These questions are in direct connection with the planned
implementation. The IBM PC will be used to concentrate the
storage and retrieval of data. Reports will be computer—compiled
with minimum of manual interference using the database created.
II. Description of research carried out
1. Introduction
The Personal Computer Based State System of Accounting for
and Conl.ru] of Nuclear Materials (PC SSAC) , developed under
Research Contract No 4169/RB aims at a computerized data
processing at State level to enter and save safeguards reports, and
to record these reports on a physical carrier - diskette, in order
to be transmitted to the IAEA for further direct processing in the
Department of Safeguards ISIS. The system is built on an IBM PC.
Within the framework of the national SSAC, the system to be
developed is a component of the full SSAC, i.e. the State level
SSAC as described in STR-166.
During the reporting period a progress was made in the
following project areas:
- Definition of Requirements;
- Establishment of Hardware Configuration;
- Acquisition of Software;
- Introduction with the Personal Computer Technique and
Software;
- Configuration and Software Selection;
- Programming;
- Test and Adjustment o-f the System;
Conf iguring u-f Lhe System;
Creating of a Documentation with the following Chapters:
a) i'iii i i.le to Applications ~ a topic in which are discussed
the probable application -fields o-f SSftC and the methods and
ways to achieve the Safeguards goals.
b) Operator's Guide - application where it is shown how to
maintain the system and how to use its functional
capabilities.This guide is oriented directly to a particular
user in an understandable -form.
c) Programmer's Guide - gives a description of the system on
source module level. It is addressed to professionals, who
should deal with the system adaptation to some other
possible conditions and requirements.
2. Definition of Requirements
The Personal Computer Based SSAC aims at computerization of
the State level Safeguards functions. The system has to be
applicable to any Member State with small-scale nuclear activity,
which is currently reporting on a hardcopy formats and whose amount
of data to be reported does not warrant a large computer system.
This will enable the Safeguards Information Treatment Division
to reduce manual efforts for entering data into the ISIS data base.
data base. At the same time it is expected to decrease the
•frequency o-f transcr i pLicm errors.
An additional benefit of a PC based system is its much lower
cost as compared to that of large computer centers. To this
contributes the portability of the PC based systems which may be
of a particular interest to the developing countries.
Since the project aims at the State Level SSAC only (as
described in STR—166) it must be regarded as a major component o-f
the SSAC.
2.1 System Structure and Interconnections betweenComponents
The system is physically located at the State Authority. Other
components o-f the -full SSAC may be located at the Facility. The
input to the system consists of data which the -facilities supply to
the State Authority to generate the reports to the IAEA. The output
from the system includes the following reportss
— Physical Inventory Lists;
— Material Balance Reports;
— Inventory Change Reports.
— Concise Notes
The data is stored in the system either on diskettes or on
hard disk (see Safeguards Report Editor,State Level SSAC 1.0 -
"User Manual").
The output is -formatted and copied onto a physical carrier
suitable -for mailing to the IAEA. The currently -foreseen magnetic
medium is a 5 1/4 diskette. The format of the records complies
with the current Code 10. At the same time a printout may
be generated for filing. During the trial a second copy may be
mailed to the IAEA along with the diskettes.
From a functional point of view the system is built of the
following components:
— Input processing;
- Output processing.
The input data are received from the facilities, as it is
required by the regulations established. The data is currently
typed-in on the PC keyboard with a full set of control software
the Safeguards Report Editor, State Level SSAC 1.0. Each file
record corresponds to one report line.
Using the tool of default header and entry line it is
possible to decrease the quantity of the input information.
In fact the system works with files in sequential access.
The system is alike to a te>:t editor with output on a
magnetic disk and printer. A special part of the Editor's
program converts the file structure from a sequential to
random accuse. and prepares the diskette for transmission to
IAEA.
10
2.2 External Constraints
Due to the specifics of the computer technique, some
constraints are imposed on the input to and the output from the
system. The input forms are filled by a responsible officer at the
State Authority, using the data from the facilities, where the it
originates. The forms suit the computer input data entry
requirements. This is not an additional difficulty since the
forms used are as recommended by Code 10 and in STR—165.
The output files are in ASCII format (PC DOS input files) on
the physical carrier (diskette) so that they can be read into the
IAEA Information System by means of standard PC DOS.
The physical carrier proposed is a 5 1/4 inch 360 Kb diskette,
double sided, double density. It must be pre-formatted on the IBM
PC with the standard formatting procedure.
2.3 Data life-span (retention period) in the System
Under current agreement INFCIRC/153 it is necessary for the
State Authority to maintain the safeguards data -five years
aiter thu country's responsibility for the nuclear materials
expired. I li.?nc:Ks the data life-span in the system depends on the type
o-f tlie f ai: i. I i ti <?s un dur the jurisdiction of the State Authority
For a NPS with F'WR type reactors, as is the case in Bulgaria,the
life-span is estimated at 15 years. The preliminary data volume
in the system after 15 years of operation amounts is estimated to
12 Mb approximately.
3. Design Specifications
3.1 Flow Evaluation
During the reporting period more then 120 reports with at
least 10000 entry lines were sent to the IAEA. Minor errors were
detected- only, e.g. missing "COUNTRY CODE", some wrong letters in
the "Material Description Code" column or other matters of minor
importance which are quite visible and were corrected by the SGIT.
The average input rate was 1400-1500 report lines per month
(112000 - 120000 bytes per month).
11
3.2 Software Functions
The • software operates in the style of fool-proof,
user-friendly turn-on-key system. That means that the computer
operator is not requested to possess special knowledge in the
computer field.
The software -functions are developed on the "menu" basis.
The menu is a set ai options with a short description., shown at
any step during thß input", or output operations,
Tht; ruftwcire is developed using the IBM PC Disk Operating
System (PC DUG), thrc UîM PC BASIC .Interpreter and IBM PC Basic
Compiler (see Safeguards Report Editor, State Level SSAC 1.0 -
"User Manual").
3.3 Data Security Measures
For a 15 year long data-retention period special measures have
to be taken to preserve the information. These may include:
- Periodic backup of all diskettes;
- Archiving printout copies for re-input and data
recovery in case of damaged diskettes;
- Computer service routines to ensure the readability of the
diskettes and their compatibility with the disk drives.
3.4 Minimum and Optimum Hardware Configuration
For the normal operations of the State Level SSAC the hardware
configuration must include at least the following:
- IBM PC with at least 256 K memory installed;
- One double-sided 5 1/4 inch diskette drive and adaptor;
- One personal computer color display and adaptor;
- Printer and interface.
This minimum hardware ensures the operation oí the system
but entail-'i additional difficulties as lower speed due to permanent
diskettes interchange. The following configuration is recommended
for better efficiency and is considered an optimum:
- IBM PC with 256 K memory installed;
- Two double-sided S 1/4 inch diskette drives and adaptor
or one double-sided 5 1/4 inch diskette drive and adaptor
and one 10 MB hard disk and adaptor;
- One personal computer color display and adaptor;
- Printer and interface.
There is no special need -for an arithmetic co-processor since
the software developed does not per-form -float point arithmetic
operations, but its presence does not inter-fere with the
processing.
3.5 Software Requirements
It was expected that the system would be built with minimum
recurring to high-level programming languages by utilizing the
•following commercial program products:
- IBM PC Disk Operating System (PC DOS), version 2.0 or
higher;
- IBM PC BASIC Interpreter and IBM PC Basic Compiler.
14
ft Th(:> -f une Li uns of the SSAC are implemented within thi
programming capabilities of the IBM PC DOS .
III. Results Obtained15
1. Status o-f Implementation and next Steps Planned
1.1 Present Status of Hardware Configuration
During the reporting period two IBM PC were acquired in the
following configuration:
- IBM PC with 640 Kb installed memory;
- RBB color/graphics monitor and adaptor;
- Two 5 1/4 inch double—side disk drives and adaptor;
- Dot-matri« printer and interface;
- Hard disk and adaptor.
The IBM PC's were installed and tested. The staff acquired
the basic skills to handle them.
1.2 Present Status of Software Acquired
The IBM PC's were delivered with PC DOS version 2.10, IBM PC
BASIC Interpreter and IBM PC BASIC Compiler. The staff is already
using DOS and is in the process of a full scale utilization of the
BASIC packages.
Some official efforts were conducted to send ICR, PIL *nd MBR
reports to the IAEA on diskettes. The files were composed by
means of the IBM PC DOS only. The results were estimated «s
successful. The reports sent on diskettes were successfully
read by the Department of Safeguards at the IAEA.
17IV. Conclusions drawn
1. The evaluation of the work thus far yields:
- A significant improvement of the accounting for and
control o-f Lhe work at the -facility;
- A decreased error rate during the preparation and
compilation of the reports;
- Increasing the reliability of the information in th»
reports;
- Improving the timeliness of the reports to the IAEA.
Furthermore, it is expected that these reports sre now being
processed at the IAEA with reduced manpower.
2. Views of system development in the post-contract period
Future system expansion could be expected in two general
directions:
Expansion of the system towards a facility-based SSAC
component with expected inspector functions and efficiency
improvement.
An expansion towards facility-based SSAC may contribute to
the inspectors efficiency. With specially designed programs the
18data base can be checked and differences listed. The inspector
may have its own diskettes with checking programs, which started
on the IBM PC at the Facility can scroll all the data base,,
extract and check the records needed. The potential exists to
connected directly an inspector's -field computer for retrieving and
process.! ng of data to this system.
3. System Portability
The planned system portability is ensured by the two major
features:
- The hardware is based on world wide recognized industrial
standards - the IBM PC, together with its operational
system IBM PC DOS. The program portability is based on
this operational system. In this way, any computer compatible
with this standard on hardware level could run the program
system;
- The utilized commercial software consists of original
professional products. The software developed <the Safeguards
Report Editor, State Level SSAC 1.0) is delivered as
object and source files on the distribution diskette. The
IBM PC BASIC Compiler was used to prepare the compact
executable object module of the Editor's program. That
guarantees the operation of the execution module under
IBM PC DOS. It is expected that future versions', of the
IBM PC will directly permit the execution of the object
module. If it is necessary a programmer may use the
"Programmer's Guide" (Safeguards Report Editor, State Level
i9SSAC 1.0, "User Guide", Chapter 3) to adapt the software
with minimal efforts to trim it to future new environment.
Hence the developed SSAC practically will be portable on the
two levais, i.e. the J!BM PC hardware level and the commercial
IBM PC DOS and BASIC software package level.
4. Summary
An original system for automatic input, control and output is
created. The system uses the wide-spread standard IBM PC
configuration and a high level IBM PC BASIC Compiler. Data is input
manually only once and is output in the CODE-10 -format. This
make easy later data shipping to the IAEA on a diskette media and
process it there without additional manual efforts. The system
does not consider the quality of the input data. The quality must
be a care of the responsible officer at the State Authority,, who
delivers the data for computer treatment and for long-term keeping
(archiving).
The software developed is actually an editor with complete set
of functions to edit ICR, PIL, MBR and Concise Note reports.No
special qualification is necessary to be acquired by the operative
staff at the State Authority and the technical maintenance of the
system is easy.
Using the default parameters in the header and line entry when
typing reports, the manually input information is minimized.-The
use of the functional keys makes the operator's efforts easier. The
output information is recorded on disks and may be saved there
during the retention period, thus replacing the printed archive.
Reports can be printed only if necessary. The established data
format oi- the disk-hold reports is as pertained to Code 10 and is
directly compatible with the diskette input at the IAEA. Some
extension of the system could be made in the direction towards the
facility level which may contribute to the efficiency of the
inspections.
20
The User Manual of the developed Safeguards Report Editor,
State Level SSAC 1.0 is attached to this Final Report.
BULGARIAN COMMITTEE ON USE OF ATOMIC ENERGY FOR PEACEFUL PURPOSES
Department of Nuclear Safety and Safeguards
SAFEGUARDS REPORT EDITOR
STATE LEVEL SSAC 1.0
User manual
by Velian G. Veleff
Prepared for the International Atomic Energy Agency
under research Contract No 4169/RB
Sofia, September 1986
TABUE OF CONTENTS
P*gi
PREFACE 4
CHAPTER 1. Guide ta applications 6
Introduction 6
How to apply the Editor 7
Hardware and software requirements 8
Data life-span (retention period) 10
in the System
Data Security Measures 10
System Portability - 10
System management 11
Connecting the Editor to other 13
computer systems
CHAPTER 2. Operator's guide
Introduction
How to install the Editor
How to start the Editor
Main menu options
Disk menu options
Report identifiers
How to edit a report
How to print a report
How to prepare a report for
transmission to the IAEA
How to archive a report
Default lines tool
14
14
IS
18
19
21
22
23
26
26
27
28
CHAPTER 3. Programmer's guide
Introduction
Program description
Program logics
Compiling and linking
Testing
29
29
29
32
34
35
APPENDIX. Lists and listings
Diskettes directories
Lists o-f the symbolic -files
Source code listing
Examples o-f printed reports
36
36
38
52
66
PREFACE
TIúrs document is prepared as a part of the -final report onResearch Project NO. 4169/RB, "State System of Accounting for andControl of Nuclear Materials (SSAC)", between the InternationalM:amic F.nprcjy Agency, Vienna and the Committee an Use of AtomicE noryy for Peaceful. Purposes, Bulgaria. It describes theSafeguards Rnpcirt l.:,.di tor, State Level SSAC 1.0 - - -ogram for IBMPC, which is developed as a result of the Contract. The programpermits to enter data for the reports submitted to the IAEA fromthe State Authority. Once the data is entered in the PC, it can beedited, error corrected, printed, archived and stored on diskette,which to be shipped to the IAEA instead of the usual typed forms.In this way during the process of reporting to the IAEA, whichstarts at the Member State and finishes in the Agency ISIS database, data is entered manually only once.
The Safeguards Editor is designed to be helpful tool to everyMember Stats» (with small-scale nuclear activity) in its reporting.It improves reporting, and as well contributes to:
- Saving of time and additional manual efforts;- Reduction of transcription errors;- Allow the State Authority to incorporate it in its own
national accounting system as an interface with the IAEA.
Thus User manual is designed to describe three differentviewpoints at the Safeguards Report Editor. First of all is how toapply the program. Chapter 1 is expected to answer this question.It describes the abilities of the Safeguards Report Editor, itsplace in the National SSAC, the IBM PC hardware configuration andsoftware requirements, the working place organization etc.
Chapter 2 describes how to use the program. It is directedto the IBM PC operator and is a guide to install and start theEditor, to use the keyboard, printer and disks, to prepare archivediskettes, to prepare and archive reports.
Since ' a programmer's activity in a Member State may be» animprovement of the Editor for the specific needs of the StateAuthority, a detailed description of the program itself is given inChapter 3. The Editor is programmed in IBM PC BASIC and, havingin mind the possibility quoted, the author has tried to use themost common program organization, without "programmer's tricks".Thus, a college is welcome to revise the Editor, remarks andquestions are accepted thankfully, help is offered at any tim«. Alisting of the program source codes is given in the Appendix.
The Safeguards Report Editor, State Level SSAC 1.0 is offeredcost-free to any Member Statte as an inexpensive solution to meetits reporting requirements.
Any mistakes, programming bugs or remarks to improving theperformance of the Editor and documentation, are kindly requestedat the following addresss
Committee on Use of Atomic Energy -forP n A c (-> f i .11 PurposesDept. of Nuclear Safety and SafeguardsSofia, Bulgaria,
talcos the obligation to support the program *nddocumentât)on cost-free.
CHAPTER 1. GUIDE TD APPLICATIONS
Introduction
lin-: Safeyuarcl«s Report Editor - State Level SSAC 1.0 is aprotu um, flo!»itinr?cl for IBM PC, which computerises the process ofprtiparmy roport(:> of tvpe ICR (Inventory Change Report), MBR(Material Balance Report), PIL (Physical Inventory List) andConcise Notes. Usually these reports are written manually on a•form, then typed, error checked and corrected and the hardcopy islater shipped to the IAEA, in accordance with the reportingobligation oí any Member State as pertaining to the INFCIRC/133. Bythe aid o-f the Editor these tasks can be done using theabilities o-f the IBM PC. They include initial keyboard data entry,screen editing, saving reports on disk thus -forming archive,printing reports in the -format prescribed (Fig. 1). Finally,reports can be recorded on a physical carrier - diskette, inorder to be shipped to the IAEA -for further direct processing inthe Department o-f Safeguards ISIS. So the Editor also enablesthe Sa-feguards Information Treatment Division (IAEA) to reducemanual efforts for entering data into the ISIS data base:
Keyboardentry
SG Editor
-> Archive on disketteor hard disk
• —> Printout
-> Diskette for shippingto the IAEA
Fig. 1. Report processing
The benefits of the application of thatobvious and may be systematized as follows:
techniques are
Compact working place, including archive on disks;Diminished manual operations;Faster retrieval of reports;Printing reports only when necessary;Reporting on diskettes, which saves additional typing inthe IAEA;Low cost/benefit ratio due to the use of personal computerand cost-free software.
20
All these features are directed to improve accounting systemsboth on national and international level.
Haw to apply the Editor
The Editor can be applied in any Member State with small-scale nuclear activity, which usually reports on a hardcopy-formats and whose amount of report data docs not warrant a largecomputer system.
From a system point of view, the Safeguards Report Editor is acomponent of the State level SSAC as described in STR-166 (Fig.2). It automates the working place of a professional typist whois obliged to type reports, matching exactly the source forms,composed by a responsible officer, in accordance with theregulations of the State Authority. The same officer may organizethe ways of identifying reports, error check feedback,. archivastructure and its supporting. He is who issues orders to recordreports on diskette, and ships it to the IAEA Department ofSafeguards.
Officer in chargewith SG
report•forms, 3
reports on diskette for IAEAprintouts
Typist
SQ Editor >{ Anc—L_Archiv« ondisk
Fig. 2. Safeguards Report Editor application in a SSAC
The professional typist is responsible for the quality of alloperations, in accordance with the regulations issued for theworking place. He is who receives the report forms, enters data inthe PC, corrects errors, archives reports, periodically checks the
8
archive and deletes reports which have passed their life «pan inthe SSAC. To -ful-fill his duty the professional typist uses only thePersonal computer and the Safeguards Report Editor.
The working p.I. ace may be situated either at the State level,or at V.IK? Facility lisvel. That depends only on the decision of theState Authority. It looks preferable to -fit the automation in theestablished structure instead of revising the structure speciallyfor th/il' purpose.
Hardware and software requirements
To apply the Safeguards Report Editor - State Level SSAC 1.0an IBM PC or IBM PC/XT personal computer is needed with thefollowing minimal configuration:
- 256 K memory;- one disk drive;- color monitor and adaptor;- printer (132 characters per line).
Although this configuration is sufficient to run or adapt theEditor, it seems better to use somewhat larger configuration foreasier operation:
- 256 K memory;- two disk drives ar one disk drive and one hard diskj- color monitor and adaptor;- printer (132 characters per line).
The advantages of the larger configuration are essential whenarchiving or during retrieval of reports. In fact, the Editoras program takes a small amount of memory, about 50 K. At starting,the program is loaded once into the PC memory and resides there allthe time. However, during execution the program reads and writesdata from and to the disk intensively. It is more convenient tohave separate disk drives as 'input and output devices since someoperations demand two different disks to be prsent simultaniously.
If a hard disk configuration ic used the SafeguardsReport Editor program and the archive may reside an it. The systemis more compact and is in disposition at any time. The diskdrive is used only to record reports on diskettes in order to beshipped .to the IAEA.
If a two disk drive configuration is available the Editor mayuse them as separate disk input and output devices. Retrievingof reports from the archive may only demand diskette interchange onthe input drive.
In case of one disk configuration, the drive is the onlydevice for both disk input and output. Then any preparatory diskoperation (formatting, diskette copying etc.) will imply diskettesinterchange, in addition to the Editor's functions.
In all o-f the cited con-figurations the execution speed o-f theEditor's programs i5 equal, since it operates in the computermemory. Difficulties arise only for the PC operator, who has tointerchange diskettes at PC DOS prompts i-f the minimalcon-figuration is in use.
Thern is no need for an arithmetic co-processor since no -floatpoint operations art? included, neither it will improve theperiormancR of the Editor. Still its presence may be implied byother 11)1*1 PH ti y 7¡t em software, which has to be taken into account.
The Snff.)cji..u\rr:lc.-. Report. Editor is distributed on one diskettewhich con Lains al] program and auxiliary files, but no PC DOB•files. It cannot be directly started . An executable diskette hasto be prepared. Special programs sire designed (which resides alsoon the distribution diskette) which install the Editor on anexecutable diskette or on hard disk. The installation is anoperation performed only once and after that the Editor may be run-from the new diskette/hard disk any time.
To run the Safeguards Report Editor the PC DOS standardoperating system for IBM PC is needed. Its version may be 2.0 orhigher. The Editor is a program written in Basic language. Itis distributed as a compiled and linked executable module. The IBMPC disk operating system is sufficient to run this module.
If a programmer has to adapt the Editor for a specificrequest in a particular Member State, then the IBM PC BasicInterpreter and IBM PC Basic Compiler are requested in addition.The distribution diskette contains the source code of the Editor.It can be edited with any symbolic editor, but it seems preferableto edit it with the Basic Interpreter because it permits simpletesting. When the Editor is run under the Basic Interpreter, theperformance is a bit slowly, but it can be easily traced and thesource codes corrected. Finally, the program source codes has tobe compiled to increase the speed and simplicity o-f execution. Fordetailed description of the editing, testing, compiling and linkingrefer to IBM PC "Basic" and IBM PC "Basic Compiler System"(Personal Computer Hardware Reference Library)
To operate with the Safeguards Report Editor a minimumknowledge -about computers is expected. It can be achieved from thestandard handbooks for IBM PC "Guide to operations" and IBMPC "Disk operating system" (IBM Personal Computer HardwareReference Library).
10
D*t* life-span (retention period) in the System
Under current TNFniRC/153-type agreement it is necessary forthe Statt? Authority to maintain the safeguards data five ye*»**after Lhf? country's responsibility for the nuclear materialsexpired. Honre, the data life-span in the system depends on thetype nf thp> facilities under the jurisdiction of the StateAuthor i I/. Tor a NPB with PWR type reactors, as is the case inBulgaria, tliR .life-span is estimated at 15 years. The preliminaryestimate of data volume in the systom after 15 years of operationamounts to 12 Mb approK i mately.
Data Security Measures
For a 15 year long data-retention period special measureshave to be taken to preserve the information. These may include:
- Periodic backup of all diskettes/hard disk;- Archiving printout copies for re-input and data
recovery in case of damaged diskettes;- Standard computer service routines to ensure the
readability of the diskettes and their compatibility withthe disk drives.
System Portability
features:The system portability is ensured by the two major
- The hardware is based on world wide recognized industrialstandards - the IBM PC, together with its standard operatingsystem PC DOS. The program portability is based on thisoperating system. In this way, any computer compatible withthis standard on hardware level could run the program system;
The Basic language has no standard yet. Hence the sourcecode of the Editor may not be portable to other computers thanIBM PC. The case is somewhat different with the executionmodule of the Editor. Even if the rapid development ofcomputer technique brings the personal computer to a newlevel of hardware, the late experience furnishes the belief
If
that such program products will be upward compatible. Atleast it will be possible to transfer data in a -fixed -formatto the new hardware. The Editor is designed to store all datain the standard ASCII data -format, arranged according toCode 10.
Hence an SSAC using the Sa-feguards Report Editor will bepractically portable on the two levels, i.e. the PC hardware leveland the npwrating system level adapting upward compatibility. Incase oí an onUirely new hardware and software established in the•future 15 vt'are, there still remains the ability to transfer thearchive to this new onvj runment.
System management
According to Code 10, report forms and coding of every reportis unique. This feature is mapped in the Safeguards Report Editorreport identifying. The reports of one type (e.g. ICR) haveimperative identifying prefix among the following:
- ICR for Inventory Change Report;- MBR for Material Balance Report;- PIL for Physical Inventory List;- CSN for Concise Note.
Different reports of one type are marked with additional foursymbols - digits and/or upper case letters (e.g. ICR145C) . TheEditor ignores any other identifiers.
Once a report is entered, it can be retrieved only by itsidentifier. It seems logical to code the arbitrary four digits ofthe identifier with the report number, since this number must alsobe unique. This is not a constraint - any other coding of thesefour digits is acceptable.
Operating with the Editor three types of diskettes are used«
- SSAC diskette, which is prepared during installation andcontains the program and auxiliaries;
- carrier diskette, which is designated to ship onto reportsto the IAEA;
- archive diskettes, which contain the reports.
In case of a hard disk installation only carrier diskettes «reused, since the Editor system and the archive resides on the harddisk.
The Editor is started from the SSAC diskette. During theprocess of typing and error correcting of a report, it seemssuitable, to store the report on the SSAC diskette. When thereport is ready, with no errors, it has to be archived and recorded
on the carrier diskette and becan be printed, if necessary,Editor.
shipped to the IAEA. A hardcopyusing the print option of the
An archiving system may inquire that each archive diskettecontains reports of one type, originating from one materialbalance area. Then, any archive diskette has to be labeled in *proper way. The label may include the identifier of the materialbalance area, typ« of the report, report numbers and date etc.,data I.IVTVI is unique for the content of the diskette.Periodically the archive diskettes have to be checked andeventually rfi--wri tt.r?n for safety.
After a report is; archived, it can be deleted from the SSACdiskette to free space for future report editing. This operationis left to be done with the PC DOS functions in order to seemdifferent and exclusive to the PC operator. That improve« thereliability.
If a hard disk is available, it can be used as space for theEditor itself, for the currently edited report and -for the archive.In such a case the report identifier must code the material balancearea, which for is the report. The report is automaticallyarchived and no special operations are necessary. A rule tosupport the archive has to be issued, as for example periodicprintout of the hard disk directory , sorted in types of reportsand in material balance areas. This operations are also left to befulfilled with the PC DOS functions .
The hard disk also has to be backuped periodically , -forsafety.
When the life span of a particular report has run out it canbe deleted from the archive. This procedure has to be underthe control of the responsible officer in the State Authority.
An estimation of the volume of diskette or hard disk indisposition for report saving may be derived approximately, using
DISK VOLUME (in bytes)/(REPORT AVERAGE NUMBER OF LINES * 82)
For ̂ example a 362 K diskette may hold about 70 reports with 65lines in average.
13
Connecting the Editor to other computer system*
Sine:» t.htí SaffiaufiriJs report editor is a program written inBasic i I may be revised by a programmer and be connected toother cuinf'utBr syïîtems. The source codes of the program mrmincluded in the distribution diskette.
' are several ways to connectThay may be.» classified as:
the Editor to other
- internal, proyram connection;- connection to programs in other computer.
Internal program connection is the case when another programsystem -for IBM PC is in use already, and its -functions *rm ofinterest to be added to the Safeguards Report Editor. The link maybe done on the input data level. For example, if a data baseexists, partly holding report data, a retrieval mediatingprogram may be created to input data into the Editor. The latterthen is used to add lacking data manually and further to processthe report. The mediating program may be of type 'pre-processor',fetching data item by item, for example. The Editor may beexpanded, even other functions included. It is quite possible toincorporate the entire algorithm of other programs .
Connecting the Safeguards Report Editor to ot^er computers isthe case when the IBM PC is either planned to be an intelligentterminal to a bigger host computer, or is the host itself,receiving data from other terminals. The link in this case may beestablished on both input and output data level. An interfaceprogram has to be designed, controlling the RS 232 port ofthe IBM PC, to handle the link between the host and theterminal(s). ( This is easily programmed in Basic.) Then the casereduces to the former one of internal program connection.
However, any changes in the source codes and functions of theEditor must be done by a trained programmer.
CHAPTER 2. OPERATOR'S GUIDE
Introduction
IIK: K..H; aguarda Rraport Editor is designed to help editing andarchi.vi.ny State levnl Sa-feguard Reports, which are sent to theInternational Atomic finer g y Agency. The reports in scope *reii
Further on a detailed description of how to operate withthe Editor is described. Since the program is dedicated to IBM PC(or PC/XT) -for better understanding it seems advisory to be•familiar with the IBM PC supporting documents "Guide tooperations" and "Disk operating system" (IBM Personal ComputerHardware Reference Library).
The -files of the Editor have to be installed -from thedistribution diskette to prepare an executable copy. This must bethe -first operation, then the Editor may be run.
A brie-f description o-f how to operate with the Editor isat disposition as a file on the distribution diskette and may beused as help. It can be displayed on the screen of the PC orprinted. The file name is README.DOC and after installation alsoresides on the SSAC diskette/hard disk.
How to install the Editor
Thi» Safeguards Report Editor - State Level SSAC 1.0 i*distributed on one 5 1/4 diskettes in the -format of IBM I*C(PC/xn PC DOS. Its label is:
Safeguards Report Editor 1.0 - Distribution diskette.
Check the contant of the distribution diskette for integrity.Start the computer with DOS, place the diskette in drive At and atDOS prompt A> type
DIR
Compare the directory displayed with that shown in Appendix.If there Are differences refer to the Distributor.
The Safeguards Report Editor cannot be started from thedistribution diskette. It must be installed on your computer. Theminimal hardware you need is 256 K memory, color display, 132column printer and at least one disk drive. Better performance isachieved if two disk drives are available or one disk drive andhard disk. You do not need a co-processor, but if present it docsnot interfere.
The installation depends on the configuration you have. If nohard disk is available, the Editor will be installed on a diskette.Otherwise an installation on the hard disk is preferable. These twooperations differs a little and Are described separately.
Installation on diskette
1. Start the computer with DOS diskette in drive A:
2.-Type at DOS prompt A>
FORMAT B:/S
This command invokes formatting of a diskette and writing onthe DOS system files. When prompted from the command, place a newdiskette in drive B: (if your PC has only one drive, interchangediskettes) and press a key. Formatting starts and upon its end thequality of the result is displayed on the screen. I" too many badplaces »re found on the diskette, try the operation with anotherone. Otherwise exit the format command.
3. At DOS promptA: and type
INSTALD
A> place the distribution diskette in drive
This command invokes the special diskette installationprogram. Fallow the explanation displayed on the screen. During the
Default Xines tool
process the number o-f -files copied on the diskette is shown on thescreen. If one disk drive is available interchange diskette» whenprompted, remembering that the distribution diskette is referred asin drive A: and thß new diskette as in drive B:. When theinstallation finishes label the new diskette as SSAC. Thi« name isfurther un used to refer to the diskette with installed SafeguardsReport Editor.
Chock thß integr i ty of the SSAC diskette, fitplace» Ihn SîjflO diskette? in drives A: and type
DOS prompt >
Compare the displayed directory with that shown in Appendix.If some differences are found, refer to the Distributor.
Before any other operation with the SSAC diskette, make workcopies of it. This can be done in the following way:
X. Place the SSAC diskette in drive A: and press Alt-Ctrl-Delto restart DOS from the new diskette. After a while a greetingappears on the screen, displaying the SSAC diskette options.
2. Press Ctrl-Broak to exit to DOS.
3. At DOS prompt A> type
DOUBLE
This command invokes the special copy program which formats adiskette and after that copies all the files of the SSAC disketteon it. When prompted place the DOS diskette in drive B: to loadand run the FORMAT program. It asks for the diskette that willbe formatted. Place the diskette which will hold the copy indrive B: and press ENTER key. When formatting finishes,itdisplays the amount of memory available. If too many bad placesare found, try the operation on another diskette. If not, thenexit formatting. Then copying starts displaying the number- offiles Which are copied. The Job terminates at DOS prompt >.Remove the new diskette and do not forget to label it as work copy.Check that the copy is correct.
4. Place the original diskette in a safe place and use it onlyas original to prepare work diskettes.
The SSAC diskette is ready now and The Safeguards ReportEditor may be started.
Installation on a hard disk
It is advisory to install the Safeguards Report Editor in aseparate subdirectory on the hard disk. That makes possible to holdall the archive on it. If ths Editor is installed in the rootdirectory a limited number of reports can be saved there.
So, first prspare a new subdirectory using th« "makedirectory" command. For example, start DOS and at prompt C> enter
MKDIR SG
This will create a subdirectory named SG. Next theinstallation may begin. The name SG will be used for thesubdirectory further on.
1. At DOS prompt C> enter the new subdirectory typing
CD SG
Now the SG subdirectory is the current directory.
2. Place the distribution diskette in drive A: and change thedefault disk drive typing
A:
3 At DOS prompt A> start the hard disk installation programtyping
INSTALH
Follow the explanation displayed on the screen. If O.K., thenpress a key and start the installation. The number of files copiedare shown on the screen. Upon exit the installation is ready. Checkthe integrit'y of the installed files. Make current directory againSG typing
C:
Then type DIR. Compare the displayed directory with that shownin Appendix. If there are differences refer to the Distributor.
If you want to make the Editor autostarting an AUTOEXEC.BATfile have to be created in the root directory of disk C:. Use anysymbolic editor to create it, EDLIN for example. This file may haveany other commands, but to autostart the Safeguards Report Editorthe last two lines must be
PATH SG
SSAC
Once written in the root directory, the file AUTOEXEC.BAT,which is a batch program, is executed any time the DOS is startedfrom the hard disk. So the Editor will be automatically started.
How to start th» Editor
You can start the Safeguards Report Editor either from diskdriv» or from a hard disk, depending on the type of installation.
If you have a diskette installation ,diskette in drive As and turn on the power,already, press Alt-Ctrl-Del keys.
placé the SSACIf th» power is on
If you want to start the Editor from a hard disk and have noAUTOEXEC.BAT file prepared to autostart the Editor, make first thecurrent directory that of the installed Editor. For example
1. Press Alt-Ctrl-Del to start DOC from drive C:
2. Type
CD SG
Then at DOS prompt > type
SSAC
If you have prepared an AUTOEXEC.BAT file in the rootdirectory of drive C: the above shown operations arts not necessary.
Any time you start the PC in this way a greeting of theSafeguards Report Editor will appear on the screen:
SSAC Safeguards Report Editor 1.0You can read instructions if You type READMEIf You want to copy SSAC on a diskette type DOUBLEIf You want to prepare an archive diskette type ARCHIVNext the SSAC will be loaded
PAUSE .. (Press Ctrl-Break keys to exit to DOS)
You see, the proposal gives you options to read briefinstructions how to use the Editor, to copy the SSAC files intoanother diskette, to prepare an archive diskette, where to storereports, to the start the Editor or to exit to DOS.
Unless you want to start the Editor you have to exit to DOSin order to run the.other options. Tf you have chosen to exit toDOS press Ctrl-Break keys and terminate the batch job. Do notforget that any command you type -for DOS must be entered with theEnter (Return) key.
To start the Editor press any key, as prompted. After awhil» the Safeguards Report Editor's Main menu appears on thescreen.
You are not forced to restart, ths PC with Alt-Ctrl-Del keysalways. If DOS is already loaded and the prompt > is on the screen(providing th» default drive and subdirectory are correct) startth» Editor typing
SSAC
19
This same procedure you may applyafter execution o-f the options proposed.
to restart the Editor
Main menu options
The Main menu appears on the '-screen in two cases - when th«Editor starts, and after any option is completed.
Safeguards Report Editor
State Level SSAC 1.0
Main menu
1 Create new Report2 Edit old Report3 Print Report4 Prepare Report -for transmission5 Edit de-fault header and line6 Disk drives ta files Menu7 Exit the Editor
SELECT OPTION NUMBER 1..7 » _
Input disk drives A Output disk drive:A
To select an option type its number. If you choose options1..5 you will be asked for the Report identifier. This is the wayto relocate a report. Option 6 chosen switches screens to ths Diskmenu. Option 7 returns to DOS.
For betterthe terms used:
understanding the following definitions describe
A new report is a report that is notinput, nor on the output disk.
stored either on thi
An old report is a report that is already stored on disk,•dit it the report must reside on the input disk.
Te
Input disk drive is the drive shown with letter on the menu.It can be changed (A..P) via Disk menu. It is the device where froman old report is read to be later edited, printed or recorded on *diskette to be transmitted to the IAEA.
20
Output disk drive is the drive shown with letter on the menu.It can be changed (A..P) via Disk menu. It i* the device where ona report is stored after editing or when recorded on a diskette tobe shipped to the IAEA,
r>ys;'..Kn> disk is the* device where from the Editor i« started,and the SSAC diskette programs reside. It may be disk drive or h*rddisk and rannot be changed once the Editor is loaded. It is used tosave da-fault line« and auxiliary files for the Editor.
To « v u a report means to write it on the output disk. If theinput and output c I i -r. I •: drives coincides an aid report is updatedduring the saving operation. If a r«p«rt has been edited and is notsaved, the editing is lost and the report is not updated.
To print a report means to read it from the input disk driveand to print it on the printer in the prescribed form.
To prepare report for transmission means to read it from theinput disk drive and to record it on a diskette in the output diskdrive, which will later be shipped to the IAEA. The diskette mustbe formatted, you may use the ARCHIV program for that purpose. Thefile recorded on it cannot be used as input in the Editor.
To archive a report means to save it for a long time. Thereport must remain unchanged once archived. The operationspermitted are print and edit without save (look through).
Default header and line are auxiliary tools in the editingprocess. Every report has one header line and up to 99 lineentries. If a new line (header or line entry) is introduced in *report, the default is proposed to be edited. Using this toolshortens usually repeating items in report.
Disk directory is the list of report files on a diskette/harddisk.
Report file is the record of a report, stored on disk. It isrelocated with its identifier and extension. The extension of theinternal (archive) files is .INT, of the external (transmit) filesis . XMT .
The report identifier is composed from an abbreviation of thereport type (ICR, MBR, PIL, CSN) and up to four uppercase lettersor/and digits (A..Z,O..9).
During some operations messages appear on the last row of thescreen. These messages warn to wait, show the process, display theresult of the process or ask for intervention. They state clearwhat is to be, or must be done and here they will not be commented.
34
the PC, corrects errors, archives reports, periodically checks thi
21
Disk menu options
The:? Disk inr?nu siipears ran the screen i-f Option ¿> is chosen•from the Main menu. Upon execution of its options 1..4 the Diskmenu re-appears. If Option S is chosen, screens are switched andMain incinu appears again.
Safeguards Report Editor
State Level SSAC 1.0
Disk menu
1 Select input disk drive (A..P)2 Select output disk drive (A..P)3 List input disk drive directory4 List output disk drive directory5 Return to Main menu
SELECT OPTION NUMBER 1..5
Input disk drive:A Output disk drive:A
To select an option press its number.
Input and output disk drives may be selected separately. Anytime you press number key 1 or 2 next disk is chosen -from A to P.You can see that shown on the screen. Next after disk P selectedMill be disk A again. When you exit Disk menu the selected diskdrives are stored and will appear as defaults next time you startthe Editor.
The drive directory list is shown by type of reports (ICR,MBR, PIL and CSN -for Concise notes). If you want to list thecontent of a diskette, place the diskette in a chosen disk driveand select the proper list option. Note, you can list only theinternal type report files (extension .INT). In other words, t h w «may be other files on the diskette/hard disk, but they *rm notshown. If you want to see them all, exit the Editor and U M DOScommand DIR at DOS prompt >.
operation (-formatting, diskette copying etc.) will imply diskettesinterchange, in addition to the Editor's -functions.
T"22
Report identifiers
A report exists in th«s Safeguards Report Editor system onlyi-f a report file with a proper identifier is saved on disk.The identifier is attached to the report when it is created as new.Then, any attempt to find the report asks for its identifier. Tworeportr. with "ñame identifiers on one? and the same disk ar« notpermitted «IIKI the Editor rejects the request.
The report identifier consist of 4 to 7 digits. The firstthree digits are fixed and show the type of the report;
ICR for Inventory change report;MBR for Material balance report;PIL for Physical inventory list;CSN for Concise note.
Pay attention when coding. You cannot edit a PIL report witha MBR identifier, for example. These are two different reports andthe Editor takes by default the requisites and distribution for thereport, coded in the identifier.
The other 1 to 4 digits may be any combination with uppercase letters and the digits from 0 to 9. For example
ICR1A22 ICRC MBR123D PILI2 CSNREPA CSN4
are valid identifiers, and
QPR ICR ICR.1 MBR 22 PIL12345 CSN1S3-
»re not valid identifiers and will be rejected by the Editor.
When options 1 to 4 are chosen from the Main menu a promptappears asking for the report identifier. It has to be enteredfrom the keyboard. You may use the alphanumeric keys to entersymbols. You can edit the identifier also with the special keys:
Key
DELINSBks
Function
Deletes the symbol above the cursorToggle insert mode - all typed symbols are inserted(Backstep) deletes the symbol left of the cursor(Right arrow) moves the cursor right(Left arrow) moves the cursor left.
To enter the identifier press Enter key. If it is not áproper code, the Editor beeps and leaves you to correct it.
In case you want to escape the operation and choose anotheroption press ESC.
2.5
If you want to edit the de-fault lines (Option 5, Main minu),the Editor asks -for the report TYPE identi-fier - the abbreviation•for the report type ICR, MBR, PIL or CSN. Three symbols arepermitted only, and they must be among the shown abbreviations.
How to edit a report
Select proper disk drives -first, via Disk menu,list of reports on the selected disk drives.
Look at the
Choose Option 1 for a new report or Option 2 -for an oldreport. Then, enter the identifier. For a new report th»identifier must not coincide with one existing on the output diskdrive. For an old one, it must exist on the input disk drive, andmay exist on the output one (i-f it does, it may be overwritten).
A while after you enter the identifier the Line Edit Screenappears. In the left upper corner you see the identifier, in theright one the line number is shown. (The header line, is markedwith HEAD). Down left the number of lines read for an oldreport are written. Down right the special keys »re showns
Key Function
F9FIOAlt-Q
Inserts a default line, after the shown lineDeletes the shown lineEnds editing.
The screen shows all the items of the line for the specifiedreport. To the right of the text a field is shown, which has to befilled with the proper data. Defaults are shown for a new line,the existing data - for an old one. The cursor is at th« firstfield.
Now press the TAB key several times. You see the cursorjumping from field to field. Keep on pressing TAB. The cursormoves around, field by field, from the last one to the first.Pressing Shift-TAB reverses the movement.
Now press the Right arrow key (->). The cursor moves rightone step. At the end of the current field it jumps to the nextone. If you press the Left arrow key (<-) the cursor moves leftone step. You can move around all fields with these keys, step bystep.
Choose a field and a position in it. Type any symbol fromthe alphanumeric keyboard. Move left one step and press DEL key.
24
The symbol is deleted. You can delete the symbol above the cursorwith the DEL key. Type two symbols. Press the Backspace key. Thesymbol to the left of the cursor is erased.
Press the INS key. The cursor changes to a small square.That mfiHns "Jnsort mode". Any symbols typed in Insert mode »reinserted at Lht? position of the cursor. Try it. If you press theINS key «iiiain, or if the cursor passes to the next -field, theInsert morir! chanyes to normal >
Now L-.ypt-> any l.e::t. until the -field is full. The cursorautomatically .jumps to I:he neüt field, and from the last to the•first field.
Using the alphanumeric keyboard and the speci~" lit keys youcan edit the line shown at the screen. You can fill the fieldpartially, then jump to the next field, jump over a default datathat matches the data that must stay in the field. When the lineis ready to be remembered, press Enter key. You enter the line inthe report. The next line appears on the screen. If the line wasthe header, next will be an Entry line. It has a differentdistribution by fields, corresponding to the type of the document.You can edit it the same way, then enter it. Try that on severallines. Remember that you can enter a line wherever the cursor is,e.g. you have to fill the line to the last data in the form youhave been given to type, but you can jump over the matchingdefaults. (Spaces can also be defaults, don't they, if nothing isto be filled in the particular field.) Misprints and errors can beeasily corrected before entering the line.
Two things are surely useful. The Line entry number isautomatically fetched and the column 80 number as well. You betterjump over them.
Now press the Upward arrow key. The previous line comesback. Press the Downward arrow key. Next line comes on thescreen. You can go back and forth line by line with these keys,select a line and edit it. The editing will be remembered if youpress the Enter key. Try it. Select an existing line, typesomething and go back and forth one line. The new text is lost.
It appears now, that the problem is how to select a line, orbetter say, to cast a look at the whole document and find ifsomething is wrong. Press the ESC key. Screen is switched to theCode 10 Screen.
The Code 10 Screen shows the same report in another format.Each line has 80 symbols and represents the separate fields on theLine Edit Screen without spaces between them. This is just whatCode 10 prescribes.
The cursor stays at the line which was just shown at theLine Edit Screen. You cannot move the cursor inside the line,neither you can edit any item in it. But you can select a linemoving the cursor up and down. Press again the ESC key and theselected line appears in the Line Edit Screen. You can edit itnow, knowing the meaning of all fields.
Switch again to Code 10 Screen. Move inside the reportlines. Press the F9 key (down left, in the special keyboard). Anew line is inserted after the selected line, and all the lines are
suitable, to store the report" on"her.port i. ready, with no errors, lt îï'
renumbered. Do it again until the screen -fills. You se«, thescreen scrolls down. To edit a document with more then 23 lin»*would bo a tiresome task, if the lines are selected step by step.Using the PgUp and PgDn keys moves the report up *nd down by XT.1ines.
Se leset: again a line and press the FiO key. The lin« i*deleted and the rest are renumbered. All the lines can be deletede :•: c e p L. the h a « d e r.
Thy 1-9 and FIO lírjys may be used in both Line Edit and Code 10Screens.
That is all about editing. When the report is ready to besaved press Alt-Q. This stands for "End o-f Edit". The Editor asksto save the report i-f at least one symbol is changed in it.Con-firm with Y, otherwise the editing is lost.
An empty new report is not saved. An unchanged report may besaved in order to be added to the archive, for example.
Jumps the cursor to next fieldJumps the cursor to the previous fieldMoves the cursor right one spaceMoves the cursor left one spaceMoves the cursor up one lineMoves the cursor down one lineScrolls the report 12 lines upScrolls the report 12 lines downDeletes the symbol above the cursorErases the symbol left of the cursorToggles Insert modeInserts one line after the selectedDeletes one line (the selected)Switches Line Edit and Code 10 ScreensEnds edit - next is Save report
26
How to print a report
Select, nropw input tllsk drive -first. Look at the list oíreparts on the selected disk drive. Turn on the printer and -feedit with paper.
i-i Option 3 of the Main menu. Enter the reporti dent i fi ur. On.lv an uld report can be printed. After a while t h erep or I: |'> r :i. n I: b RÇJ i n s.
Reports are printed in accordance with the specific forms forthe report type:
Report
ICRFIL-MERCSN
Form
R.01.1/cR.02/CR.03
Reports are printed by pages. Each page has a header partand maximum 35 lines. Each page is numerated. On the last'page amessage is printed, showing the number of lines and pages printed.
Examples are shown in Appendix.
How to prepare a report for transmission to -the IAEA
A formatted diskette is requested. It can be prepared with theARCHIV program (SSAC Safeguards Report Editor 1.0).If you havenone, start the IBM PC and run the ARCHIV program. It formatsdiskettes in PC DOS standard. Then start again the SafeguardsReport Editor.
Select proper disk drives first via Disk menu. Look at thelist of reports to be sure that the report is on the input diskdrive. The output disk drive must be A: or B: and must bedifferent from the input one. The diskette prepared fortransmission must be placed there .(If your installation is adiskette one and you have only one disk drive, then wait to beprompted to place the diskette in the drive.)
Select Option 4 from the Main menu. Enter the reportidentifier. The report will be read into the Editor, then recordedon the special diskette. Then it may be shipped to the IAEA.Remember, you cannot read back the report from this diskette.
27
How to archive a report
A r»»port is archived after it is sent to IAEA. To archivemeans to <7-wn h he report on a diskette/hard disk, and later beused to tv> rr-vu.l only.
If a tJiskfite .'\e-t:h¡. vi? is preferred, an archive diskette mustbe initially formatted in PC HUB standard, labeled and usedexclusively for archiving. You can format it with the ARCHIVprogram <SSAC Safeguards Report Editor 1.0).
Select the proper archive diskette. Select also the diskettewith the report. Start the Safeguards Report Editor. Select th«proper drives. Place the input diskette in the» input disk drive,and the archive diskette in the output disk drive. Choose Option 2(Edit old Report). Enter the report identifier. Up to here theoperations are as for editing an old report. The Line Edit Screenappears. Do not edit the report - exit edit and save the report.The report is recorded on the archive diskette.
Remove the archive diskette from the drive and place it intothe archive box. Do not keep other diskettes there, you can easilymake a mistake.
To save place in your work copy of the SSAC Safeguards ReportEditor 1.0 you have to delete from it the report just archived. Donot postpone this operation, do it immediately.
Exit the Editor. Place the work diskette in the system diskdrive. Type at DOS prompt >
DEL <report identifier>.INT
Enter the command. That is all. An exampli
DEL PIL136.INT
will delete the report PIL136.
If you have a hard disk, there is no need to archiva. Simplydo not use the report otherwise but for read operations.
To support the archive some rules must be obeyed.Periodically read the archive diskettes. Enter the reports in th*Editor and save them again on another diskette. That ensures youthat the information will not be damaged.
28
In case of a hard disk, dump the whole hard disk oncemonthly, for example.
Remember that the «rchive must last several years!
Default lines tool
To «ycli t th(t> dcsfault lines choosR choose Option 5 -from the Mainmenu. Enter the report type identifier (ICR, MBR, PIL or CSN).After a while the Line Edit Screen appears with the dor-faultheader loaded. Press ESC and look at the Code 10 Screen. Therearc? two lines only. First is the default header, the second thedefault line for line entry. Press ESC again and edit them. Whenready, press Alt-Q to end edit. The default lines will b»saved automatically on the SSftC diskette-
It is useful to place in the default header the country code,facility code and the report period and number. In this way youcan save this data on the SSftC diskette. After some experience touse the Editor is acquired you can find the best way to use thistool yourself.
Warning! Do not edit the column 80 number. It is used always,and it identifies the type of the report line at the IAEA.
This command invokes the special diskette installationprogram. Follow the explanation displayed on ths screen. During th«
CHAPTER 3. PROGRAMMER'S GUIDE
Introduction
i'l !<_• ür.i-f eguards Report Editorprogr-m wn t t m in BASIC -for (BM PC
i;;e the rtspori:inrj to IAEA,
State Level SSAC 1.0 is a(PC/XT). Its aim is to
including:
- Initial report typing;- Error correction;- Report printing;- Report recording on diskette to be shipped to the IAEA;- Report archiving .
The program system is distributed on one diskette in PC DOS•format. The source codes of the Editor's programs ar» includedinthe distribution diskette. Listing o-f the source codes is shownin Appendi:;.
Here, in this Chapter, the program is described together withits auxiliaries. The description is aimed to experiencedprogrammers, acquainted with tht= IBM PC DOS, IBM PC BASICInterpreter and IBM PC BASIC Compiler, in order to help if anymodifications of the Editor have to be performed to meet aspecific need of a particular Member State.
Program description
The Safeguards Report Editor - State Level SSAC 1.0 residesin source codes as an ASCII file on the distribution diskette.The file is named
SSAC.BAS
The file can be edited with any ASCII symbolic editor able tohandle 256 symbols in a line. A suitable editor may be the IBM PCBASIC Interpreter, because of its properties for testing theprogram and to correct the errors. If you want to edit the sourcecodes, copy the source fila on a separate diskette, for safety.
To meet the speed requirements, the Editor is not executedunder the IBM PC BASIC Interpreter. It is compiled and linked.The execution module resides also on the distribution diskette.The file is named
SSAC.EXE
directory" command. For example, start DOS and at prompt C> enter
MKDIR SG
30
The Editor cannot be executed -from the distribution diskette.To make an execution copy it must bf? installed (see also Chapter 2.Operator's guide). In the process of installation some auxiliary•files are renamed and a new -file is created with the name SSAC.DEFwhich dnR'3 not (.••«int. ori the dir.tr i but i on diskette. Check thedistribution (SŒD1TD1S01 ) and exécutable diskette <SSAC)/h»rd disk(SSACHARDOl) directorios in Appendix. Listings o-f the installationprogram1.-. (TN3TAI...D and INSTALH) are also shown in Appendix. Theysimply copy the complete set of -files on a diskette or on a harddisk, fiivi.nu i.u some o-f them suitable names. Last, a basic program,compiled and linked, is executed (SSACD or SSACH) which creates thed(?fau.|i; disk iJrivi.'s; description file. The files that -form theEditor's program sysLem are:
SSAC.EXE - The Safeguards Report Editor executable program
SSAC.DEF - Default disk drives description -file, ASCII
ICR.RESMBR.RESPIL.RESCSN.RES
ICR.PTRMBR.PTRPIL.PTRCSN.PTR
— Screen distribution description files, ASCII
Printed form's header description files, ASCII
During execution the Editor uses as data the ASCIIsequential files with extensions .RES, .PTR and .DEF. Theymust reside on the same diskette/hard disk as SSAC.EXE. After theEditor is installed some more files are present which haveauxiliary functions:
AUTOEXEC.BAT - Autostarting batch program for the SSAC.EXEARCHIV.BAT - Batch program formatting a new disketteD0UBLE.BAT - Batch program copying the Editor systemREADME.EXE - Paginating program, displaying the help fileREADME.DOC - Help file with short description.
Listings of these files are also included in Appendix. Theprogram README.EXE is written in BASIC, but is included as anexecutable module, compiled and linked.
Two other type of files are produced and used when the Editoris executed - the .INT and . XMT files. They have compositenames of 4 to 7 digits, the fist three corresponding to the reporttype (ICR, MBR, PIL and CSN) and the rest four identifying *report of that type.
The .INT ASCII sequential files hold the report data and.XMT ASCII direct access files are output to diskettes that *rmshipped to the IAEA instead of the usual paper hardcopy format.
The following flow-chart shows the role of the ASCII auxiliaryfiles and the output files.
DisplayI
Keyhonrcl U—
play ]I
< -jFil« .RESj
— >-| SSAC.EXE 1
U -pile .PTR|¿
| Printer ]
Fil« .INT
.XMTI
Flow-chart o-f the rol« o-f th» auxiliary f i les in the Editor.
32
Program logics
Thi- program Safeguards Report Editor 1.0 is designed withoutany programmer's tricks as using POKE or CALL statements. It iswritten in IHM PC BASIC not using any exotic abilities. Sincethe Editior i i--. of a screen type, screen text commands and functionsart? used (f.fjl'íl XM, COLOR, LOCATE', WIDTH). A variety of input-outputcommand;- and functions are? also used in conjunction with thekeyboard input, scrtíf-jn output and file management. An specificerror handler is also i incorporated using ON ERROR statement andRESUME and RESUME n. There are parts of the program, located assubprograms with different exit points, hence RETURN n statement isalso used as well as GOSUB n. Enumeration analysis is programmedby the statement ON i GOTO nl,n2,.. . Errors are sound markedwith BEEP, as well as PRINT CHR*<7). The symbol analysis is codedwith variables rather than ASCII decimal number for betterunderstanding. The program deals with three types of variables- integer, string and logical - and simple integer arithmetic,string and logic operations and functions. That is why anarithmetic co-processor cannot contribute to execution speed evenif supported by the IBM PC BASIC interpreter and compiler.
The program is structured, each separate part having its ownpurpose. At the beginning, an initiating section (100 — ISO)defines global variables arrays , sets initial values, clears textscreens and activates the error handler. This part is executedonce at start.
I Start 1
i:I Initiation!
i * 1
I Main menu J 1
**
—>-j Transm. report I- >•
—>-|Edit default 1 >
>-|Disk menu 1 >•
Program flow-chart of th« Editor
At line ISO the program switches to the Main menu section<2000 - 2330). There the main menu is displayed, option number is
input and analysed switching to separate sections. Options 1..4are switched throuc.ih a common section (2530 - 2630), which entersthe rRport identifier and tests the existence of the report, usingthe error handler.
Option 5 of the Main menu switches to the edit default linessection (2060 - 7900). There the default lines «re prepared to b«edit, A -fl.-Aii is fired to mark the return in the »dit section andcan I ml i ••• |i'->«-.«*c;cl l:o the edit section.
th.> Hain nmnu runs the Disk menu section (2250 -d almost f?qui\l. ly as the Main menu handler using
Op'1 Loii 62520) . It i <•; dite«t screen 3.
Report printing is relocated in section 2640 - 2B00. Th«file of type .PTR for the specified report is read, then the headerpart of the form is printed adding the variables of the report.After this operation the line entries are printed in the form,their actual places inside the row taken from the distribution data(file of type .RES).
The output on a diskette for transmission to the IAEA is donein section 2810 - 2850. ft direct access file of type .XMT isopened on the output disk drive, and the data buffer (BUFF*) i«written in it.
Most significant section of the program, hence slightlycomplicated., is the actual edit section (200 - 1800). It dealswith two screens (0 and 1) simultaneously and reads the keyboard.This part of the program is almost independent as subprogram, butis not designed in that style. It is entered with COTO 2Ó0 andrecirculate until Alt-Q key is read, then exits via exit editmodule (1730 - 1800) where the report saving on disk is organized.
The actual editing starts after the following internalconventions:
- distribution data file (xxx.RES) is read in the buffers;- old report data is read in BUFF* array, and last linenumber is updated (NBUFM); if the report is a new oneNBUFM is set to zero; this is performed by the disk inputSubroutine (1550 - 1630).
The section uses the variables NBUF for current line number(zero is the header line of the report) and NRSC1 for currentscreen row number. Current screen distribution data and texts *rmloaded intoSC(i,j) and TEXT*(j), i=0..5, J-O..N, the currentvalues handled by the Line Screen distribution switch subroutine(1650 -1950). The distribution data are coded as follows (se* aleoAppendix,for the .RES files list):
47
34
Inde;-:
O.1.
Meaning
Row on screenColumn un I.he screen for the textNumbrar of symbols in the textNumber of symbols in the entry -fieldPi'-.p I .\reiiwni. in the buffer BUFF» as in CodiPosit: i tin in the printed form
10
The value N is r«ad from thu .RES file for each report typeand represents the number of items in the header line or in lin*entry.
The edit section first displays the distributed data on theLine Edit screen (screen 0) or change them (header — line) ifnecessary. Then in a cyclic way reads a symbol from thekeyboard and interprets it. For that purpose separate smallsections are designed, clearly commented in the program sourcecodes (see Appendix). Due to the incorporated switch of the screensfrom Line Edit to Code 10, all operations with line as a whole areperformed on bath screens 0 «nd 1.
Some parts of the program are IBM PC configuration dependant.At line 160 input and output disk drives default are read from thefile 5SAC.DEF, created during installation. At lines 2440 - 2450the printer is fixed to LPT1: and is supposed to be able to print132 character per line. Some difficulties arise if a singlefloppy disk configuration is used. To overpass them before any fileopening the cursor is located at the left upper corner of thescreen. In a single disk drive configuration during this operationa prompt is displayed to interchange diskettes. It is, thus, shownat a defined place on the screen and does not interfere with therest. After the OPEN statement the prompt is cleared from thescreen.
Compiling and linking
The program has to be compiled to acquire execution speed.Best results are found if the compilation is done with option forBASCOM.LIB library:
BASCOM SSAC;/X/O
Option /X permits compiling the ON ERROR , RESUME Cn3 andRETURN CnD statements. Option /0 forces BASCOM.LIB librarylinking, thus forming a compact execution module.
To link the object module use the standard IBM PC LINKmodule:
LINK SSAC;
48
35
The resulting execution module is SSAC.EXE. For more detailsabout compiling and linking re-fer to IBM PC "Basic Compiler System"and IBM PC "Disk Operating System" (Personal Computer HardwareReference; I ibrary).
To run th« rww module SSAC.EXE copy it on a SSAC diskette,thus ropl fu'.inci the? foisting one, and start the Editor, as describedin Chiipi.i-M '•-, Operator's guide. Advisory is to prepare a SSACdiskei I:P i ni.tí!.i, 1 ing the Editor on a diskette even if you have aharn di si:, corrí içiurali on Vo avoid esventual break of the runningSSAC.
Testing
The program can be tested in two different ways. If it isexecuted under BASIC Interpreter, it runs slowly but permitsquick editing. The edit process is faster. It is thepreferable way while some corrections are performed.
The real test includes speed also. Then the program mustcompiled and linked., the execution module be run.
be
The test includes all functions described in the Operator'sguide, Chapter 2.
For more details about editing and run of a program underBASIC Interpreter refer to IBM PC "BASIC" (Personal ComputerHardware Reference Library).
3í
APPENDIX. Lists and listings
Diskette directories
The date and the time o-f recording are don't mind.
Directory of the; distribution diskette
DJ r (:\. 1 or vVnl umt> i nARCHIVAUTOCSNPCSNRDOUBLEICRPICRRINSTALDINSTALHMBRPMBRRPILPPILRREADMEREADMESSACSSACSSACDSSACH
m m . r m > LUI PT Key laown lETt, in me »pitiii ntyooirai, tnew line is inserted after the selected line, »nd »11 the line« a n
38
Lists o-f the symbolic -Files
The -files of type .RES hold the data for the Line EditingScreen rli str i but i. on. Thnv have two parts - one for the header line*nd on i ; for tho line entry of the report. Each part begins withline counter (counting from zero) and the default line enclosed in
3, 30,"Country code:"4, 30,"Facility code:"6, 30,"MBA code:"3,102,"Beginning date of period covered3,116,"Ending date of period covered6,-77,"Number of line entries:"4, 79,"Report number:"0,130,"Col. 80s"
(YYMMDD)i"<YYMMDD)i"
9, 1,21, 8,21,9,40,25, 4,29,L, 1,21, 4,33,r 4 a « "vr
6,13, 3, 65,"Beginning date of period covered (YYMMDD):"6,19, 3, 79,"Ending date of period covered (YYMMDD)i"3,25, 6,-49, "Number o-f line entries:"4,70, 4, 51,"Report number:"USO, 0, 8Í.J, "Col . 80:"
"Entry number:""Conti nuation:""Entry name:"" F1 Kinon t : ""I1 l(.!ii)'.ínt weight:11 Un its s""Fissile isotope'Isotope codes""Concise notei"'Correction'Correction'Col. 80s"
3, 30,"Country codes"4, 30,"Facility code:"6, 30,"MBA codes"3, 55, "Date o-f Physical Inventory taken (YYMMDD) s "6,-52,"Number oí line entries:"4, 55,"Report number:"0, 99,"Col. 80:"
4,"Entry numbers"9,"Continuations"12,"KMP Codes"16,"Name/number of batchs"27, "Number o-f items in batchs"34,"Material description:"40,"Element:"44,"Element weight:"54,"Units:"60,"Fissile isotope weight (uranium only) (g):'73,"Isotope code:"77,"Measurement basis:"81,"Concise note:"86,"Correction to — report number:"93,"Correction to - entry number:"9B,"Col. B0:"
40
File CSN.RES (SSAC)
5, "HiG DG -B6-
6,6,6,»,10,12,
2,13, 2, 1, 3, 30,"Country code:"
25,26, 4, 3, 3, A/,"Attached to report numbers"60, P, 6, 7, Z, 8 0 , "Ei«Les "1., I '1, '!, J. ••, 4 , :?.O, " I- *<::: i ] i t y c o d e : "S, 1,1/,6. S, I,00, 0,0,"C
30, "("IRA codesV9,"Col. 80:"
5, 1,10, i, 1, 2,"Col. No 1:"7, 1,28, 4, 2, 6,"Material Balance Area (NBA):'9, 1,26, 4~, 6, 15, "Attached to Report number:"
11, 1,27, 2,10,23,"Entry number in the Report:"14', 1, 5,68,12,29, "Text:"16, 1,11 i 1,80,98,"Col. No 80:"
COUNTRY:FACILITY!
MATERIAL BALANCE AREA:
INVENTORY CHAN6E REPORT IICR) FOR« R.Ol.Wc
I PEBOID COVERED BY REPORT: froi! REPORT No.
to
Page No. of pages I SIGNATURE
¡CIiOlINI¡T! BATE OF
ENTRY IN!INVENTORY
No. ¡A! CHAN6EIT!¡II!O!IN!
i ¡NBA/COUNTRY
FRON TO
IN C
T V HY E AP N NE T B
O ERY
NAHE OR
NUMBER OF
BATCH
NUMBEROFITEMSIN
BATCH
DH EA ST CE RR II PATL I
0N
! ACCOUNTANCY DATA !
1 E1 L1 E1 K1 E1 N1 T
!"=
NEIHGT OF
ELEMENT
=========
uN*T
Kg
g
HEIGHT OFFISSILEISOTOPES
(URANIUM ONLY)Cg)
======s±======
I !S 10 1T I0 1P IC 10 !D !
E :===
L
0NCISE
N0TE
SSS
CORRECTION 1
TO 1
REPORT
No.
ENTRY
No.
xsssr
n
13
'SI
ñ
o Ü-H gj
TT ri-ra•O O H0 -h 3-T mn-
rt -h0 3"^-13 II Hm m~ T ins* ni• - •0 0O T •+•D r t
rt+ •<
H O DJ T ¡D
Srt • •-i TJ:< - i - Irt 3" 7¡
mO 3"•* < oa, ^ri- T a~ H-
lu îi rtD" 3"
-h •- m•-• (D•-• r to ai«1 Si x
rt rti - O)ai o
!••• - h
m in3" rt-0 3 3"£ ID ID
¡a -oer m mm a T"-• 3o a a>£ c 3• s rg
3 fi-
3-
TJ mw. a3 IDft T
MATERIAL BALANCE REPORT (MBR) FOR« R.03
COUNTRY:FACILITY!
RATERIAL BALANCE AREA
=======================:1 I
¡Ci
IN!IT!Ill
ENTRY !N! ENTRY NAHE
No. !A!!T¡I I I
10!¡Ni
! REP0RTIN6 'fERQID ! froi! REPORT No.
to
: Page No. of pages i SIGNATURE:
cACCOUNTANCY DATA
KE!HST OF
ElEHENT
=;=====
HEI5HT OFFISSILEISOTOPES
(URANIUM ONLY)Ig)
=====5========
CORRECTION
TO
REPORT
No.
ENTRY
No.
•n1—»
(D
CO
tn
n
M
T\
PHYSICAL INVENTORY LISTING (PID FORK R.02/C
! COUNTRY:FACILITY:
HATERIAL BALANCE AREA:
==============DATEREPORT No.
! Page No. of pages ! SIGNATURE;===========================S====5
¡c: *:o: .:N; K!T! .¡I'. p
ENTRY1N! .
No. ¡A! C
:TI o¡I!iOiIN:
NAME OR
NUMBER CF
BATCH
NUMBEROFITEMSIN
BATCH
;=================:D
HEAST CE RR II PATL I0N
====
ELEMEU
T
===
—-- _ """""""
ACCOUNTANCY DATA
KE1H6T OF
ELEMENT
=========
UNT
T
Kg/9
HEIGHT OFFISSILEISOTOPES
(URANIUM ONLY)(g)
==={==============
J 1
S 10 '.T ¡
o :P !
c :O !
s :E Í
===!
===:c0NCISE
N0TE
===
CORREC"
TO
REPORT
No.
=======
IGN i
i
i
ENTRY!1
No. ;
= = = = = i
I D
T J
r^73
n
FACILITYMATERIAL
RATERIAL
BALANCE
AREA
BALANCE AREA:
¡REPORT
No.
ENTRY
No.
C O N C I S E N O T E
ATTACHED TO REPORT Ko.
SIENATUfiE:
T E X T
DATEnen
T3
7}
menn
45
The files o-f type .BAT are batch program* with auxilliary•functions. They must be ewecuted at PC DOS prompt > either -fromdrive A: or -from hard disk C;
File AUTOEXEC.BATdiskette.
(SSAC) - Autostarting the Editor -from a
echo of-fecho SSAC Safeguards Report Editor 1.0echo You can read instructions if You type READMEecho If You want to copy this diskette type DOUBLEecho If You want to prepare an archive diskette type ARCHIVecho Next the Editor will be startedPAUSE .. <Press Ctrl-Break keys to exit to DOS)SSAC
File ARCHIV.BATarchiving.
(SSAC) - Prepares a new diskette for
echo offecho SSAC Safeguards Report Editor 1.0echo ARCHIV program (Start it from drive A or C, not B)echoecho Formats an archive diskette for system SSAC 1.0echo Warning. All information of the new diskette will
destroyed,echoPAUSE ... (Press Ctrl-Break if You want to stop here)echo Place a DOS diskette in drive B:echo (If Your PC has only ONE disk drive, wait to be
prompted forecho drive B:)B:FORMAT B:echo Do not forget to label the new diskettes,echo If You like to start the Editor type SSAC.echo on
be
(2000 - 2330). There the main menu is displayed, option number is
46
File DOUBLE.BATdiskette.
(SSAC) - Copies the Editor's system on a new
echo offecho Sa-f(aguardo Report Editor 1.0tacho DOUBLE program (Start it from drive ft or C, not B)echo .echo Makes an entire; copy of the SYSTEM SSAC diskette.echo .rachu Warning. All information on the new diskette will bt
destroyed.pause ... (Preas Ctrl—Break if You want to stop here)echo Place a DOS diskette in drive B:echa (If Your PC has only ONE disk drive, wait to be
prompted forecho drive B:)pauseBsFORMAT B:/Secho Do not forget to label the new diskettes.COPY DOUBLE.BAT B:COPY ARCHIV.BAT B:COPY README.EXE B:COPY README.DOC B:COPY AUTOEXEC.BAT B:COPY ICR.« B:COPY MBR.* B:COPY PIL.* B:COPY CSN.* B:COPY SSAC.EXE BsCOPY SSAC.DEF B:echo State level SSAC 1.0 is copied,echo on
File README.EXE (SSAC) - Types the help file on the screen bypages. The program is in BASIC and is compiled and linked.
1 CLOSE;KEY OFF: FOR 1 = 1 TO 10sKEY I,""sNEXTsCLS10 OPEN "A:README.DOC" FOR INPUT AS #120 E*="":1F EOF(l) THEN CLOSE #1:END ELSE LINE INPUT #i,E*30 IF MID*(E*,1,1)OCHR*(37) THEN PRINT MID* (E*5 1,70) s SOTO 2040 LOCATE 23,1,1:PRINT USINS "&";"PRESS ANY KEY TO CONTINUE";50 E*=INKEY*:IF E*="" THEN 50 ELSE CLS:GOTO 20
47
File README.DDC (SSAC) - Help file
Safeguards Report Editor
State level SSAC 1.0
R U I " |H.i('if:.'!
Ttu» S;\f peinareis Ropnrt Editor is designed to help editingInventory chany« reports <ICR), Material balance report» (MBR>Physical inventory lists <PIL) and their Concise notes atState level according to the rules established by theInternational Atomic Energy Agency.
Application:
The Editor is a program, residing on one diskette -for IBMPC. It can be executed on any computar of typ* IBM PC or PC/XTunder PC DOS operating system, version 2.0 or higher. Theminimum hardware consists in 256 K memory and at least one floppydisk drive (5 1/4 inch). Optimal operation can be obtained if twofloppy disk drives ara available or one floppy disk drive and onehard disk. The better performance comes after an easier wayto save and manage reports on disk.
Short description:
By the aid of the Editor a report to IAEA of type ICR, MBR,PIL and their Concise note* may be edited, visually checked and theerrors be corrected, then saved on disk, printed or stored on adiskette which to be shipped to the IAEA instead of printedreports. In addition the Editor's disk functions make passible tolist the disk directory and look for a specific report or to copy areport from one disk to another in order to archive it.
The Editor system is distributed on one diskette an has to beinstalled before starting. Installation may be done on a disketteor on a hard disk. To start installation run one of the followingbatch programs:
INSTALD for installation on diskette, or
INSTALH for installation on hard disk.
The SSAC diskette starts automatically the Editor.Place the diskette in drive A and press Alt-Ctrl-Del. After awhile the Main menu comes on the screen. Remember, the SSACdiskette must reside in drive A: all the time.
For batterthe terms used:
understanding the following definitions describe
A new report is a report that is not stored either on theinput nor on the output disk.
An old report is a report that is already stored on disk. ' Toedit it the disk must be in the input disk drive.
A1
48
Input disk drive is the drive that is used to read an oldreport be-fore editing.
Output disk drive is the drive that is used to save theedited report. It may hi; UIIQ same as the input disk drive.
Do-faults are two linesline entry of the;any i n For mati on.i n & i"(.!|j(ji-t.
It i '.:• Li i» ö ful"Facility coda"
the header line of the report and theropori.. By default these lines may hold
Thin information will appear on any new lineThe? Editor permits this information to be edited.tool for constant entries as "Country code",isle. in the header or for "Date of inventory
change" in a group of line entries, for example. The defaultsare held unchanged until edited again. They can be edited ONLYBEFORE (not during) editing a report.
To save a report means to write it on the output disk. If areport is not saved, it is lost if it is a new one, or remainsunchanged on the input disk, if it is an old one. If input andOLitpLit disks coincides saving a report updates the existing one.'It is advisory to use coinciding input and output disk driveswhen editing a report to remove errors in order not to hold areport with errors in the SSAC . Different input and output disksis advisory to use when archiving reports.
To prepare a report for transmission means to «tore the reporton a diskette, which will later be shipped to the IAEA as media.The diskette must be formatted with the program ARCHIV (SSACdiskette). One report may be prepared for transmission more thanonce. When saved on disk the new one overwrites the old one.Before using this option place the special diskette in the outputdisk drive. The latter must be different from the input one. Incase of one diskette drive configuration with no hard disk, wait tobe prompted to put the diskette in the slot. .
Input and output disk drives can be selected separately amongdisks A, B, C...,P. The content of any diskette in the input oroutput disk drive can be separately listed. The list is groupedfor the different reports ICR, MBR, PIL or their Concise notes.
Performance:
When started the SSAC Editor displays a Main menu. Any optionfrom the menu can be chosen separately. Upon the end of the taskchosen the Main menu is displayed again. To stop working with th«Editor use "Exit Editor" option.
A secondary "Disk menu" option permits to toggle input andoutput disk drives and to list reports in diskette directory byreport types. Upon exit to the Main menu any changes of theselected drives are recorded and become defaults.
If a report is to be edited, printed or prepared fortransmission the Editor asks for its identifier. The reportidentifier must be unique - two different reports must nothave equal identifiers. The identifier itself consists of 4 to 7digits. The first 3 show the type of the report (ICR, MBR,PIL or CSN for Concise note). The other 4 »re used to differentiatereports. The type of the report in the identifier is fixed tothe shown above, and at least one more digit (letter or numeric
62
49
symbol) is imperative to be used. No spaces are permitted. If th«identifier entered is not correct the Editor beeps and doe» notaccept it. To edit the identifier Backspace, In*, Del andarrow kreys can be used to delete previous symbol, insert symbol,desletR current symbol or to move left or right on« step. Toreturn to the Main menu use ESC key - th« chosen option is lost«
When Edit options are chosen, the report with th«specified i dontifier is tested for existence and th« programsets thfi edit mode. The Line Editing Screen displays all items inthe header lines or th« entry line of the report. Using th«alphanumeric keys the text of the report line can be entered. Th«cursor automatically jumps to the next item. If the entry in afield is shorter then the field then using TAB key moves the cursorto the next field. Shift-TAB is used to jump the cursor backwardby fields. From the last field the cursor jumps to the first on«.To insert a symbol use INS key. To delete the previous symbol us«the Backspace key. To delete the current symbol use DEL key. Tomove the cursor right or left use the right or left arrow. Toenter a line use the ENTER (RETURN) key. If a previous or nextline have to be edited use the upward or downward arrows.With the PgUp and PgDn keys 12 lines up or down are scrolled.
If ESC key is pressed the Line Editing Screen is switched tothe Code 10 Screen and the report is shown without distribution infields. The distribution on the new screen is in Code 10' format.The cursor shows the line which has been edited. To select anotherline for editing move the cursor up or down using upward - downwardarrows or PgUp - PgDn keys. Use ESC key again to return to Lin«Editing Screen. 'The loaded line will be the line selected at th«Code 10 Screen.
To insert or delete lines use the function keys F9 and FIO.The header cannot be either inserted, nor deleted. The entry linesare automatically renumbered. These operations are available inboth screens.
To exit editing use Alt-Q keys. Then a question to savereport will appear. Answering yes with "Y" will save the report.Answering no with "N" will loose the editing and if the report isan old one it remains unchanged.
The same rules are in operation if Defaults &re edited. Theonly difference is that upon exit editing the default linesfor the specified type of report are ALWAYS stored on the SSACdiskette.
50
File INSTALD.BAT (DISTRIBUTION) - Batch program to install theEditor on diskette. Note, some -files are renamed duringinstallation.
echo offecho Safeguards Report Editor i.OE?cho Diskette Installation Program (start it -from drive Ai )echo .Echo This program installs the Editor on a formatted
cli. nUette.echo The diskette must be prepared with FQRMAT/S command <PC
DOS ) .echo If- You have no such diskette press Ctrl-Break and
prepare it.pause ..,,echo If Your PC has TWO diskette drives, place the DOSecho diskette in drive Bsecho If Your PC has only ONE diskette drive, follow the
prompts,echo having in mind that Your DOS is referred for
drive B:pausecopy b5command.com a:echo If Your PC has TWO diskette drives, place the -formattedecho diskette in drive B:echo If Your PC has only ONE diskette drive, -follow the
prompts,echo having in mind that Your new diskette is referred for
drive Bspauseecho Wait. The Editor's files »re transferred to diskette in
B:copy ssac.e«e bscopy icrr.doc b:icr.rescopy icrp.doc b:icr.ptrcopy mbrr.doc brmbr.rescopy mbrp.doc bsmbr.ptrcopy pilr.doc bspil.rescopy pilp.doc b:pil.ptrcopy csnr.doc b:csn.rescopy csnp.doc bscsn.ptrcopy readme.exe bscopy readme.doc b:copy auto.bat b:autoexec.batcopy archiv.bat b:copy double.bat b:ssacdecho .echo Now the new diskette is ready for use.echo To start it place it in drive A: and press Alt-Ctrl-Delecho To copy it use DOUBLE program,echo on
51
File SSACD.EXE (DISTRIBUTION) - Forms an installation -fil»SSAC.DEF with the? dR-fai.il.t disk drives. The program is in BASIC andis compiled and linked.
10 DBKI*=="ri":Drli:n3¡="B11:GPEN "B: SSAC. DEF"FOR OUTPUT AS
ttJ:PRJNT ttljDSKI*! PRINT #1,DSKO*sCLOSE #1:END
Filra JNSTALH.BAT (DISTRIBUTION) - Batch program to install theEditor on hard disk. Note, some -files are renamed duringi nst.al .1. >ali un.
Brno offecho Safeguards Report Editor 1.0echo Hard Disk Installation Programecho .echo This program installs the Editor on Hard Diskecho The Editor is installed in the current Ci disk
subdirectoryecho If You have not chosen the right subdirectory,echo press Ctrl-Break and change directory using CD command
(PC DOS),pauseecho Wait. The Editor's -files are transferred...copy ssac.ewe c:copy icrr.doc c:icr.rescopy icrp.doc c:icr.ptrcopy mbrr.doc c:nibr.rescopy mbrp.doc c;mbr.ptrcopy pilr.doc c:pil.rescopy pilp.doc c:pil.ptrcopy csnr.doc c:csn.rescopy csnp.doc cscsn.ptrcopy readme.e«e c:copy readme.doc c:copy archiv.bat c:ssachecho NOM the Editor is ready on Hard Disk,echo To start it type SSAC.echo Refer to User Suide to prepare AUTOEXEC.BATecho on
File SSACH.EXE (DISTRIBUTION) - Forms an installation fileSSAC.DEF with the default disk drives. The program is in BASIC andis compiled and linked.
10 DSKI**"C":DSKO*="C":OPEN "C:SSAC.DEF"FOR OUTPUT AS#1:PRINT HI,DSKI«:PRINT #1,DSKO*: CLOSE «liEND
52
Saure« code listing'
File SSAC.BAS (DISTRIBUTION)
1020
30
40
50
60
70
80
90
91
92
93
94
95
96
97
98
99
' *
'*
'*
'*
'*
'*
'*
'*9
V
Jt
9
5
>
7
9
9
Bul ciar i an Committee on the» Use o-f Atomic Energy -for PeacefulPurposes *
410 B*=INKEY*:IF B*="" THEN 410 ELSE IF LEN(B*)>1 THENB*=MID*<B$,2,1): GOTO 430
420 IF B«>=SPK* AND B*< = ZK* THEN 690 ELSE IF B*«TABK* THEN 720ELSE IF BÍ.-BSIÍ.* THEN 620 ELSE IF B*=CRK* THEN 760ELSE IF B*=ESC* THEN 540 ELSE BEEP:GOTO 410
430 IF B*=JNSK* THEN 590 ELSE IF B*=STABK* THEN 840ELSI- IF B*r>DELI<* THEN 640 ELSE IF B*=CUL* THEN 740EL SI?: If" K(*r=cUR'.ti THEN 670 ELSE IF B*=SAV* THEN 1730Ei.'àYi IF D*=CHR*(48> THEN STOP
440 IF B*-F9* THEN L 1.40 f-.LSE IF B*=F10* THEN 1240ELSE IF BSu-CUUtt THEN 890 ELSE IF B*=CUD* THEN 960ELSE IF B**PSU* THEN 980 ELSE IF B**PGD* THEN 1030ELSE BEEPsGOTO 410
450
460
470
480
490
500
510
520
530
540
550
560
****** KEYS
Alphanumeric keysfield
HANDLING
CR for enter line TAB for skip to next
570
580
590
600
610
620
630
640
' ESC switch screen INS insert symbol s-TAB for rever** TAB
' Bsp backspace F9 insert line FIO delete line
' Arrows to move left,right one space, up and down on* lin«
' PgUP, PgDn move 12 lines up or down
' Alt-Q exit edit Alt-B stop while edit Ctrl-Break brs*k
'***ESC*#*
ESCF=NOT ESCF:AAS«i-AASiVS«i-V6iIF NOT ESCF THENNRQWS=NROW:NCOLS«POS <D)
INSF=OsSCREEN 0,1,AAS,VS;IF ESCF THEN LOCATE NROWS,NCQLS,1,7,7:GOTO 410 ELSE LOCATE NRSC1,1,1,7,7
B*=INKEY*:IF B*="" THEN 560ELSE IF LEN(B*)>1 THEN B*=MID* (B*, 2, 1) t.GOTO 570ELSE IF B*=*ESC* THEN 540ELSE PRINT BEL*;:GOTO 560
IF B*=F9* THEN 1140 ELSE IF B*=F10* THEN 1240ELSE IF B*=CUU* THEN 890 ELSE IF B*=CUD* THEN 960ELSE IF B*=PGU* THEN 980 ELSE IF B4-PGD* THEN 1030ELSE IF B*=SAV* THEN 1730ELSE PRINT #2,CHR*(7>5iGQTO 560
'***INS***
INSF=NOT INSF:
IF INSF THEN LOCATE NR0W,,l,4,7 ELSE LOCATE NR0W,,l,7>7
GOTO 410
'»»»BACK STEP***
IF J«l THEN PRINT #2,BEL*:GOTO 400ELSE J-J-liIP-IP-liLOCATE NROW,NCOL+J-1,0
IP= IP+1 :J=J+1 :IF J<«NUM THEN LOCATE NROW,NCÜL+J-1,1¡GOTO 410ELSE 1 = 1 + 1 s IF I>N THEN 380 ELSE 390
>**# PRINT SYMBOL normal, insert mode **#
IF NOT (NSF OR NUI1-J=0 THEN MID*<BUF«,IP.1>«B*:PR 1NÏ If2,133. ; : GOTO 700ELBE MIDMBUF*, I P, NUM-J+l ) =B*+MID* <BUF*, IP,NUM-J)iLOCATE NROW, , 0 ! PR 1 NT H2, MID* ( BUI-*, IP, NUM-J +1 ) sLOCATE NROW, NCOL+J.. 1
IP=IP+1:J=J+1:
IF J<=NUM THEN 410 ELSE 1=1+1:IF I>N THEN 380 ELSE 390
'***TAB***
1=1+1:IF I>N THEN 380 ELSE 390
J=J-llIP=IP-l!
IF J=0 THEN 840 ELSE LOCATE NROW,NCOL+J-1,1( GOTO 410
'***CR***DUFF* < NBUF > =BUF*:EDF=1 s CCR=CSRLIN:CCP=POS< D > :NBUF-NBUF+11
IF NBUF>NBUFM THEN NBUFM=NBUF-1
SCREEN 0,1,l,VSsCOLOR 14,1,0
LOCATE NRSC1, 1,0: PRINT USING "«("sMID* (BUF*, 1,80) j :NRSC1=CSRLIN:IF NRSC1>23 AND NBUF<«NBUFMX AND NBUF>NBUFM THENPRINT USING "&";BUFF*(NBUF) ji:NRSCl«CSRLIN
IF NRSC1>23 AND NBUF<=NBUFM THEN NRSC1=23 .
Press any key.
IF NBUF<=NBUFMX THEN 330
COLOR 11,0,0:SCREEN 0,1,AAS,VS:LOCATE 25,1,1:PRINT USING "&":"Last row ("+STR*(NBUF-l>+">!11 ; : PCL=POS <D) ! BEEP: NBUF=NBUF-1 : NRSC1=NRSC1-1
1190 IF NRSC1=>23 THEN 760ELBE NBUF=NBUF+1. ; BUF$=BUFF* (NBUF) : NRSC1=NRSC1+1:NN=NBUF-NRSCl+23:IF NN>NBUFM THEN NN-NBUFM
1200 SCREEN 0, 1, 1, VS; COI .OR 1.4, 1, 0: LOCATE NRSC1,1,0:FOR .-)=NBUF TO NN:PRiNT USING "&"; BUFF*(J)$:NEXTBOTO 3501210
1220
1230
1210
1250
1260
1270
NBUF«NRUI--i-l:IF NRSC1>=24 THEN 330 ELSE NRSC1-NRSC1+1:GOTO 330
'Si*DUI. LINE***
ÍF NbUI-M<-0 OR Nl'iUF'=O THEN 860ELSE IF NBUF>NBUFM THEN 890ELSE EDF=1:LOCATE , ,0s
IF NBUF=NBUFM THENNBUF=NBUF-1 :NRSC1=NRSC1-1: GOTO 1270
ELSE INLF=NBUF:GOSUB 1700:FOR J-NBUF TO NBUFM-1
IF GDEFC-0 THEN BUFF*(J)»BUFF*(J+l)ELSE BUFF*( J )"RIGHT*(STR* <J >,2)+RIGHT* <BUFF* <J+l) ,78)
NEXT
NBUFM=NBUFM-1: IF NRSC1O1 THEN 1300ELSE BUF*=BUFF*(NBUF):NN=NBUF-NRSCl+23l
IF NN>NBUFM THEN NN=NBUFM
1280 SCREEN 0.1,1,VS:COLOR 14,1,0:LOCATE NRSC1,1,0sFOR J=NBUF TO NNs PRINT USING "!<" ; BUFF* (J) % I NEXT:IF NBUF-NRSC1+23>NBUFM THEN PRINT USING "&"jC*j
INLF-NBUF:G03UB 1700:GOTO 3301290
1300
1309
1310
1311
1320
1330
1340
1330
1360
1370
1380
IF NBUF=O AND NRSCl=i THEN BUF*-BUFF*(NBUF)INN«OIGOTO 1280ELSE GOSUB 990¡GOTO 330
'****** ERROR HANDLING
DROW=CSRLIN:DCOL=POS(D): LOCATE 25,1
IF ERRO53 THEN BEEP ELSE 1390
IF ERR=24 THEN 1360 ELSE IF ERR=27 THEN 1370ELSE IF ERR=51 THEN 1380 ELSE IF ERR=62 THEN 1630ELSE IF ERR=58 THEN 1420 ELSE IF ERR-61 THEN 1430ELSE IF ERR=64 THEN 1440 ELSE IF ERR=76 THEN 1460
IF ERR=67 THEN 1450 ELSE IF ERR=68 THEN 1460ELSE IF ERR-70 THEN 1470 ELSE IF ERR-71 THEN 1480ELSE IF ERR-72 THEN 1490 ELSE IF ERR-57 THEN 1500ELSE ER*»"Error"+STR*(ERR)+" in 1in«"+STR»(ERL)I
PRINT USING "¡k";ER*5 lEND
ER*»"D»vice timeout. ": GOTO 1510
ER*»"Print»r not ready. "ÍGOTO 1510
ER*«"S*feguards Editor is damaged on the system disk. Us«another system disk!"sCOLOR 32,4,1: CLS:PRINT ER*jtCLEAR:END
58
1390 IF ERL=2590 THEN ER*="Report "+FLNAM*+" does not exists ondisk "+DSKI*+":. ":PRINT USTNG "S<";ERÍ+BEL*;?PCL=P0S<D):GOSUB 2632:RESUME 2030ELBE IF ERL=2580 OR ERL=2600 THEN RESUME 2630
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
1500
1510
1520
IK F.R!.-róí>0 OR EWL--2740 OR ERR=160 THEN RESUME 1630
IF F.RI„=2490 THF.N LOCATE 2,1,0:PR J M I " No files of type "+MID$ (E$, 3,3) +" *r« -found on drivs"+n«'.lil *+":":RKSU11E 2500 ' ' 'iru;r trur
RlitiUMt.
ER*= "Disk -f ul .1.. Change ! "¡GOTO 1510
ER*="Bad report identifier! "+FLNAM*:PRINT USING "&";ER*5iRESUME 2030
ER*="Too many reports. ":GOTQ 1510
ER$="Device unavailable. ":GOTO 1510
ER*="Disk Write Protect. "-.GOTO 1510
ER$="Disk not ready.' ":GOTO 1510
ER$="Bad diskette. "¡GOTO 1510
ER*="Device I/O errar "¡GOTO 1510
PRINT USING "?(";ER*;¡LOCATE 25,21,1 : PRINT USING "&";CHE*5
E*=INKEY*:IF E*="" THEN 1520ELSE IF LEN(E*)>1 THEN BEEP! BOTO 1520ELSE IF E»="r" OR E*="R" THEN GOSUB 1530:
LOCATE DROW.DCOL:RESUMEELSE IF E*="a" OR E*="A" THEN DM=O:LOCATE 1,1,0:PRINT #2," ":RESUME 170 ELSE BEEP:GOTO 1520
LOCATE 25,1 : PRINT USING"&"; MES*; : RETURN
' ************ SUBROUTINE DISK INPUT **************
' INPUTS DISTRIBUTION DATA FILES XXX.RES
' REPORT INTERNAL DATA FILE XXXnnnn.INT
FLRES*=DSKD*+":"+MID*(FLNAM*,1,3)+".RES"
LOCATE 1,1,0:OPEN FLRES* FOR INPUT AS #1:GOSUB 2632:GOSUB 1080
INPUT #1,NHED,GDFH$:FOR 1=0 TO NHED:IF EOFU) THEN 1630ELSE INPUT #l,SCH(0,I),SCH<l,I),SCH<2,I),SCHt3,I),SCH(4,I),
SCH(5,1),SCH(6,I).TEXH*(I) :NEXT
1580 INPUT #1,NLIN,GDFL,GDFL*:FOR 1=0 TO NLIN:IF EOF(l) THEN 1630ELSE INPUT#1,SCL(0,1),SCL(1,1),SCL(2,1),SCL(3,1),SCL(4,1),
SCLC5,I),TEXL*(I):NEXT:CLOSE #1:IF OP-1 OR 0P«5 THEN NBUFM=-1:GOSUB 1090:RETURN
1530
1540
1541
1542
1543
1544
1550
1560
1570
1590 LOCATE 1,1,0sOPEN DSKI*+"!"+FLNAM*+".INT" FOR INPUT AS #lsBOSUB2632:1=0sE*=""
1600
1610
1620
1630
1640
1641
1642
1643
1650
1660
1670
IF EOF(l) THEN CLORE ttl: GOTO 1620
L1 NE .1. NPUT i\ 1, BUFF* < I ) : I = I +1 : GOTO 1600
NßLIFM-1-1 : GOSUB 1090: RETURN
SnRF.KW 0, I , o, 0 ! COLOR 30,1,2: CLS:PK'INI II-2, Mil.. * + " * * # # Th i s system d i s k does not conta in ALLf i l i - 'H of- thtj BivFßyuarcls Report. E d i t o r . "SPRINT #2 ,BEL*+"* * * *tints a proper c o p y , " :GLOBE : END
'***** LINE SCREEN DISTRIBUTION SWITCH SUBROUTINE ********
' SWITCHES HEADER - LINE ENTRY DISTRIBUTION AT SCREEN 0
IF (HEDF=1 AND NBUF=O) OR HEDF=-1 THEN 1660ELSE IF HEDF=O AND NBUFXJ THEN 1680ELSE RETURN
SCREEN 0,1,0,VS: COLOR 11,0,0:IF HEDFO-1 THEN GOSUB 1690 ELSE VS=O
N=NHED:FOR 1=0 TO N:FOR J=0 TO 4:SC(J,I)=SCH(J,I)s NEXT:NEXT:FOR 1=0 TO N:LOCATE SC(O,I),SC(l,I),OsPRINT USING ".V';TEXH*(i> ; :NEXT;HEDF=O:RETURN
16S0 SCREEN 0,1,O,VSsCOLOR 11,0,0sGOSUB 1690sN»NLINsFOR 1=0 TO NsFOR J=0 TO 4sSC<J,I)=SCL(J,Ï)iNEXTsNEXTsFOR 1=0 TO N:LOCATE SC(O,I),SC(1,I),O¡PRINT USING "¡5<"!TEXL*U)::NEXT:HEDF=1: RETURN
1690 FOR 1=0 TO N:LOCATE SC(O,I),SC(l,I),OsPRINT- USING "!<"!MID*(C*,1,SC(2,I));:LOCATE SC(0,I),SC(1,I)+SC(2,I)+1 sPRINT USING "?<"sMID*(C*,SC(4,I),SC(3,I))5sNEXT:RETURN
1700
1710
1720
1721
1722
1723
1724
1730
IF INLF=O THEN SDEC$=GDFH*:GDEFC=O ELSE 6DEC»»GDFL»:eDEFC»GDFL
RETURN
' *******##**# EXIT EDIT MODULE **#*###***###*J»
' SAVES EDITED REPORT
EDITED DEFAULT LINES
SCREEN Ojl^jVSsCOLOR 11 „0, Os LOCATE 25,1,0sPRINT USING "&":SPACE*(79);:VS=2:SCREEN 0,1,2,VS:LOCATE 25,1,Is IF 0P=5 GOTO 2870
60
1740
1750
1760
IF NBUFM<0 THEN PRINT USING "V;"No Tev:t to save!Exit. ";:BEEP:PCL=P0R<D): FOR J~\ TO 500:NEXT:SOTO 2030
IF EDFOO THEN 1770 ELSE ER*="Report is not Changed!anyhow? (y/n) ":PRTNT USING "8<" ; ER*; : PCL=P0S (D)+l
S*v«
1770
17B0
1790
1800
1810
1811
1812
1813
1820
1830
1840
IF K<,'.=•"" THEN 1760£L!JH il-' I.l-N(lïi) V I THEN BEEP:GOTO 1760F'l.Br if F.'f.= "Y" OR [ïfl'="y" THEN PRINT USING "&";E*5:GOTO 1780i::i..bl. if: I;>="N" ÙR li*="n" THEN PRINT USING "&" $E*$ :GOTQ 1800
FOR 1=0 TO 500:NEXT60SUB 1080: LOCATE 1,1,0:OPEN DSKO*+":"+FLNÁM*+".INT" FOR OUTPUT AS iillSOSUB 2632lFOR I«0 TO NBUFM:PRINT #1,MID*(BUFF*(I)» 1,80)iNEXT:CLOSE #1:GOSUB 1120:GOTO 2030
E*=INKEY$:IF E*="" THEN 1840ELSE IF IJB=O THEN LOCATE ,,O:COLOR 0,11,0:PRINT #2,MID*(1J*,1,IJM);:COLOR O,O,O:PRINT #2," ";:LOCATE IJR,IJC,1:ÍJB=1:COLOR 0,11,0
1850 IF LEN(E*)>1 THEN E*=MID*(E*,2,1): GOTO 1870
1B60 IF E*>=SPK* AND E*<= ZK* THEN V=ASC(E*)sIF V>96 AND V<123 THEN E*=CHR*(V-32): GOTO 1880ELSE 1880
ELSE IF E*=BSK* THEN 1900ELSE IF E*==CRK* THEN RETURNELSE IF E*=ESC* THEN RETURN 2030ELSE BEEP:GOTO 1840
1870 IF E*=INSK* THEN 1930 ELSE IF E*=DELK* THEN 1910ELSE IF E*=CUL» THEN 1950 ELSE IF E*=CUR* THEN 1960ELSE BEEP:SOTO 1840
1880 IF NOT IJI THEN MID*(IJ*,IJ,1)=E*:PRINT #2,E*j:G0T0 1890ELSE MID*(IJ«,IJ,IJM-IJ+1)=E*+MID*(IJ*,IJ,IJM-IJ)iLOCATE.IJR,,O:PRINT #2,MID*(IJ*,IJ,IJM-IJ+1):LOCATE IJR,ÍJC+IJ,1
1890 IJ=IJ+1:IF IJ<=IJM THEN 1840 ELSE IJ»1:IJI»O:LOCATE IJR,UC, Í,7,7JG0T0 1840
IF IJ=1 THEN BEEP:GOTO 1830 ELSE IJ=IJ-1¡LOCATE ,P0S<D)-l,01900
2450 IF DSKL*="P" THEN DSKL*="A": RETURNELSE DSKL*=CHR* ( ASC ( DSKL* ) +1 ) : RETURN
2452 IF DDD=O THEN 2180 ELSE DDD-O:LOCATE 1,1,0:OPEN DSKD*+":SSAC.DEF" FOR OUTPUT AS #1«PRINT *l,DSKI*sPRINT #1,DSKO*:CLOSE #1:GOSUB 2632:GOTO 2180
2455 '******* INPUT Ϋ OUTPUT DISK DRIVES DIRECTORY LIST
2460 COLOR 11,0,0:CLS:DM=O:DSKL«=DSKI*:1=0:GOSUB 2480sG0T0 2260
2470 COLOR 11,0,0: CLS:DM=O:DSKL*=DSKO$: 1=0: GOSUB 24B0:G0T0 2260
63
2480 LOCATE ,,0s1=1+1:IF 1=1 THEN E*=DSKL*+":ICR????.INT"ELSE IF 1=2 THEN E*=DSKL*+"sMBR????.INT"ELSE IF 1=3 THEN E*=DSKL*+":PIL????.INT"ELSE E*=DSKL*+":CSN????.INT"
2490 PRINT "*** FILES ON DRIVE "+DSKL*:FILES E*
2500 LOCATE 25, 1., 1:IF K 4 THEMl'KïNV USING "&";"Press any key to continue with Directorylisl ";
ELSEPRINT UB1NB "«<"; "Press any key to return to Disk menu "5
E*=INKEY»;IF E*="" THEN 2670 ELBE IF LEN(E*)>1 THEN BEEP:BOTO 2620 ELSEIF E*="Y" OR r£*="y" THEN PRINT USING "&" s E»; :GOTO 2630 ELSEIF E;*="N" OR E*="n" THEN PRINT USING "tt"\ E*j :60T0 2010 ELSEBEEP-.GOTO 2620
GOSUU 2632:B0SUB 1.550: ON OP GOTO 200,200,2640,2810
' IF PRINTER NEEDS TO BE SET TO 132 COLUMNS USE NEXT STATEMENT
' (STAR - RADIX 15i)
REM WIDTH "LPT1:", 132: LPRINT CHR* (15) +CHR»U2)
WIDTH "LPT1:",132
LOCATE 25,1,1:PRINT #2,USING "!<";"Wait ... Report is printed.";:PCL»POS<D)
FLPTR$=DSKD*+":"+MID$(FLNAM*, 1,3)+".PTR"
MAXDK=35s RMXR=SCH(6,NHED)
NBUF=1:LB=1:LE=NBUFM/MAXDK:IF NBUFM>LE*MAXDK THEN LE-LE+1
J=1:GDSUB 2740
E*=SPACE*(RMXR):BUF*=BUFF*(NBUF)s FOR JJ=O TO NLINxMID*<E*,SCL(5,aj> ,SCL<3 , J J ) ) * M I D * ( B U F * , I S C H 4 , J 0 ) , S C L ( 3 , 0 J > ) I NEXT:LPRINT E*:NBUF=NBUF+l!IF NBUF>NBUFM THEN 2720 ELSE J-J+líIF .X-MAXDK THEN 2710 ELSELB=LB+1:LPRINT CHR*(12);:GOTO 2700