OAS Administration - Windows
OAS Administration - Windows
Onsystex 2012
All Rights Reserved
Note:
This document may contain Confidential Privileged
information and is intended only for the recipient(s).
Receipt of this document by any person other than the
intended recipient does not constitute permission to
examine, copy, or distribute this document thereto and
doing so is strictly prohibited.
If you receive this document in error, please notify the
sender immediately, by either electronic mail message or
telephone. We kindly request that no copies be made of the
original electronic document.
OASIS Administration
Microsoft Windows 64 bit Platforms
Introduction
by Onsystex Inc.
Welcome to OASYS, the most advanced, high performance transactional business application server built to
leverage the best capabilities of MultiValue and Relational technologies.
If you are look ing to create, extend or migrate multiuser business applications to the cloud in a SAAS model,
OASYS is the right product for you.
OASYS offers a sophisticated and robust core environment ideal to create and host business rules that can
be accessed natively or through any of the built in multipurpose data provider connectors to interface with web,
client/server and/or terminal based applications that utilize multi-discipline software technlogy including Java
and .NET
For ultimate flexibility, application data can be stored, accessed and managed on OASYS' hybrid
multidimensional data store which supports relational databases including Oracle, SQL Server, Postgres, DB2,
MySQL. As a result applications can seamlessly integrate with external data sources mak ing a reality the
ability to "write once and deploy anywhere" software applications.
Thank you for using our products.
This document is property of Onsystex, Inc and should not be copied, altered or reproduced without the
express written authorization of Onsystex, Inc.
Please note that all references to vendors and their respective third party products in this document are in
most cases protected by trademark s, patents and/or copyrights. Any references made on this document were
solely used for illustration purposes.
The content of this document is subject to change without notice.
For more information about this document or to learn more about the family of Onsystex products, please
contact Onsystex directly or visit us at www.onsystex.com.
Publisher
Onsystex Publications
Managing Editor
Onsystex Mark eting
Technical Editors
Onsystex Technical Support Team
Onsystex Engineering
Cover Designer
Onsystex - Euphoria .NET
Team Coordinator
Onsystex Technical Publications
Production
Onsystex Mark eting
Table of Contents
1 Introduction
10
1 About...................................................................................................................................
This Manual
10
Audience
.......................................................................................................................................................... 10
About the Product
.......................................................................................................................................................... 10
Unsupported ..........................................................................................................................................................
Com m ands
10
Reserved Characters
.......................................................................................................................................................... 11
Case Sensitivity
.......................................................................................................................................................... 11
Sym bolic Links
.......................................................................................................................................................... 12
Phantom Com..........................................................................................................................................................
m and
12
Dynam ic Files.......................................................................................................................................................... 12
Deleting Files.......................................................................................................................................................... 12
PCPERFORM Com
..........................................................................................................................................................
m and
13
Shell Com m and
..........................................................................................................................................................
Differences
13
Use of Sem icolon
.......................................................................................................................................................... 13
2 Notes...................................................................................................................................
About Terminal Devices and Tape Drives
14
Term inal Devices
.......................................................................................................................................................... 14
Tape Devices .......................................................................................................................................................... 14
3 Printing
...................................................................................................................................
in OAS for Windows Platforms
15
17
1 Introduction
................................................................................................................................... 17
Requirem ents..........................................................................................................................................................
for the OASTelnet Service
17
2 Overview
...................................................................................................................................
of Features
17
Configurability
.......................................................................................................................................................... 17
Direct Access..........................................................................................................................................................
to OAS
18
Security
.......................................................................................................................................................... 18
Secure Sockets
..........................................................................................................................................................
Layer
18
Term inal Em ulation
.......................................................................................................................................................... 18
3 Configuring
...................................................................................................................................
the OASTelnet Service
18
Service Options
.......................................................................................................................................................... 19
User Profiles .......................................................................................................................................................... 21
Custom izing User
..........................................................................................................................................................
Profiles
23
Generated Profiles
.......................................................................................................................................................... 24
4 Starting,
...................................................................................................................................
Stopping and Pausing OASTelnet
25
Controlling OASTelnet
..........................................................................................................................................................
from OAS Adm in
26
Controlling OASTelnet
..........................................................................................................................................................
from the Control Panel
26
28
1 What...................................................................................................................................
Is a Service?
28
2 Principal
...................................................................................................................................
OAS Services
28
Basic Object Manager
..........................................................................................................................................................
(oas_objm anager)
28
Shared Mem ory
..........................................................................................................................................................
Manager (oas_shm anager)
29
Clean Up (oas_cleaner)
.......................................................................................................................................................... 29
Contents
3 Monitoring
...................................................................................................................................
OAS Services
29
Log Files
.......................................................................................................................................................... 30
32
1 Windows
...................................................................................................................................
Platforms and Shared Memory
32
2 OAS and
...................................................................................................................................
Shared Memory
32
oas_shm anager
..........................................................................................................................................................
and Shared Mem ory
32
oas_objm anager
..........................................................................................................................................................
and Shared Mem ory
33
Self-Created Segm
..........................................................................................................................................................
ents
33
35
1 Configuration
...................................................................................................................................
Procedure
35
1. Identify Disk
..........................................................................................................................................................
Requirem ents
35
2. Identify Mem
..........................................................................................................................................................
ory Requirem ents
35
3. Verify Version
..........................................................................................................................................................
Com patibilities
35
4. Check/Reset
..........................................................................................................................................................
System -Level Param eters
36
5. Check/Reset
..........................................................................................................................................................
OAS Configuration Param eters
36
6. Define Peripherals
..........................................................................................................................................................
w ithin OAS
36
7. Create OAS..........................................................................................................................................................
Accounts
36
8. Add Window
..........................................................................................................................................................
s Users
37
9. Set Environm
..........................................................................................................................................................
ent Variables
37
10. Review OAS
..........................................................................................................................................................
Security
38
11. Convert Data
..........................................................................................................................................................
Files
39
12. Review Backup
..........................................................................................................................................................
Procedures
39
41
1 Normal
...................................................................................................................................
Operation
41
OAS Log Files.......................................................................................................................................................... 41
Starting & Stopping
..........................................................................................................................................................
OASIS
42
2 Additional
...................................................................................................................................
Commands
42
Stopping a User
..........................................................................................................................................................
Process w ith deleteuser
42
45
1 What...................................................................................................................................
Is an OASIS Account?
45
2 Creating
...................................................................................................................................
an OAS Account
45
3 Deleting
...................................................................................................................................
an Oasis Account
47
50
1 Customizing
...................................................................................................................................
Permissions
50
2 Customizing
...................................................................................................................................
a VOC File
51
Rem oving Entries
.......................................................................................................................................................... 51
3 Customizing
...................................................................................................................................
OASIS Behavior
53
4 Remote
...................................................................................................................................
Items
53
5 The SETFILE
...................................................................................................................................
Command
54
6 LOGIN
...................................................................................................................................
and LOGOUT Paragraphs
54
7 Field-Level
...................................................................................................................................
Security for OASQuery
56
Points to Rem..........................................................................................................................................................
em ber about Field-Level Security
56
2012 Onsystex Inc.
61
1 OAS Hashed
...................................................................................................................................
Files
61
2 Static...................................................................................................................................
Hashed Files
61
3 Dynamic
...................................................................................................................................
Hashed Files
62
Dynam ic Files..........................................................................................................................................................
and Overflow
62
When Dynam ic
..........................................................................................................................................................
Files Are Created
64
Tips and Constraints
..........................................................................................................................................................
for Creating a Dynam ic File
64
Dynam ic Files..........................................................................................................................................................
and Disk Space
65
4 Sequentially
...................................................................................................................................
Hashed Files
69
The dat001 File
.......................................................................................................................................................... 69
The over001 File
.......................................................................................................................................................... 69
The gm ekey File
.......................................................................................................................................................... 70
5 DIR-Type
...................................................................................................................................
Files
71
6 Multilevel
...................................................................................................................................
Directory Files
71
7 Index...................................................................................................................................
Files and Index Log Files
72
Index-Related..........................................................................................................................................................
Files for a Static Hashed File
73
Index-Related..........................................................................................................................................................
Files for a Dynam ic Hashed File
73
8 File-Handling
...................................................................................................................................
Commands
74
9 File Corruption
................................................................................................................................... 75
What Causes ..........................................................................................................................................................
File Corruption?
75
Preventing File
..........................................................................................................................................................
Corruption
76
10 OAS Detection
...................................................................................................................................
Tools
76
oas_analyzetbls
.......................................................................................................................................................... 76
oas_analyzetbls_ndx
.......................................................................................................................................................... 79
oas_validatetbls
.......................................................................................................................................................... 81
11 OAS Recovery
...................................................................................................................................
Tools
82
oas_dum pgroup
.......................................................................................................................................................... 82
oas_fixgroup .......................................................................................................................................................... 83
oas_fixtbls .......................................................................................................................................................... 84
12 Detection
...................................................................................................................................
and Repair Examples
86
13 How to
...................................................................................................................................
Use oas_analyzetbls
88
14 Error ...................................................................................................................................
Messages
89
File Access Messages
.......................................................................................................................................................... 89
Block Usage Messages
.......................................................................................................................................................... 89
Group Header..........................................................................................................................................................
Messages
90
Header Key Messages
.......................................................................................................................................................... 90
Other Header ..........................................................................................................................................................
Messages
90
Free Block Messages
.......................................................................................................................................................... 91
Long Record Messages
.......................................................................................................................................................... 91
Dynam ic File Messages
.......................................................................................................................................................... 92
94
1 The OASIS
...................................................................................................................................
Global Lock Manager
94
How OASIS Global
..........................................................................................................................................................
Locking Works
94
2012 Onsystex Inc.
Contents
2 Locking
...................................................................................................................................
in OasBasic
95
How Locks Work
.......................................................................................................................................................... 95
Locking Com m
..........................................................................................................................................................
ands
95
3 Resource
...................................................................................................................................
Locks
96
4 Listing
...................................................................................................................................
Locks
97
LIST.READU .......................................................................................................................................................... 97
LIST.LOCKS .......................................................................................................................................................... 98
LIST.QUEUE .......................................................................................................................................................... 98
Param eters .......................................................................................................................................................... 99
LIST.QUEUE Display
.......................................................................................................................................................... 99
5 Commands
...................................................................................................................................
for Clearing Locks
102
SUPERCLEAR.LOCKS
..........................................................................................................................................................
Com m and
102
SUPERRELEASE
..........................................................................................................................................................
Com m and
102
6 Procedure
...................................................................................................................................
for Clearing Locks
103
106
1 Adding
...................................................................................................................................
Users
106
User Groups.......................................................................................................................................................... 106
Hom e Directories
.......................................................................................................................................................... 106
Logon Scripts
.......................................................................................................................................................... 107
2 Monitoring
...................................................................................................................................
User Processes
108
OAS Com m ands
.......................................................................................................................................................... 108
3 Stopping
...................................................................................................................................
User Processes
109
Using TIMEOUT
.......................................................................................................................................................... 109
112
1 Configuring
...................................................................................................................................
and Troubleshooting a Printer 14-3
112
Physical Configuration
.......................................................................................................................................................... 112
Troubleshooting
.......................................................................................................................................................... 112
Definition in ..........................................................................................................................................................
OAS
115
Default Printers
.......................................................................................................................................................... 115
2 Spooling
...................................................................................................................................
From OAS
115
The Spooling..........................................................................................................................................................
Process
115
OAS for Window
..........................................................................................................................................................
s Platform s Specifics
115
Creating a Local
..........................................................................................................................................................
Printer
116
3 Creating
...................................................................................................................................
a Form
121
4 Defining
...................................................................................................................................
a Printer Unit in OAS
123
Exam ples .......................................................................................................................................................... 126
Printing to the
..........................................................................................................................................................
_HOLD_ File
128
Selecting a Spooler
..........................................................................................................................................................
Mode
129
Redefining the
..........................................................................................................................................................
Default OAS Print Unit
131
Subm itting Concurrent
..........................................................................................................................................................
Print Jobs
131
5 OAS...................................................................................................................................
Printing Commands
131
134
1 OasBasic
...................................................................................................................................
Source and Compiled Programs
134
OasBasic Com
..........................................................................................................................................................
piled Program s
134
2 Cataloging
...................................................................................................................................
OasBasic Programs
134
2012 Onsystex Inc.
3 Managing
...................................................................................................................................
Global Catalogs
136
Contents of ..........................................................................................................................................................
a Global Catalog
136
Verifying a Program
..........................................................................................................................................................
Version
138
Activating New
..........................................................................................................................................................
ly Cataloged Program s and Subroutines
139
4 Listing
...................................................................................................................................
Programs in Use
141
5 Creating
...................................................................................................................................
an Alternate Global Catalog Space
142
Files and Directories
..........................................................................................................................................................
Created by new hom e
142
Procedure for
..........................................................................................................................................................
Creating an Alternate Global Catalog Space
144
147
1 OAS...................................................................................................................................
Tape Handling Commands
147
SETTAPE
.......................................................................................................................................................... 148
2 Steps
...................................................................................................................................
for Tape Device Use
148
152
1 Monitoring
...................................................................................................................................
Your Windows System
152
2 OAS...................................................................................................................................
Performance Factors
152
Database Design
..........................................................................................................................................................
Considerations
152
Using Alternate
..........................................................................................................................................................
Key Indexes
152
Sizing Static ..........................................................................................................................................................
Hashed Files
152
Sizing Dynam..........................................................................................................................................................
ic Hashed Files
153
OasBasic Coding
..........................................................................................................................................................
Tips
153
3 OasBasic
...................................................................................................................................
Profiling
154
16 Appendix A
OAS Configuration Parameters
158
17 Appendix B
Environment Variables for OAS
165
Index
Part
10
Introduction
This introduction provides an overview of the information in this manual and describes the conventions it uses.
1.1
1.1.1
Audience
Administering OASYS on Windows Platforms is intended for users whose responsibilities may include the
following:
Tasks performed at the Windows operating system level
Modifying file permissions
Adding users
Creating directories
Starting and stopping OASYS
Backing up OASYS
Tasks performed within OASYS
Creating and managing OASYS accounts
Optimizing OASYS configuration settings
Customizing security
Managing files
Monitoring and accessing files, peripherals, and system resources
1.1.2
1.1.3
Unsupported Commands
The following OASYS linux commands are not supported on OASYS for Windows platforms:
oas_pickload
oas_start
oas_stop
oasinstall
Introduction
1.1.4
11
Reserved Characters
OASYS for Windows platforms does not allow the use of the following characters in a file or directory name:
(double quotation mark)
| (pipe sign)
* (asterisk)
/ (slash)
: (colon)
< (less than sign)
> (greater than sign)
? (question mark)
\ (backslash)
You may use the reserved characters in a file specification. For instance, C:\Onsystex\oas61
\PDPSAMPLE\ORDERHISTORY is an acceptable file specification. The reserved characters : and \ are used as
delimiters in the file specification. However, they may not be used within the name of a file or directory. TES:T or
ORDER\HISTORY are unacceptable.
1.1.5
Case Sensitivity
Windows platforms do not distinguish between uppercase and lowercase, except in a users password, which is
case sensitive. OASYS is case sensitive.
File Names
On Windows platforms, you cannot have two files whose names are identical except for case. For example, if your
application creates files such as aatemp and AATEMP, you must modify the application since Windows
platforms will not allow both to exist.
Record Names
You cannot have two records in the same DIR or MULTIDIR file whose names are identical except for case. The
following screen illustrates one effect of this limitation:
OASYS could not copy the LISTDICT record because a record called listdict already was copied. Since each
record in a DIR (or MULTIDIR) file is an NTFS file, Windows platforms treat listdict and LISTDICT as the same
file. You need to consider this limitation if your application:
Creates records with names differing only in case in a DIR file or multilevel subdirectory.
Copies records from a hashed file, where the limitation does not exist, into a DIR file or multilevel
subdirectory.
2012 Onsystex Inc.
12
savedlists File
By default, a OASYS account on Linux contains a SAVEDLISTS file for saving SELECT lists, and a savedlists file
for storing temporary information for BY.EXP sorts.
At the operating system level, the file named savedlists on OASYS for Linux is called the SAVEDLISTSL file on
OASYS for Windows platforms. However, the VOC file contains an entry for savedlists pointing the correct file,
so you should not have to modify your application. You must change the name of the savedlists file in any
OASYS account you are moving from Linux to Windows platforms.
Note: Query verbs invoked in lower case will be treated in mode 'U'.
1.1.6
Symbolic Links
Windows platforms, unlike Linux, do not support symbolic links. If your application has identified files by using
symbolic links at the operating system level, you must restructure your OASYS accounts to eliminate them. You
can use environment variables in VOC pointers, or set new pointers with SETFILE, just as you can in OASYS for
Linux.
1.1.7
Phantom Command
On OASYS for Windows platforms, the PHANTOM command behaves differently, depending from where you
execute it.
If you execute PHANTOM from a OASYS session at the console, then end the OASYS session, the
phantom job completes.
If you execute PHANTOM from a telnet session, the phantom job continues until it completes. This
behavior matches the behavior of PHANTOM on Linux.
1.1.8
Dynamic Files
The dynamic file implementation on OASYS for Windows platforms differs slightly from the implementation on
OASYS for Linux. On OASYS for Windows platforms, the parts of a large dynamic file must remain in the same
partition where the file was created. Because of this, the part table is not relevant to OASYS for Windows
platforms. The size of each part file is limited by the configuration parameter OAS_MaxPartitionLength in
OASHOME\include\oasconfig.
1.1.9
Deleting Files
Windows platforms do not allow a process to delete a file if any other process has that file open. This operating
system limitation significantly affects the behavior of the ECL DELETE.FILE command. To minimize the impact of
this restriction, DELETE.FILE only removes the DICT portion and VOC entry for a file if it has successfully
removed the DATA portion of the file. However, the operating system restriction still results in the following
behaviors in OASYS:
2012 Onsystex Inc.
Introduction
13
If one process executes DELETE.FILE filename, and another process has the DATA portion of filename open,
or both the DICT and the DATA portions of filename open, the DELETE.FILE fails with an error, and no
component of the file is deleted.
If one process executes DELETE.FILE filename, and another process has only the DICT portion of filename
open, the DELETE.FILE removes only the data portion of the file, leaving the VOC entry and the DICT portion
intact, and displaying an error.
In OASYS on Linux, DELETE.FILE would succeed in both cases. If your appli-cation depends on the Linux-style
behavior, you need to rework the application.
Warning: In Linux, the three commands in the example are equivalent. If your application depends on
comparing the output from echo to another string, make sure your echo command is formatted correctly.
If you direct the output to a file, echo displays everything between its starting point and the redirection
character (>). The two commands echo test>file and echo test >file, equivalent on Linux, are not equivalent on
Windows platforms. The second command produces a 4-character string, with a space as the fourth character.
14
unexpected results.
On Linux, the command line entry would echo the string abc to the file named file, then attempt to execute the dir
command.
1.2
1.2.1
Terminal Devices
OASYS for Windows Platforms records and displays a tty for a OASYS process. The tty is formed by
appending the OASNO (from LISTUSER) to the string pts/.
This tty can be used with the !portnumber option in the ECL MESSAGE command, to send a message to a
specific terminal or window. A number of ECL commands (LISTUSER, MYSELF, WHO, and STATUS) display the
tty number for each OASYS session.
1.2.2
Tape Devices
When you use OASYS tape commands (for instance, SETTAPE), you must use the Universal Naming
Convention (UNC) format for device identifiers. UNC names are in the form \\server\device. The following
example shows the SETTAPE, T.ATT, and T.STATUS commands on OASYS for Windows Platforms:
The device identifier \\.\TAPE0 indicates the current server (.), device TAPE0.
You can identify a disk file as a tape device by entering a path and file name (not in UNC format) on the
SETTAPE command line. If you do not use UNC format, OASYS checks for a path and file that matches your
entry. If the file exists, OASYS writes to the file as a tape device. Otherwise, SETTAPE fails with an error
message.OASYS stores tape definition information in a file called OASHOME\sysprog\tapeinfo. This is a text file,
which you can view with any text editor.
You must log in as a member of the Administrators group to define a tape device with the SETTAPE command.
Introduction
1.3
15
Part
17
2.1
Introduction
The OASYS Telnet Service is a service that exports a logon prompt to a network. Users can log on through the
logon prompt, and multiple users can work on the system at the same time. OAS Telnet creates an alternate
console window when a user runs programs other than OASYS in that window, just as they would run in a
console window.
When a user opens a OASYS session through OAS Telnet, OASYS writes screen output directly to a socket.
Using the socket is more efficient than writing screen output to the alternate console window.
When a user shells out from OASYS to execute a non-OASYS process (for instance, !DIR), OASYS directs
output to the alternate console window. This allows programs that write to standard output to function without
modification under OAS Telnet.
2.1.1
Operating System
Your system must be running a 64 bit Microsoft Windows operating system.
Disk Space
OAS Telnet uses less than one megabyte of disk space. During the installation process, OASYS installs the files
for OAS Telnet in the Telnet subdirectory in your \oas61\bin folder.
Memory
The OASYS Telnet service and configuration screens take less than one megabyte of system memory to run. You
need somewhat less than 1 MB of memory for every Telnet user logged into your system, over and above the
memory required for the application.
Telnet Client
You must have a Telnet client running on your Windows system. The OAS Telnet Service interacts with the
existing Telnet client.
2.2
Overview of Features
This section describes the features of the OAS Telnet Service.
2.2.1
Configurability
local Administrators group to configure the OAS Telnet Service.
You can perform the following tasks to configure the OAS Telnet Service:
18
Establish a default configuration for all users who access your system through OAS Telnet.
Create individual user profiles that establish session characteristics for each user.
Create a combination of custom profiles and a default configuration.
Set parameters, including the number of concurrent OAS Telnet sessions and the number of logon attempts to
allow each user.
Make tuning changes that may affect performance for users logging in via OAS Telnet to execute MS-DOS
commands.
2.2.2
2.2.3
Security
Users cannot log on through the Telnet Service unless:
They have a valid logon on the Windows workstation or domain.
They belong to a local group that has the user privileges Access this computer from network and Log on
locally assigned.
These constraints mean that users logged on through Telnet have only the permissions already associated with
their Windows system account, just as if they had logged on from the console.
2.2.4
2.2.5
Terminal Emulation
The OASYS Telnet Service provides any terminal emulation supported by OASYS. OASYS uses the oastermcap
file to validate terminal settings. The oastermcap file, located in the OASHOME\include directory, contains
definitions for terminals supported within OASYS. By default, the oastermCAP file contains definitions for the
following terminals:
VT100, VT200, VT300, VT400, VT420
WYSE60
ADDS-VP
IN 9400
IN 9400B
You can add terminal definitions to oastermcap, or modify the definitions, if you desire.
2.3
19
You configure the OASYS Telnet Server by executing the oas_ConfigTelnet.exe utility.
The OAS Telnet Server dialog box appears, as shown in the following example:
The following table describes the dialog tabs for Telnet Server.
Dialog Tab
Use
Services
Users
2.3.1
Service Options
Select the Service tab from the Telnet Server dialog box to view and edit parameters that govern the operation of
the OAS Telnet Service. A dialog box similar to the following example appears:
20
Welcome Message
In the Welcome Message box, enter a message to display when a user successfully connects to OAS Telnet.
21
Click OK to save the new settings and exit the Telnet Server dialog box. Click Apply to save the new settings and
keep the Telnet Server dialog box open. Changed settings do not affect Telnet sessions that are already started.
New sessions started after the service parameters were changed use the new parameters. Click Cancel to exit the
Telnet Server dialog box without saving changes.
2.3.2
User Profiles
Select the Users tab to specify which users are allowed to connect to your system through OAS Telnet, and to
create custom user profiles.
A dialog box similar to the following example appears when you click the Users tab:
This dialog box enables you to specify a list of users that are allowed to connect to your Windows system
through OAS Telnet. At installation, OAS Telnet is started with a default configuration that allows any user who
2012 Onsystex Inc.
22
can access your Windows system from the network to access the system through OAS Telnet as well. This
default behavior is acceptable in many instances. However, administrators may wish to grant only certain users
Telnet access, or to create individual user profiles. The Users dialog box allows this flexibility.
Warning: If you remove the Default profile, no user can log on through OAS Telnet unless you have created a
specific profile for the user.
Command
In the Command box, enter the full path of an executable. In the default profile, this is set to OASBIN\oas.exe,
which starts a OASYS session
Initial Directory
Enter the full path of the working directory to which you want to connect when you log on in the Startup
Directory box. In the default profile, this is set to the OASYS demo account.
Ask Directory ?
Select the Ask Directory ? check box if you want the user to select a working directory when they log on. By
default, this check box is not selected.
Note: If you want one or more users to see the MS-DOS prompt when they log on, edit the user profile or
23
2.3.3
Click New to add a user profile. The following dialog box appears:
Enter the logon name of the user, then click OK. Enter the logon name only (for instance, main_user).
Do not enter the domain name (for instance, do not enter
PARTS\main_user). When you click OK, a
dialog box similar to the following appears:
OASYS populates the dialog elements with the values from the Default Configuration. Click OK to accept those
values, or edit one or more fields to customize the profile.
Note: If you deleted the Default profile, OASYS displays a message when you attempt to add new user profiles.
You must enter all the configuration settings manually, since OASYS cannot copy them from the default profile.
2. Customize a Profile
To edit a profile, highlight the user name in the User box, then click Edit. Consider the following points when
customizing a user profile:
Specify a full path in the Conmand box. You can use either drive letters or the Universal Naming Convention
(UNC) to specify the path.
24
By specifying the Initial Directory, you can direct different users to different startup directories, even if they
are using the same default shell.
You can allow users to choose their directory when they log on by selecting the Ask Directory ? check box.
If you do not know whether a particular terminal supports Version 3 Color, select the ANSI Version 3.x check
box. Test the terminal; if screen colors are not displayed correctly, modify the user profile to clear the ANSI
Version 3.x check box.
The following example shows a sample configuration that allows a user to log on through OAS Telnet, select a
starting directory, and access the MS-DOS command prompt. The default startup directory is C:\Onsystex\oas61
\sysprog.
Changes to a users configuration are visible the next time the user logs in through OAS Telnet.
2.3.4
Generated Profiles
If you selected Prompt Directory in your Default Profile, OASYS creates a profile for each user who would
normally receive the default user profile. OASYS creates the individual profiles the first time a user chooses a
startup directory different from the default. The generated profile uses the same configuration settings as the
default profile, with the exception of Startup Directory, which is set to the directory chosen by the user when
they log on. The following examples show the effect of the Prompt Directory option. In the first example, the
default user profile has Prompt Directory selected:
25
Notice that the default path is C:\Onsystex\oas61\sysprog, and the user is selecting an alternate startup
directory, \Onsystex\oas61\FirstAccount. Pressing ENTER starts a OASYS session in \Onsystex\oas61
\FirstAccount. This logon session also creates a profile for the user, which you can view or edit from the Telnet
Server dialog box. The generated profile is shown in the following example:
The next time the user logs on through Telnet, the default path is changed accordingly.
2.4
26
2.4.1
2.4.2
Part
28
3.1
What Is a Service?
A service is a background process that performs a specific task or set of tasks. Services wait in the background
until they receive a request for their specific function. A number of standard Windows services run to control
system processes, schedule commands, handle print requests, and to perform other similar functions. Consult
your host operating system documentation for detailed information about the services that run on your system.
3.2
3.2.1
3.2.2
29
3.2.3
Clean Up (oas_cleaner)
The clean up process, oas_cleaner, detects terminated user processes at check time intervals. If oas_cleaner
detects a terminated process, internal flags are set. The oas_shmanager and oas_objmanager services
periodically check to see if oas_cleaner has set internal flags. If these services detect flags, each service performs
the necessary clean up and resets its own flag to zero.
The oas_cleaner service performs clean up that is not handled by oas_shmanager or oas_objmanager. When the
oas_shmanager and oas_objmanager services have reset their flags to zero, the oas_cleaner service resets its flag
to zero, makes the user process ID available, and frees the local control table.
3.3
30
In the previous example, the OASYS Database Service, RPC Server and Telnet Service are all started. Automatic
in the Startup column indicates that these services automatically start when you boot your Windows system.
3.3.1
Log Files
The oas_objmanager, oas_cleaner, and oas_shmanager services each record messages in a pair of logs in the
OASBIN directory. In addition, the oas process writes messages to a log file called oas.errlog if a OASYS process
encounters file corruption in a data file. The following table lists these log files.
Daemon/Process
oas_shmanager
oas_shmanager
oas_objmanager
oas_cleaner
oas
oas_start
Routine Messages
Error Messages
OASBIN/oas_shmanager.log
OASBIN/oas_shmanager.errlog
OASBIN/oas_shmanager.log
OASBIN/oas_shmanager.errlog
OASBIN\oas_objmanager.log OASBIN\sbsc.errlog
OASBIN\oas_cleaner.log
OASBIN\oas_cleaner.errlog
N/A
OASBIN\oas.errlog
OASBIN\oas_start.log
OASBIN\oas_start.errlog
Log Files for OAS YS Daemons and Processes
Note: All messages written to the .errlog for a daemon are also written to the daemon log file. For example,if an
error is written to the oas_shmanager.errlog, the message also appears in the oas_shmanager.log.
Part
32
4.1
4.2
4.2.1
Note: See Appendix A OASYS Configuration Parameters, for further information about these parameters.
4.2.2
33
Description
Size, in bytes, of shared memory segments created by
oas_objmanager. oas_objmanager uses the segments to store globally
cataloged programs. oas_objmanager can attach a maximum of 20
segments.
OAS_M axSizeBasicObject
M aximum size, in bytes, of object code files that oas_objmanager
can be load into shared memory. oas_objmanager loads object code
files larger than this size into the users address space instead of
shared memory.
Configuration Parameters for oas_objmanager
4.2.3
Self-Created Segments
A OASYS process can attach a segment of shared memory larger than a standard global page. OASYS requires
that a OASBasic variable read into memory be contained in a single global page. If a variable is larger than the
size of a global page, oas creates a special segment in shared memory. These self-created segments, also called
indirect segments, are attached to the requesting oas process and managed by oas_shmanager. Some
circumstances resulting in self-created segments are:
Editing a large report with AE. AE is a OASBasic program, and it reads a report in as a single variable.
Reading a large array as a single variable. oas_shmanager creates a segment large enough to hold the variable.
The self-created segment is counted as a global page used by the OASYS process that created the segment.
Warning: Creating these segments of memory is not an efficient resource use, and may result in poor
performance or in thrashing. Use the system-level lstt command or the oas_ipcstatus command to determine if
your application is using self-created segments on a regular basis. If so, analyze the sizes of variables the
application uses. Consider increasing the value of OAS_BytesperPage (the size of a global page) to handle the
variables. Also, consider modifying the application to read arrays by element rather than as a single variable.
Part
35
5.1
Configuration Procedure
If you are installing or upgrading OASYS, see Installing and Licensing OASYS Products for estimates for initial
disk and memory needs for your system. These estimates should be sufficient to allow you to install and start
OASYS with a minimal configuration.
5.1.1
5.1.2
5.1.3
36
5.1.4
5.1.5
5.1.6
5.1.7
37
Note: A Windows account (logon ID, password) is not the same as a OASYS account. Every OASYS user should
have a separate Windows account (logon ID and password), but many users can access the same OASYS
account.
Use the Windows platform mkdir command and the OASYS system-level oas_newacct command to create
OASYS accounts. See your host operating system documentation for information about the mkdir command,
and see Chapter 9, Managing OASYS Accounts, for information about the oas_newacct command.
5.1.8
5.1.9
38
Enter the name of the environment variable you want to establish or change in the Variable box. Enter the setting
for the environment variable in the Value box. Click Set to set the variable, or Delete to delete the variable.
39
Part
41
6.1
Normal Operation
Use the OASYS services for normal startup and shutdown. These commands start and stop the oas_objmanager,
oas_cleaner, and oas_shmanager processes, in the correct order.
Note: You must log on as Administrator to manage the OASYS services.
6.1.1
42
6.1.2
6.2
Additional Commands
OASYS provides a number of system-level commands to assist you in clearing users, processes, and system
resources from OASYS if needed. These commands are intended for removing hung processes, clearing ipc
facilities for a clean start of OASYS, or logging users and resources off for an emergency shutdown. These
commands are listed in the following table.
Parameter
Description
listuser
oas_removeuser
oas_oas_ipcstatus
Warning: Notice that oas_removeuser may compromise the integrity of your data. You should never use them
as a routine substitute for normal user logoff.
6.2.1
43
The argument pid is the process ID. Warning: Because oas_removeuser may execute the Terminate Process, it
is particularly important that you verify the pid carefully.
The following screen shows an example of the oas_removeuser command:
C:\Onsystex\oas61\Bin>oas_listu
Efective users..:
8 /8
oas
1
oasSql Total
0
O ASN O U SR N B R U ID U SR N AM E U SR TY PE TTY
1 48056 197608 M ario
oas
pts/1 Console
C:\Onsystex\oas61\Bin>oas_removeuser 48056
Part
45
7.1
7.2
46
Notice that the screen displays the current setting of OASHOME and prompts you if you wish to continue.
The final window shows the contents of your new OASYS account:
When you execute oas_ewacct, OASYS creates the VOC file for the new account using a standard VOC file
located in the sysprog subdirectory of your OASYS home directory.
Tip: If you want to tailor your standard VOC file before creating new accounts, you may do so. There are a
number of reasons you may wish to tailor your VOC file. You may want to add custom paragraphs, for instance,
that all users should execute. Onsystex recommends that you save a copy of the standard VOC before making
changes.
The following table describes the default subdirectories OASYS creates with a new account.
S ubdirectory
Description
BP
CTLG
SAVEDLISTS
SAVEDLISTSL
_SpoolJobs_
S ubdirectory
_CaptJobs_
47
Description
Used to store output from background processes (created by the
OASYS ECL PHANTOM command) and captured terminal I/O
(created by the OASYS ECL COM O command).
S ubdirectories in a OAS YS Account (continued)
OASYS creates the subdirectories empty and populates them as the account is used.
The next table describes the OASYS hashed files that OASYS creates are created in a new account.
File
Description
M ENUFILE
VOC
privilege
D_BP
D_CTLG
D_M ENUFILE
D_SAVEDLISTS
D_VOC
D__SpoolJobs_
D__CaptJobs
File
D_SAVEDLISTSL
Description
Dictionary for savedlists.
Hashed Files in a OAS YS Account (continued)
Note: See Developing OASBasic Applications and Using OASYS RDBMS Integraton for information about
OASBasic and OASYS RDBMS integration
7.3
48
Warning: Be careful with rmdir /s. This command removes all files and subdirectories below the directory you
specify. If you have nested accounts (that is, a OASYS account within a OASYS account) and you remove an
account directory with rmdir /s, you could remove more than one account.
Part
50
8.1
Customizing Permissions
To customize permissions, from Windows Explorer, select the directories or files for which you want to customize
permissions. Using the right mouse button, click the directory or file, click Properties, and then click the Security
tab. The following dialog box appears:
Select the permissions you desire in the Permissions area, then click OK.
Onsystex make a series of recommendations for customizing these permissions, as shown in the next table.
Directory or File
Guidance
OASHOME\sysprog\CTLGTB
OASHOME\sysprog\DICT.DICT
OASHOME\sysprog\VOC
51
permission as well.
Users, including programmers, need execute permission to this
global catalog directory. In general, do not allow users to add or
delete subdirectories to CTLG.
OASHOME\sysprog\CTLG\n and directories CTLG contains a subdirectory for each letter of the alphabet and
and files within these subdirectories
one for symbols. Users need execute permission to these
directories and read access to the files in them. Programmers may
need Change permissions to the subdirectories and files so they can
catalog or delete cataloged programs.
OASHOME\demo
Use this directory for training and experimentation. Use any
permissions settings that suit your situation.
OASHOME\sysprog\AE_BP
All users with access to AE (the line editor) need read and write
permissions.
Guidelines for Permissions for OAS YS S ystem Files
OASHOME\sysprog\CTLG
When you create a OASYS account, Onsystex suggests the following guidelines for setting permissions for the
directory, subdirectories, and files in the account:
Direct
Description
Only users who need to create files in the directory should have write
permission.
Users need read and execute permissions so they can run OASBasic programs
that are not globally cataloged. Programmers need write permission.
Users need read and execute permissions so they can run locally cataloged
programs. Programmers and administrators need write permission so they can
locally catalog and delete locally cataloged programs.
Users need read and write permissions.
Users need read and write permissions.
Users need read and write permissions.
(This refers to the account VOC file, not the master VOC file in OASHOME
\sysprog.) Users must have read and write access to enter their accounts unless
you have set the VOC_READONLY environment variable. See Using OASYS for
more information about the VOC file.
S uggested Permissions for a OAS YS Account
BP
CTLG
SAVEDLISTS
SpoolJobs
CaptJobs
VOC
8.2
8.2.1
Removing Entries
Depending on your application, you may wish to prevent users from executing certain ECL commands. If you
remove the entries corresponding to these commands from a VOC file in an account, users logged on to that
account will not be able to execute them.
When a user enters an ECL command, OASYS searches the VOC file in the current account. If there is no
corresponding entry, OASYS displays an error message instead of executing the command.
The following example shows the results of deleting a VOC entry:
52
The following table lists ECL commands that create or modify OASYS files, or allow users to execute system-level
commands. You may want to consider removing some or all of these from the VOC files for your accounts. These
commands allow users to perform the following tasks.
Command
!
CLEAR.FILE
CNAM E
COPY
CREATE.FILE
Command
CREATE.INDEX
DELETE
DELETE.CATALOG
DELETE.FILE
DELETE.INDEX
DISABLE.INDEX
ED
ENABLE.INDEX
M ODIFY
PTRDISABLE
PTRENABLE
RESIZE
UPDATE.INDEX
Description
Escape to an M S-DOS shell prompt.
Clears the data or dictionary of a file.
Changes a filename.
Copies records.
Creates files.
VOC Commands S ecurity
Description
Creates an alternate key index.
Deletes records from VOC or other files.
Deletes catalog entries.
Deletes a file.
Deletes an alternate key index.
Disables an alternate key index.
Invokes the ED editor.
Enables an alternate key index.
M odifies records in a data or dictionary file.
Disables a printer or queue.
Enables a printer or queue.
Resizes a file.
Updates an alternate key index.
VOC Commands S ecurity (continued)
Note: You can remove entries from the OASYS master VOC file (located in OASHOME\sysprog) or from the
VOC files in one or more OASYS accounts. The master VOC is installed as part of the OASYS installation, and
is used to build VOC files for your accounts when you execute the oas_newacct command. If you remove
commands from the master VOC file, and then create new OASYS accounts, users in the new accounts will not
be able to execute the commands you remove.
Tip: If you choose to modify the master VOC file, make sure you save a copy of it and its dictionary before you
begin your modifications.
Warning: When you remove a VOC command entry, OASYS no longer recognizes that command. OASYS
displays an error message if a user tries to execute the command, whether at the ECL prompt, or within a
OASBasic program.
8.3
53
Command S tatus
Behavior
ON
OFF
ON
No VOC entry
OFF
No VOC entry
CUS T.OPTIONS 19
CUST.OPTIONS 19 is turned off by default. Leave it off to allow a user with Admin-istrator privileges to execute
commands that users cannot; turn it on to make Administrators consistent with other users.
Note: See the CUST.OPTIONS Commands Reference for detailed information about the CUST.OPTIONS
command.
8.4
Remote Items
You can further customize security by replacing some command entries in your VOC file with remote items. A
remote item (R-type VOC record) allows a record definition to be stored in a location other than the VOC file. You
can substitute remote items for sentences, paragraphs, commands, locally cataloged programs, or menus. See
Using OASYS for more information about R-type items.
R-type items enable you to customize security in two ways:
You can use a remote item as a pointer to a location with different Windows file permissions from the current
account, limiting access to the item.
You can supply a security routine for the remote item. R-type items name a cataloged subroutine that is
executed when a user invokes the remote item. The subroutine must have one argument, and return a value of 1
(true) or 0 (false). When a user invokes a remote item with a security subroutine, the remote item does not
execute unless the subroutine returns 1 (true).
The following screen shows an example of a remote item created for the ECL LIST command:
54
With this VOC record in place, when a user executes the LIST command, OASYS executes a security subroutine
called SECTEST2. If that subroutine returns a value of 1, OASYS executes the item called LIST in a file called
OTHER_VOC.
The next screen shows a sample program:
8.5
You can set the NTFS permissions at the location of the file to limit access. If a user with insufficient permissions
tries to access the file, OASYS displays an error message.
See the OASYS Commands Reference for information about the SETFILE command.
8.6
55
When you enter OASYS, OASYS checks the VOC file in the account you are entering for a LOGIN paragraph.
If there is one, OASYS automatically executes it.
If you change accounts with the ECL LOGTO command, OASYS does NOT execute the LOGOUT paragraph in
the account you are leaving. OASYS looks in the VOC file of the account you are entering, and executes the
LOGIN paragraph there, if there is one.
When you exit OASYS, OASYS checks the VOC file in your current account and executes the LOGOUT
paragraph, if one is there.
Note: You can also use the ECL ON.ABORT command to prevent users from accessing the ECL or MS-DOS
prompt. ON.ABORT defines a paragraph that executes whenever a OASBasic program aborts. See the OASYS
Commands Reference for information about ON.ABORT.
The following sample session shows simple examples of LOGIN and LOGOUT paragraphs in a OASYS account,
and a different LOGOUT paragraph in a second account:
In the preceding example, the second LOGOUT paragraph , displays the DATA and prints a message. A userwritten exit program can perform a variety of tracking and reporting functions.
The next example shows the response when two of these paragraphs are executed:
Notice that the LOGIN paragraph defines CUST.OPTIONS and then prints a message. A LOGIN paragraph can
also execute a program, or display a menu. If a users .login or .profile file sets their working directory to a OASYS
account and executes the oas command, and the LOGIN paragraph defines the CUST.OPTIONS and displays a
menu, the user does not see either the MS-DOS command prompt or the ECL prompt.
56
Notice also that logging out of OASYS after the LOGTO command executes the LOGOUT paragraph of the
current account only.
Note: If CUST.OPTIONS 20, U_IGNLGN_LGTO, is on, users logged on as an Admin-istrator can access an
account through the LOGTO command without executing the LOGIN paragraph. If a user logged on as an
Administrator accesses the account directly, OASYS executes the LOGIN paragraph regardless of the setting of
CUST.OPTIONS 20.
8.7
8.7.1
8.7.2
57
Records in the QUERY.PRIVILEGE file grant the SELECT privilege to users or groups of users, at the file level or
the attribute level. Each QUERY.PRIVILEGE record has one attribute. The dictionary of the QUERY.PRIVILEGE
file contains four records.
Following is a sample of the dictionary of the QUERY.PRIVILEGE file:
Description
@ID
Data attribute that defines the user or domain and the file for which
you are setting privileges. If you are setting up a system default, @ID
is DEFAULT. Otherwise, @ID must be of the format username*path,
domain\ uername*path, or PUBLIC*path.
PRIV
Data attribute that indicates the attributes to which you are granting
privileges, by location. PRIV is a multivalued attribute. To grant
privileges to all attributes in a file, set PRIV to ALL. If you are setting
a system default, set PRIV to OPEN to grant privileges. To restrict
privileges to every attribute in a file, set PRIV to SECURE.
FULLPATH
Virtual attribute formula that designates the full path of the file affected
by PRIV. This formula has the format FIELD(@ID,*,2).
USERNAM E
Note: You can customize the length of the dictionary attributes in the QUERY.PRIVILEGE file. The length of
@ID should be sufficient to contain the longest Linux user name and the longest absolute path for a OASYS file
on your system. FULLPATH and USERNAME should be long enough to handle the longest absolute path and
longest user name, respectively.
The following example shows a very simple example of a QUERY.PRIVILEGE file:
58
Except for TEST, which are in the FirstAccount database, all users have privileges to query all files in all
accounts that share the same OASHOME.
Marco can query the fields in positions 1, 2, 3, 4, 5, and 12 only in the TEST file. No other user can query this
file.
8.7.3
OASQuery Processing
If you turn on the security feature by creating and populating the QUERY.PRIVILEGE file, every time a user logs
on to OASYS, their OASYS process reads the contents of QUERY.PRIVILEGE and stores the information for
reference. Then, when a user attempts a OASQuery access, OASYS checks the stored information, following
these steps:
1. Check for privileges granted to the users domain.
If the users domain has sufficient privileges for the requested access, allow the access. Otherwise, proceed to
step 2.
2. Check for privileges granted specifically to the user.
If the user has sufficient privileges for the requested access, allow the access. Otherwise, proceed to step 3.
3. Check for privileges granted to PUBLIC.
Privileges granted to PUBLIC apply to all system users. If PUBLIC has sufficient privileges for the requested
access, grant the access. Otherwise, proceed to step 4.
4. Check for a DEFAULT entry.
If there is a DEFAULT record in QUERY.PRIVILEGE, and if the default is set to OPEN, allow the requested
access. If there is no DEFAULT, or if the DEFAULT is SECURE, disallow the access, displaying the following
message:
8.7.4
59
The QUERY.PRIVILEGE file and its dictionary should be read-only to all users except Administrator. Check the
permissions and change them, if necessary.
4. Edit the Dictionary
Use AE, or ED to edit D_QUERY.PRIVILEGE. The dictionary must look like the following example:
You can customize the format for the dictionary items to specify lengths for the attributes that match your
system.
5. Add Records to QUERY.PRIVILEGE
For this step, you may prefer to have users logged out of OASYS. As you add records to the QUERY.PRIVILEGE
file, users logging on to OASYS access whatever records are present at the time they log on, which may cause
unexpected results.
Use AE or ED to populate the QUERY.PRIVILEGE file.
Part
61
9.1
9.2
Description
Level 1 overflow
The amount of space required for the data in the group is larger than
the amount of space available. This happens if the length of a data
record is too long for the block size, or if the number of records in the
group grows so large that not all of the data fits. OASYS appends
overflow blocks to the original file, and stores the data portions of
records in overflow. The pointers and keys remain in the primary
data file; accessing a record can require two reads, one to determine
the address and the second to read the data in overflow.
Level 2 overflow
The amount of space required for pointers and keys is larger than the
total size of the group. This happens if too many records are hashed
to the group. OASYS creates overflow blocks which contain both
data and keys. Record access can require multiple reads to determine
the location and find the data.
Level 1 and Level 2 Overflow
62
Note: When a group in a static file overflows, OASYS links the overflow blocks to that specific group. If
overflow blocks are freed (by deleting records, for example) they remain linked to the original group and are
not available to handle overflow from any other group in the data file. The space used by the blocks is not
returned to the operating system. Level 1 overflow eventually impacts the performance of a static hashed file.
Level 2 overflow impacts performance earlier and more severely, so correct sizing to prevent level 2 overflow is
critical.
9.3
9.3.1
63
the overflow file runs out of blocks, OASYS adds blocks to it. To prevent level 2 overflow, OASYS splits groups
(increasing the modulo of the primary file) whenever the load factor of an existing group reaches a level called the
splitting threshold (or SPLIT.LOAD). The splitting process is transparent to the user. When a group splits,
OASYS adds the additional group to the primary data file, increasing its modulo and physical size.
As records are removed from a dynamic file, groups that had been split can merge back together if all the
following conditions are true:
The current modulo of the file is greater than the minimum modulo of the file.
The combined load factor of the two groups is less than a value called merging threshold (or MERGE.LOAD).
One of the two groups is the last group in the file.
OASYS provides two different split/merge types for dynamic files, KEYONLY and KEYDATA. You can set the
split/merge type when you create a dynamic file, and you can change an existing split/merge type for a file with
the CONFIGURE.FILE command or the memresize command. Use FILE.STAT, ANALYZE.FILE, or GROUP.STAT
to display the split/merge type for a file.
KEYONLY Type
The KEYONLY split/merge type is the default for OASYS dynamic files. For KEYONLY dynamic files, the load
factor of a group is the percentage of the group space that is filled with keys and pointers. By default, the
splitting threshold for a group in a KEYONLY dynamic file is 60%, meaning that the group can split into two
when the space occupied by keys and pointers reaches 60% of the size of the group. By default, the merging
threshold for a KEYONLY dynamic file is 40%, meaning that if the total load in a pair of groups that resulted from
a split is under 40% of the size of a single group, the pair are eligible to merge. You can change the splitting
threshold for a single KEYONLY file with the CONFIGURE.FILE or memresize commands, and you can change the
defaults for all files by changing the OAS_SplitLoadand OAS_MergeLoadparameters in the OASYS
configuration file (\OASHOME\include\oasconfig).
KEYDATA Type
The KEYDATA split/merge type is also available for OASYS dynamic files. For KEYDATA dynamic files, the
load factor of a group is the percentage of the group space that is filled with keys, pointers, and data. By default,
the splitting threshold for a group in a KEYDATA dynamic file is 95 percent, meaning that the group can split
into two when the space occupied by keys, pointers, and data reaches 95 percent of the size of the group. By
default the merging threshold for a KEYDATA dynamic file is 40 percent, meaning that if the total load in a pair of
groups that resulted from a split is under 40 percent of the size of a single group, the pair are eligible to merge.
You can change the splitting threshold for a single KEYDATA file with the CONFIGURE.FILE or memresize
commands, and you can change the defaults for all files by changing the KEYDATA_OAS_SplitLoadand
KEYDATA_OAS_MergeLoadparameters in the OASYS configuration file (\OASHOME\include\oasconfig).
64
9.3.2
In the preceding example, the primary data file (dat001) includes a file header and the three data groups for a total
of four 1K blocks. The overflow file (over001) includes a 1K file header. Since OAS_MaxPartitionLength is larger
than minimum modulo * block size, the primary data file and overflow file each have only one part.
9.3.3
65
future efficiency of the file. You should select a starting modulo based on the expected future size of the file,
because subsequent splitting and merging operations are affected by the initial modulo. Starting with a modulo
that is very small (for instance, 3) produces inefficient hashing and splitting as the file grows. Starting with a
modulo that is very large produces a file that may initially take up more disk space than needed, but that impact is
more desirable than the slow performance and inefficiency that results if the starting modulo is too small.
When you create a dynamic file, estimate the initial modulo by using the same procedure for estimating the
modulo for a static file.
9.3.4
66
67
68
69
The ECL CLEAR.FILE command returns the file to its original modulo and size.
9.4
9.4.1
9.4.2
70
in over001 are linked to groups in dat001. If over001 gets too large, OASYS adds additional blocks to it. If the
current file system becomes full, or over001 grows larger than a OASYS limit, OASYS creates an over002 file.
If the sequentially hashed file has level 2 overflow, the file should be rebuilt using the oas_shfbuild command.
9.4.3
Description
-a
-k
Build the gmekey file only. If you use this option, outfile should
be the name of the sequentially hashed file. Do not specify infile.
OASYS rebuilds the gmekey file according to the keys in each
group of outfile.
-n/-t
-f
-m
-e
Parameter
Description
-b
-i infile
outfile
71
To convert an existing file, execute the oas_shfbuild command from the system level prompt, as shown in the
following example:
After converting a file to a sequentially hashed file, you must manually enter a file pointer in the VOC file in order
to access the sequentially hashed file, as shown in the following example:
9.5
DIR-Type Files
A OASYS DIR-type file is an NTFS directory that contains NTFS text or data files. Each NTFS text or data file is a
OASYS record. The BP file, a OASYS file that stores OASBasic source files and compiled programs, is a DIR-type
file. The following example shows the structure of a sample DIR file:
9.6
72
Note: If a subdirectory of a multilevel directory file has the same name as the main directory, you can use the
main directory name to access the subdirectory. For instance, LIST MULTID is correct syntax if the directory
MULTID contains subdirectory MULTID.
9.7
73
performance during periods of heavy activity on your system. If you turn off automatic indexing, OASYS stores
all index updates in an index log file. The ECL UPDATE.INDEX command applies updates from index logs to
indexes in batch mode, and the ECL ENABLE.INDEX command turns automatic updating back on. The ENABLE.
INDEX command also creates an index log file if one is not already there. DELETE.INDEX (with the ALL option)
removes the index log file.
See the OASYS Commands Reference for additional information about index handling commands.
9.7.1
9.7.2
Notice that the index and index log files are located in the dynamic file directory rather than in the account. The
file idx001 is the index file, and xlog001 is the index log file.
74
Note: A dynamic hashed file can have more than one idx file. The same configuration parameter
(OAS_MaxPartitionLength) that limits the size of a dat or over part file limits the size of index files. When the
size of an index file (for instance, idx001) reaches OAS_MaxPartitionLength, OASYS creates the next index file
(for instance, idx002).
9.8
File-Handling Commands
OASYS includes a variety of commands for users to create and delete OASYS files as well as to obtain status
information, change file parameters, and diagnose and repair damaged hashed files.
The following table describes ECL file-handling commands and indicates the OASYS file types they affect.
Command
CREATE.FILE
DELETE.FILE
CLEAR.FILE
CNAM E
SETFILE
RECORD
FILE.STAT
Description
Creates a OASYS file; works for static and dynamic hashed files, dictionary files,
DIR files, multilevel files and multilevel directories.
Deletes a OASYS file; works for static, dynamic, and sequen-tially hashed files,
dictionary files, DIR files, multilevel files, and multilevel directories.
Removes all records from a OASYS file; works for static, dynamic, and sequentially
hashed files, dictionary files, DIR files, multilevel subfiles, and multilevel
subdirectories.
Changes the name of a OASYS file; works for static, dynamic, and sequentially
hashed files and DIR files. Does not work for multilevel subfiles and multilevel
subdirectories or dictionary files.
Sets a pointer to a OASYS file; works for static, dynamic, and sequentially hashed
files, DIR files, multilevel files, and multi-level directories. Does not work for
dictionary files or for multilevel subfiles or subdirectories.
Identifies group where a primary key is hashed, and displays a list of keys hashed
to that group. Works for static, dynamic, and sequentially hashed files and for
multilevel subfiles. Does not work for dictionaries, directory files, multilevel
directories, or multilevel subdirectories.
Displays statistics about a hashed file, including modulo, block size, hash type, and
record statistics. Works for static, dynamic, and sequentially hashed files or static or
dynamic multilevel subfiles. Does not work for dictionaries, directory or multilevel
directory files, or multilevel subdirectories.
ECL File Commands
Command
Description
GROUP.STAT
Displays record distribution in a OASYS hashed file. Works for static, dynamic, or
sequentially hashed files or static or dynamic multilevel subfiles. Does not work for
dictionaries, directory or multilevel directory files, or multilevel subdirectories.
Changes the modulo, block size, or hash type of a OASYS static hashed file. Works
on static hashed files and static hashed multi-level subfiles. Does not work on
directories, multilevel directories or subdirectories, dictionaries, or any dynamic
hashed file or subfile.
Displays statistics, including current and minimum modulo, hash type, block size,
split/merge type, split load, merge load, and record distribution for a dynamic file.
Works on dynamic and sequentially hashed files and dynamic hashed multilevel
subfiles only.
Changes split/merge type, split load, merge load, part table, or minimum modulo for
a dynamic file. Works on dynamic hashed files and dynamic hashed multilevel
subfiles only.
Reconstructs a dynamic file using current settings for split load, merge load, and
minimum modulo. Used after CONFIGURE.FILE. Works on dynamic hashed files
and dynamic hashed multilevel subfiles only.
RESIZE
ANALYZE.FILE
CONFIGURE.FILE
REBUILD.FILE
CHECKOVER
75
Checks OASYS hashed files for level 2 overflow. Works on all OASYS hashed files
and subfiles. Used to check all files in a OASYS account directory.
ECL File Commands
See the OASYS Commands Reference for detailed information about the syntax of the file-handling commands.
The next table describes OASYS system-level file-handling commands.
Command
Description
checkover
Checks OASYS hashed files for level 2 overflow. Works on all OASYS hashed files and
subfiles. Checks all files in a OASYS account directory. The system-level version can be
executed with OASYS shut down or with OASYS running.
Unloads the contents of a damaged group in a hashed file; can be executed with OASYS
shut down or with OASYS running. Does not work with EDA files.
Repairs damaged groups in a file; can be executed with OASYS shut down or with
OASYS running. Does not work with EDA files.
Repairs a damaged group; can be executed with OASYS shut down or with OASYS
running. Does not work with EDA files.
Identifies damaged hashed files or dictionary files. Cannot be executed if OASYS is shut
down. Does not work with EDA files.
Changes the modulo, block size, or hash type of a OASYS hashed file. Works on static
or dynamic hashed files and multilevel subfiles. Does not work on sequentially hashed
files, directories, multilevel directories or subdirectories, EDA files, or dictionaries. This
command uses shared memory and disk storage rather than disk storage alone as working
storage. Although it is executed from the system-level prompt, you cannot run it if
OASYS is shut down. memresize also converts static files to dynamic files, dynamic
files to static files, and changes the split/merge type and part table for dynamic files.
Converts a static or dynamic file to a sequentially hashed file.
Identifies damaged hashed files or dictionary files; you cannot execute if OASYS is
running.
OAS YS S ystem-Level File Commands
dumpgroup
oas_fixtbls
fixgroup
oas_analyzetbls
memresize
oas_shfbuild
oas_validatetbls
9.9
File Corruption
File corruption is damage to the structure of a file. OASYS file management tools diagnose and repair problems
that occur if invalid, unreadable, or inconsistent infor-mation is written to file or group headers. Such invalid
information can result in OASYS being unable to access part or all of the data in the file. OASYS provides a series
of utilities that enable you to detect and repair damaged files.
Note: OASYS file tools do not detect or repair invalid or inconsistent data in files. Detecting data
inconsistencies should take place at the application level.
9.9.1
76
primary data block and corresponding overflow blocks are out of synch. The increased chance of corruption is
particularly significant for files in level 2 overflow.
9.9.2
Risk Factor
This OASYS command first tries to gracefully terminate a process.
If unsuccessful, oas_removeuser forces the process to terminate.
OAS YS Commands that can corrupt a file
There are other operations that can corrupt OASYS files; the following list contains some examples:
Stopping the OASYS Telnet Service (OAS Telnet) while users are logged on to the system.
Attempting to view/edit a OASYS file with an MS-DOS text, octal, or binary editor can damage the file whether
or not OASYS is running. In many cases, the file damage is irreversible.
Backing up and restoring a OASYS file while users are accessing the file during backup may damage the
restored file. Any OASYS file can be damaged in this way, but the risk is particularly great for dynamic files.
Note: The file being backed up is not damaged. Danger is only to the file being restored.
9.10
9.10.1 oas_analyzetbls
Syntax:
oas_analyzetbls [file1, file2,...][-options]
Note: You may supply oas_analyzetbls with the name of a single OASYS file or a series of file names separated
2012 Onsystex Inc.
77
by commas or spaces. If you do not specify any files, oas_analyzetbls processes all files in the current OASYS
account directory. However, oas_analyzetbls does not work with EDA files.
Description
oas_analyzetbls is a OASYS-supplied, system-level utility that provides detailed statistics and suggestions for
optimizing file size and ensuring data integrity.
Options
The following table lists the options available for the oas_analyzetbls command.
Option
Description
-d1 | -D1
Includes minimum statistics about the file. Does not work with the ns option.
-d2 | -D2
-d3 | -D3
-f | -F [filename]
-ha | -HA
Option
Description
-h0 | -H0
-h1 | -H1
-i | -I [filename]
Evaluates algorithm 0. Note: the -h option has no effect if specified for a dynamic file.
Evaluates algorithm 1. Note: the -h option has no effect if specified for a dynamic file.
Directs the oas_analyzetbls utility to evaluate all of the files in the file named filename.
GUIDE_INPUT.DAT is the default. The file should be composed of one file name per line.
OASYS treats blank lines and lines that begin with an exclamation point as comments.
-l | -L [count]
If you specify the -d3 option, the oas_analyzetbls utility displays the keys for the largest
records. The key appears in quotes and, if truncated, is followed by an asterisk (*). The -l
option controls the number of records that display. The default value is three. Specifying a
large number of records results in a significantly slower analysis.
78
-m | -M
new_modulo
Directs the utility to evaluate the effects of a different modulo upon the specified file. You
must use this option in conjunction with the -h (hash test) option. This option has no effect
when specified for a dynamic file.
-o | -O [filename]
Controls whether output is combined or directed to separate files. If you specify -o, OASYS
directs all output to the file specified by filename. If you do not specify a file name, OASYS
directs the output from oas_analyzetbls to standard out (usually, your terminal).
-p | -P page_length
-np | -NP
(no pagination)
Controls the display of oas_analyzetbls output when you specify the -o option and direct
output to the terminal. Specify -np to scroll the output past with no pause. Specify -p pagelength to pause after displaying each page and prompt with the following message: Press
RETURN to continue... The following responses are accepted at the prompt: <RETURN>
to display the next page. N to continue with no pauses. Q to quit the application.
page_length is the number of lines per page in the screen display. The default value is 24.
oas_analyzetbls Command Options (continued)
Option
Description
-r | -R [filename]
Specifies whether to produce a reporting file. The filename must be the Linux file
specification of a OASYS database file, previously created by the CREATE.FILE
command. Use this option to generate file statistics reports using OASQuery. Copy a
dictionary for the report file from OASHOME\sysprog\D_OASYS_GUIDE.
If you specify the -d3 option, the oas_analyzetbls utility displays the keys for the smallest
records. OASYS displays the key in quotes. If the key is truncated, it is followed by an
asterisk (*). The -s count option controls the number of records to appear in sorted order.
The default value is three. Large values result in a significantly slower analysis.
Controls whether OASYS includes statistical information about the file in the output file. If
you do not specify a filename, OASYS uses GUIDE_STATS.LIS. (The -s (statistics)
option is assumed when the -o (output) option is present, and may not be specified at that
time.) You may use the -ne (no errors) option in combination with the -o option.
oas_analyzetbls Command Options (continued)
-s | -S count
-s | -S [filename]
-ns | -NS
(no statistics)
oas_analyzetbls Output
The oas_analyzetbls utility can create five output files. The following table lists these files. You may change the
default names.
File
Description
GUIDE_ADVICE.LIS
GUIDE_ERRORS.LIS
GUIDE_STATS.LIS
GUIDE_BRIEF.LIS
Displays management advice about files that are poorly sized or corrupted.
Lists structural errors detected in the files specified.
Lists statistical information about the files specified.
Displays summary information about selected files, including record counts, total
size, used size and modulo.
Contains a list of damaged groups that can be used as input for oas_fixtbls. This list
can also be used to input file names/group numbers for dumpgroup/fixgroup.
oas_analyzetbls Output Files
GUIDE_FIXUP.DAT
If you do not specify options, OASYS selects the default options: -a, -e, -f, and -s, and places the results in the
default files. The oas_analyzetbls utility checks for existing output files. If there are existing output files,
oas_analyzetbls appends a timestamp to the end of the existing file before it creates the current output file. The
most current output files will not have this time stamp. OASYS does not overwrite output files generated in a
previous analysis. As a result, you may accumulate a large number of files that you should purge periodically.
79
1. Create a OASYS file in the account where you are running oas_analyzetbls.
2. Copy the records from OASHOME\sysprog\D_OASYS_GUIDE to the dictionary of the file you created in step
1.
3. Execute oas_analyzetbls -r filename, where filename is the OASYS file you created in step 1.
The oas_analyzetbls utility creates statistical information in filename about the evaluated files. The records
contain 62 attributes and are keyed by VOC entry name. You can use OASQuery or ECL commands, or write
OASBasic code, to analyze the data and produce reports.
oas_analyzetbls Example
The following example shows output from oas_analyzetbls executed against a directory that contains a damaged
file:
9.10.2 oas_analyzetbls_ndx
Syntax:
oas_analyzetbls_ndx{-x | -X} {1 | 2 | 3}, {index_names, ... | ALL} [-t template |-T template]
filename
Description
As with other OASYS file types, an index file could become corrupt due to hardware failures, the interruption of a
write to the index file, or an incomplete write. The oas_analyzetbls_ndx utility checks for physical and logical
corruption of an index file. If an index file is corrupt, OASYS displays a runtime error when a OASYS process tries
to access the index. If the index file is associated with a recoverable file, a message is written to the sm.log.
The oas_analyzetbls_ndx command creates two files, the GUIDE_XERROR.LIS and the GUIDE_STATS.LIS.
GUIDE_ERROR.LIS lists any corruption found in the index file, and GUIDE_STATS.LIS list statistics about the
index. If you have a corrupt index, you must rebuild it using the CREATE.INDEX and BUILD.INDEX commands.
For more information and creating and building indexes, see Using OASYS.
Note: Onsystex recommends deleting the index with the DELETE.INDEX ALL command. Using the ALL option
deletes all alternate key indexes and the index file itself.
80
Parameters
The following table describes each parameter of the syntax.
Parameter
Description
-x{1 | 2 | 3}
index_names
-t template
filename
Example
The following example illustrates the contents of the GUIDE_XERROR.LIS file when oas_analyzetbls_ndx detects
corruption:
The following table describes the column heading that display in output for the X_STATS.LIS file.
Column Heading
Description
Index name
F-type
V-type
K-type
Column Heading
Description
Nulls
Dups
F-No/VF-expr
81
9.10.3 oas_validatetbls
Syntax:
oas_validatetbls [-Y | -y] [-H | -h block address] [-O | -o block address]
Description
The oas_validatetbls command, like oas_analyzetbls, detects file corruption. Although oas_validatetbls does not
produce as much information as oas_analyzetbls, and does not produce the damaged group list for repair,
oas_validatetbls runs much more quickly, runs with OASYS down, and can be used for a rapid scan of files.
Parameters:
The following table describes each parameter of the syntax.
Parameter
Description
[-Y | -y]
The following example shows typical output from oas_validatetbls on files that are not damaged:
82
9.11
9.11.1 oas_dumpgroup
Syntax:
oas_dumpgroup filename group.no [-doutputfile] [-p]
Description
The system-level dumpgroup command unloads readable records from a group you specify in a OASYS file. If the
file was corrupted, dumpgroup unloads complete, valid records, leaving behind any information it cannot read.
2012 Onsystex Inc.
83
Parameters
The following table describes each parameter of the syntax.
Parameter
Description
filename
group.no
[-doutputfile]
[-p]
If you execute oas_dumpgroup without specifying an output file, the output simply displays on the screen. You
will not be able to use that output to verify records or repair the damaged group. If you do specify an output file,
OASYS places the records in uneditable form, suitable for reloading, into the output file. OASYS also creates a
directory within your current account for each dumped group. The directory is named FILE_GROUP, where FILE
and GROUP are the file name and group number you specify on the command line. This directory contains an
ASCII file for each record, so that you can check them for consistency before reloading the damaged file.
Warning: When you use the -d option, make sure you name your output file with a name that does not already
exist in your account name. If you specify a duplicate name, the preexisting file may be overwritten.
9.11.2 oas_fixgroup
Syntax:
oas_fixgroup filename group.no [-iinputfile] [-k]
The system level oas_fixgroup command reloads a hashed file group based on a file created by the dumpgroup
command.
The following table describes each parameter of the syntax.
Parameter
filename
Description
Specifies the name of the file to repair.
group.no
[-iinputfile]
[-k]
84
option.
fixgroup Parameters
Warning: If you execute oas_fixgroup without an input file argument, OASYS clears the damaged group. Be
sure that you have saved the readable records with oas_dumpgroup before clearing the group. If you clear the
damaged group and you have not saved the readable records, the data in that group is lost. The syntax for
clearing a group without reloading it is:
OASYS displays a warning message before clearing the group, as shown in the following example
9.11.3 oas_fixtbls
Syntax:
oas_fixtbls {-t | {-dfilename | -k | -p | -f}} [-mfilename] [-wdirectory] [-ifilename | filename group.no]
The system-level oas_fixtbls command repairs damaged groups in OASYS files by clearing the group and
optionally restoring readable records to the group. Use oas_fixtbls in conjunction with the oas_analyzetbls
utility. Do not let users access files while oas_fixtbls is running because you could lose records.
The following table describes each parameter of the oas_fixtbls syntax.
Parameter
Description
{-t}
Direct all output to the terminal only. Each readable record is described
in a new line that includes the record key and the record length. All
attributes in the record appear on separate lines, each line indented by
two spaces. Special and nonprintable characters are translated as
follows: Attribute M ark - New line Value M ark - } Subvalue
M ark - | Text M ark - { Non-printables - . The -t and -d
parameters are mutually exclusive and cannot be used together.
{-dfilename}
{-k}
If you specify the -k option with the -d option, OASYS does not clear
the damaged groups. This has the effect of dumping the readable records
for examination, but leaving the file corrupt. If you specify the -d and -f
option along with the -k option, OASYS repairs the file and returns the
readable records to the group. Any unreadable records that OASYS did
not dump remain in the file as well.
{-p}
If you specify the -p option with the -d option, OASYS trans-lates all
non-printing characters and characters with special meaning to OASYS.
This translation applies to the editable ASCII files created by the -d
option. If you do not specify the - p option, only attribute marks are
translated.
2012 Onsystex Inc.
85
Parameter
Description
{-f}
If you specify the -f option with the -d option, OASYS clears the
damaged group and restores the records that were dumped back into the
group, creating a fixed file with all readable data restored. You must
specify the -d option with the -f option.
OASYS writes all error messages and statistics to the file you specify,
instead of the terminal.
OASYS creates the work files that are generated in the directory you
specify.
OASYS uses this file as the source of the names of damaged files and
groups to be repaired. If you do not use this option or the {filename
group.no} option, OASYS uses the GUIDE_FIXUP.DAT file under the
current directory. This option is mutually exclusive with {filename
group.no}.
[-mfilename]
[-wdirectory]
{-ifilename}
{filename group.no}
The file name and group number that contains the corruption. If you do
not use this option or the {-ifilename} option, OASYS uses the
GUIDE_FIXUP.DAT file under the current directory. This option is
mutually exclusive with the {-ifilename} option
oas_fixtbls Command Parameters (continued)
86
records back, but does not clear any data from the group.
Note: It is possible to run oas_fixtbls in two steps, one to dump the records for review and the second to repair
the file. To dump the records only, run oas_fixtbls with the -d option, but without the -f option. Unless you
specify the -k option, running oas_fixtbls with the -dfilename deletes the readable data from the specified
groups when it creates output. To repair the file, run oas_fixtbls with both -d and -f options.
9.12
87
The output displays statistics and then reports which groups are damaged. In this case, group 1 is damaged.
The next example shows the output from dumping the records from the damaged group with oas_dumpgroup:
C:\Onsystex\oas61\bin\oas_dumpgroup TEST 1 -dhold_file
2 records dumped for group 1
The records can be found under directory
Check them before fixing the file
C:\TEMP\TEST_1
At this point you can review the directory CLIENTS_1, containing a file for each record that was dumped from
group 1.You should verify that the data in each record is valid. The following example shows the output from
rebuilding the damaged group with oas_fixgroup:
88
9.13
No Errors
If there are no errors, proceed to step 5.
make a copy of) the damaged files before proceeding. In the event of a system failure during the repair process,
you will be able to restore from the backup copies and repeat the procedures rather than attempting to recover a
partially-completed repair. DO NOT ALLOW USERS TO ACCESS YOUR FILES WHILE YOU ARE BACKING
THEM UP!
2. Repair the damaged groups- After oas_analyzetbls completes, you can execute either oas_fixtbls or
2012 Onsystex Inc.
89
dumpgroup/fixgroup to repair the damaged groups. In either case, the process overview is: dump the readable
records from a damaged group, clear the group, and then reload all readable records back into the group.
Tip: Onsystex recommends that you not use the -k option with oas_fixtbls or with fixgroup. The -k option lets
you reload the readable records without clearing the group. However, you may encounter additional errors if
you do not clear the group. Use oas_fixtbls or fixgroup without -k; this procedure automatically clears the
group before reloading the readable records.
Be sure no users are accessing your files before repairing damaged groups. The dumpgroup command does not obtain exclusive
oas_fixtbls/fixgroup only lock the file when the records are being written back to a group. Concurrent access to
the file could make corruption worse.
3. Verify the repair- Rerun oas_analyzetbls after the repair is complete to verify that the errors are fixed. If they
are not, or if additional groups are damaged, repeat the previous step.
5. Continue Processing
If you shut OASYS down to repair files, start it again before allowing users to log in.
9.14
Error Messages
This section lists error messages users may see and provides information about the meaning of them. Some of the
messages are generated by the oas_analyzetbls command and others are generated by the oas_validatetbls
command.
All of these messages indicate that oas_analyzetbls or oas_validatetbls did not process the file because it was
unable to obtain an exclusive lock on the file.
Note: These messages display only at the terminal. They are not logged in any file.
These indicate that a block is found to be referenced by more than one link, which should not occur. These
messages indicate damage.
A block has been found that is not in the global free chain and is not used by any group. This error can be
reported when oas_analyzetbls or oas_validatetbls encounters a corrupt block, and is therefore unable to check
2012 Onsystex Inc.
90
These errors indicate that key area size or number of keys have been corrupted in a group header.
The group number recorded in the block header does not match the group being checked.
The offset (link to next disk block) is not a multiple of the block size, or, for a dynamic file, the offset does not
indicate an overflow file offset.
91
Each group header has an area that stores offset-record length pairs, which are sorted by offset. Each offset of a
record equals the offset of the previous record plus its length. If these conditions are not met, corruption results,
and some or all of the previous messages display.
The counter that records the number of bytes available in a block does not agree with the actual number of bytes
in the block.
The actual record length does not match the offset-length pair of the record.
The actual count of free blocks for a group does not match the counter in the group header.
A block is linked to the free block list but not correctly initialized. Blocks linked to the free list should have no
bytes used and should be normal blocks (not header blocks).
92
In OASYS hashed files, a long record always starts from the beginning of a level one overflow block, which is
flagged as STARTLONG. Each intermediate block is flagged as MIDLONG, and the last block is flagged as
ENDLONG. If the length of a long record does not match header information, or if any flag in its data blocks is
incorrect or the pointer in the chain gets broken, oas_analyzetbls and oas_validatetbls report messages like the
preceding ones.
Part
10
94
10
10.1
OAS_NoGlobalSlots
This parameter defines the number of hash buckets system-wide, used to hold the lock names in shared memory.
This setting directly affects performance. Normally, the default value of this parameter should not be changed.
However, if you notice significant degradation in performance, or your application intensively accesses specific
files, you should increase this parameter. The value should be the closest prime number to OAS_MaxUsers * 3.
OAS_NoLocalSlots
This parameter determines the number of hash buckets for the local lock table, and is highly application
dependent. If the application requires a large number of locks in one transaction (more than 20), this setting
should be increased from the default of 23. The setting should be the closest prime number to the maximum
number of locks per transaction.
OAS_NoBlockingNode
This parameter defines the number of lock nodes allocated for each memory request, and is highly application
dependent. If your application requires a large number of locks in one transaction, this setting should be
increased to the maximum number of locks per transaction * 2.
OAS_BytesperNode
This parameter specifies the segment size for each shared memory segment required for OASYS Locking. The
maximum number of segments is 16. Large application environments require a larger size. The default value is 10.
OAS_BytesperNode must be greater than 4096 and less than OAS_MaxShmSize. The formula for determining
OAS_MaxShmSize is OAS_MaxUsers * maximum number of locks per transaction * 512. OAS_MaxShmSize
should be a multiple of 4096.
10.2
95
Locking in OasBasic
A series of OASBasic commands enable users to set read-only locks and exclusive locks on OASYS files and
their contents.
Description
FILELOCK
Locks the data or dictionary portion of a OASYS file against access by commands
that check locks.
Unlocks a file previously locked with the FILELOCK command.
Assigns the values found in successive attributes of a record to corresponding
elements of a matrix and sets a read-only lock on the record.
FILEUNLOCK
M ATREADL
M ATREADU
M ATWRITE
M ATWRITEU
READBCKL
Retrieves one record from a B+ tree based alternate key index and places a readonly lock on the record. Each subsequent READBCKU retrieves the previous
record in the index.
READBCKU
Retrieves one record from a B+ tree based alternate key index and places an
exclusive lock on the record. Each subsequent READBCKU retrieves the previous
record in the index.
Retrieves one record from a B+ tree based alternate key index and places a readonly lock on the record. Each subsequent READBCKU retrieves the next record in
the index.
READFWDL
96
READFWDU
Retrieves one record from a B+ tree based alternate key index and places an
exclusive lock on the record. Each subsequent READBCKU retrieves the next
record in the index.
Reads a specified record from a file, assigning the record contents to a dynamic
array and setting a read-only lock on the record.
OAS Basic Commands for Locking Files and Records
READL
Command
Description
READU
Reads a specified record from a file, assigning the record contents to a dynamic
array and setting an exclusive lock on the record.
READVL
READVU
RECORDLOCKL
RECORDLOCKU
RELEASE
WRITE
WRITEU
WRITEV
WRITEVU
10.3
Resource Locks
In both OASYS and OASBasic, you can reserve a system resource by setting a semaphore lock on it.
Note: Certain device handling commands (T.ATT, T.DET, LINE.ATT, and LINE.DET) set semaphore locks.
The following table lists commands for explicitly reserving system resources from the ECL prompt.
Command
Description
UNLOCK
LOCK
(ECL and OASBasic)
Note: Although the LOCK and UNLOCK commands enable users to set and release semaphore locks, OASYS
does not necessarily use system-level semaphores to control access to system resources. The output from LIST.
LOCKS and oas_ipcstatus may not appear to be consistent, but OASYS is functioning correctly.
10.4
97
Listing Locks
OASYS offers three commands for listing record and file locks, semaphore locks on system resources, and
processes waiting to get locks.
10.4.1 LIST.READU
The ECL LIST.READU command enables any user with access to the ECL prompt to display a list of file and
record locks set on the system.
Syntax:
LIST.READU [user_number | ALL | FILENAME filename | USERNAME user_name] [DETAIL]
Parameters
The following table describes each parameter of the syntax.
Parameter
Description
user_number
ALL
FILENAM E filename
USERNAM E
user_name
DETAIL
Examples
The following example illustrates the output from the LIST.READU command when you do not specify any
options.
The next example illustrates the output from the LIST.READU command when you specify a user number. The
user number can be found in the output from the LIST.QUEUE and LIST.READU commands under the UNBR
column.
The next example illustrates output from the LIST.READU command when you specify a user name.
The final example illustrates output from the LIST.READU command when you specify a file name.
LIST.READU Display
2012 Onsystex Inc.
98
The following table describes the output from the LIST.READU command.
Column Heading
Description
UNO
UNBR
UID
UNAM E
TTY
Column Heading
Description
FILENAM E
RECORD_ID
M
TIM E
DATE
10.4.2 LIST.LOCKS
Use the ECL LIST.LOCKS command to display semaphore-type locks that reserve system resources for
exclusive use. These locks can be set individually with the LOCK command. They are also set by other ECL
commands, including T.ATT.
Syntax:
LIST.LOCKS
The following examples shows the LIST.LOCKS command and its output:
Note: If you need to clear a semaphore lock that has been left set, you need to note the UNBR and the lock
number for the lock. In the example, the lock number is 1 for the lock displayed.
10.4.3 LIST.QUEUE
The ECL LIST.QUEUE command displays a list of all processes waiting to get locks. If a process is waiting for a
lock, LIST.QUEUE displays information about the holder of the lock and processes waiting for the lock. Locks are
set by each oas process through the general lock manager (OASYS Locking) module.
Syntax:
LIST.QUEUE [USERNAME user_name | FILENAME filename | user_number][DETAIL]
99
10.4.4 Parameters
The following table describes each parameter of the syntax.
Parameter
USERNAM E
user_name
FILENAM E filename
user_number
Description
Lists all locks the user is waiting for. user_name is the operating
system logon name.
Lists all users waiting for locks for the file name you specify.
Lists all locks for which the user_number is waiting. The user number
can be found in the UNBR column of the LIST.READU and LIST.
QUEUE output.
DETAIL
The following example illustrates the output from the LIST.QUEUE command when you do not specify any
parameters.
The next example illustrates the LIST.QUEUE output when you specify a user name:
The next example illustrates the LIST.QUEUE command output when you specify a file name:
The final example shows the output from the LIST.QUEUE command when you specify a user number:
100
Description
The name of the file holding the lock.
The record ID holding the lock.
M
OWNER
UNBR
UNO
Column Heading
TTY
TIM E
DATE
Description
The Terminal device of the user owning the lock.
The time the lock was set.
The date the lock was set.
LIS T.QUEUE Owner Display (continued)
The next table describes the LIST.QUEUE display for the processes waiting for locks.
Column Heading
FILENAM E
RECORD_ID
Description
The name of the file for which a lock is requested.
The record ID of the record for which a lock is requested.
WAITING
UNBR
UNO
TTY
TIM E
DATE
The following example illustrates the LIST.QUEUE display when you specify the DETAIL option:
The following table describes the owner information the LIST.QUEUE command displays when you specify the
DETAIL option.
Column Heading
FILENAM E
RECORD_ID
M
Description
The name of the file for which a lock is held.
The record ID of the record for which a lock is held.
The type of lock held. X is an exclusive lock, S is a shared lock.
INBRH
INBR
DNBR
OWNER
UNBR
UNO
TTY
TIM E
DATE
101
The high integer of the inode of the file holding the lock.
The low integer of the inode of the file holding the lock.
Used in conjunction with the INBR to define the file holding the lock at
the operating system level.
The user name of the process holding the lock.
The process ID (pid) of the user holding a lock.
The sequential number OASYS assigns to the oas process holding a lock.
The terminal device of the user holding a lock.
The time the lock was set.
The date the lock was set.
LIS T.QUEUE Detail Display
The following table describes the waiting information the LIST.QUEUE command displays then you specify the
DETAIL option.
Column Heading
FILENAM E
RECORD_ID
Description
The name of the file for which a lock is requested.
The record ID of the record for which a lock is requested.
M
INBRH
INBR
Column Heading
DNBR
WAITING
Description
Used in conjunction with the INBR to define the file for which a
lock is requested at the operating system level.
The user name of the process requesting a lock.
UNBR
UNO
TTY
TIM E
DATE
102
10.5
Description
The process ID (pid) that holds the lock. This number
is UNBR in the LIST.LOCKS display.
The number of the locked system resource. If you do
not specify locknum, the command clears all locks set
by usrnbr.
S UPERCLEAR.LOCKS Parameters
103
[record.id]
Description
The process ID that holds the lock. This number is
UNBR in the LIST.READU display.
The inode number and device number for the file that
has the lock set. These numbers are INBRH, INBR and
DNBR in the LIST.READU display.
The identifier for the record to clear. This number is
RECORD ID in the LIST.READU display.
S UPERRELEAS E Parameters
Note: If you execute SUPERRELEASE and specify only usrnbr, you release all record locks held by the process
ID corresponding to usrnbr.
The following example shows the effect of SUPERRELEASE:
10.6
104
Part
11
106
11
11.1
Adding Users
To access OASYS on your system, each user needs a valid Windows account, including an MS-DOS logon ID
and password. In Pick systems, where each logon account must be a Pick account, shared logon IDs and
passwords are common. In contrast, OASYS allows multiple relationships between user logon IDs and OASYS
accounts. A user may have access to more than one OASYS account, and many users can access a single
OASYS account using separate logon IDs. Therefore, Onsystex strongly recommends you set up a separate
Windows account for each user. Onsystex recommends separate logon IDs for the following reasons:
It is easier to identify processes and locks belonging to an individual user, which facilitates
troubleshooting.
Using separate logon IDs allows you to define your users responsibilities for protecting their passwords
and your data.
107
Enter the path to the users home directory in the Local Path box in the Home folder section, then click OK.
108
Enter the path to the users login script, enter the path where the logon script resides in the User Profile Path
box, the script name in the Logon Script box, and then click OK.
11.2
Description
ECL command; displays a list of users currently logged on to the
system, including users who are not OASYS users.
ECL command; displays a list of current OASYS sessions.
OASYS system-level command; enter at a M S-DOS prompt;
displays the same information as the ECL LISTUSER command.
ECL command; displays login ID for the current OASYS session.
OAS YS Commands for Monitoring User Processes
109
M ario
M ario
Console
Console
:LISTU SER
Effective users..:
oas
8 /8
oasSql Total
0
O ASN O U SR N B R U ID U SR N AM E U SR TY PE TTY
1 50512 197608 M arco
oas
pts/1 Console
2 55168 197608 M arco
oas
pts/2 Console
Notice that the output of the WHO command includes the user name but not the process ID. Also, output from
the LISTUSER command includes a series of identifications: OASNO (OASYS user number), USRNBR (the pid),
UID (the users uid number), and USRNAME. Displaying further information about a OASYS process typically
requires the pid (USRNBR).
11.3
Description
First attempts to gracefully exit and allow a write in progress to
complete. If the command is not successful in five seconds, force logs
out a user, which may interrupt a write in progress, potentially causing
file corruption.
OAS YS Commands for Removing User Processes
You can log yourself out using the stopoas command, but you must log on as an Administrator to log out other
users using stopoas. You must log on as an Administrator to execute oas_removeuser.
Warning: Both of these commands can disrupt the consistency of your database, and oas_removeuser can also
corrupt data. Do not use these commands should as a substitute for normal user logout.
110
Note: Be careful with TIMEOUT. Because this command can cause a OASBasic program to terminate at an
INPUT statement rather than concluding normally, using TIMEOUT can cause inconsistent data in your
database.
Part
12
112
12
12.1
12.1.2 Troubleshooting
Check cables and connections.
Check power to print device and check print device for error conditions.
Print a file to the print device. If you cannot print to the device from outside OASYS, you will not be able to
print to it from within OASYS. Missing printer drivers or restrictive permissions to a device can result in print
jobs failing.
113
Click Network printer, and then click Next to display the Specify a Printer dialog box, as shown in the following
example:
114
If you know the name of the printer, enter the path in the Name box. If you are connecting to a printer on the
internet or on your intranet, enter the URL of the printer in the URL box. If you do not know the name of printer,
click Browse, then click Next. The Browse for Printer dialog box appears, as shown in the following example:
Local Printer
A local printer is a driver you can create that identifies a print device. When you define a local printer, your
workstation becomes the print server for that printer. A local printer may point to a network print device, but you
define the printer configuration on your workstation.
115
12.2
116
By using RAW spooler mode (the default in OASYS), you can control formatting by using printer-specific escape
sequences rather than spooler options.
117
If your local printer identifies a device local to your workstation or server, scroll through the list of ports and
select the check box the one where the printer is connected. Click Next and proceed to step 5.
If your local printer identifies a network print device, scroll through the list of Available Ports to determine if the
UNC identifier for the network print device is listed with Local Port as its description.
If so, proceed to step 5. If the network print device is not on the list, or its description is not Local Port, click
2012 Onsystex Inc.
118
Create a new port. Select Local Port from the Type list, then click Next. The following dialog box appears:
Select the manufacturer and model of your printer. If your printer came with an instal-lation disk, click Have Disk.
If the manufacturer or model of your printer is not listed, see your printer documentation for a a compatible
printer. Click Next.
Enter a name for the local printer in the Name Your Printer dialog box, as shown in the following example:
119
Warning: Do not use spaces in the printer name. Although Windows platforms allow spaces in the name (for
instance, LASER PRINTER), the OASYS SETPTR command does not support names that contain spaces. If
you use a name containing spaces with the DEST or AT options of SETPTR, the command fails.
You can share your printer with other users on the network. In the following dialog box, enter a name for the
shared printer, or select Do not share this printer.
Note: You may share a local printer if you wish. However, sharing a local printer offers no advantage in
OASYS. OASYS only recognizes local printers created on the same Windows system where you are running
OASYS. Also, OASYS does not use the share name to recognize a printer. Rather, OASYS uses the printer name
you entered previously.
When you click Next after defining Sharing properties, a dialog box similar to the following appears:
120
Tip: Onsystex recommends you print a test page to verify the printer setup.
Click Finish. A dialog box similar to the following example appears:
Click Finish to add the printer to your machine. An icon for the printer appears in the Printers window.
Display the Properties sheet for the printer you just created. The following table summarizes the dialog tab.
Dialog Tab
Purpose
General
Ports
Scheduling
Dialog Tab
Sharing
Security
Device Settings
121
Views or edits times the printer is available, job priority, and job handling.
Printer Properties S heet
Purpose
Shares or unshares your printer.
Views or edits permissions, ownership, auditing.
M aps forms to trays/feeders.
Printer Properties S heet (continued)
Note: Use caution modifying device settings. You can enter settings for a local printer that are inconsistent
with the underlying print device.
Note: You must have Full Control permissions on a printer to assign a default form. Click Security, and then
click Permissions on the Property sheet to determine what permissions you have.
To assign a default form to a printer, right-click the printer for which you want to set the default, click Properties,
then click Printer Properties. A dialog box similar to the following example appears:
Select the desired form from the Form Type list. If the form you want is not included in the list, see Creating a
Form on page 14-20. You can also choose copies, orien-tation, and duplex options from this dialog box.
Note: Options you select on either this tab or the Advanced tab only work if the network print device supports
them.
Click OK when your selections are correct.
Note: Although you can select Copy Count from this tab, the value you select here is overridden in OASYS by
the COPIES option of the SETPTR command.
12.3
Creating a Form
Windows platforms store information about forms that are available on your current Windows system. Not all the
forms are available for all print devices, because each print device supports particular sizes of stock and loading
122
devices. To view the list of forms available on your system, from the Start menu, click Printers and Faxes. Click
the File menu, then click Server Properties, then click the Forms tab. A dialog box similar to the following
example appears:
Select the Forms tab on the properties sheet, and complete the following steps to create a new form.
123
Note: Although you can create forms of varying sizes, you cannot select a particular form for use on a
particular printer unless the print device can support that size of stock. Refer to your Windows documentation
and the documentation for your print device for information about constraints.
The new form now displays in the form list.
Click OK to exit the Forms tab.
12.4
Description
Logical printer unit number that is internal to OASYS. You can map this to a Windows
printer with the DEST or AT option. M ust range from 0 through 254; default is 0.
124
[width]
The number of characters per line; must be from 0 to 1024; default is 132.
[length]
[topmargin]
The number of lines per page; must be from 1 to 32,767 lines; default is 60.
The number of lines to leave blank at the top of each page; must be from 0 to 25; default
is 3.
[bottommargin]
The number of lines to leave blank at the bottom of each page; must be from 0 to 25;
default is 3.
Allows you additional flexibility to direct output; default is 1; see separate table.
[mode]
[options]
[spooler_options]
Report formatting and printer control options. For more infor-mation, see SETPTR
Options.
Options that are valid with the Windows spooler. See separate table for list of supported
options. Supply these options in a quoted string.
S ETPTR Parameters
Note: Users familiar with Pick conventions should be aware that printer unit numbers set with SETPTR are
not the same as Pick printer numbers. SETPTR allows you to define logical printer units, which may be, but
are not necessarily, linked to specific printers. OASYS printer unit numbers are used with the PRINT ON
statement in OASBasic to allow multiple concurrent jobs. Pick printers (forms) are specified with the DEST
option of SP.ASSIGN.
The next table describes modes for the SETPTR command.
Mode
Description
1
2
3
6
9
Description
BANNER [string]
M odifies the default banner line (which is the Windows user ID). Depends on
M ODE setting; also modifies SpoolJobs entry name.
BANNER UNIQUE
[string]
M odifies the default banner line, and automatically uses attribute 1 (NEXT.HOLD)
in the dictionary for the SpoolJobs file to create unique entry names for jobs sent to
SpoolJobs.
Directs OASYS NOT to prompt for verification upon execution of SETPTR.
BRIEF
COPIES n
DEFER [time]
DEST unit (or AT unit)
Prints n copies of the print job. Does not work with mode 3.
Delays printing until the specified time. Specify the time in HH:M M format. Does
not work with mode 3.
Directs output to a specific printer or queue. The unit may be either a local printer
or a network printer.
S ETPTR Options
Option
DEVICE name
EJECT
Description
Used with mode 2 only. Directs output to the Windows device (for instance, a
COM port) identified by name.
Ejects a blank page at the end of each print job.
NOEJECT
LNUM
NFM T or NOFM T
NHEAD or NOHEAD
OPEN
The next table describes spooler options you can specify in a quoted string.
Option
Description
Orientation
PaperSource
Default paper source; must match an available paper source listed on the Device
S ettings tab of the printers Properties Sheet.
Duplex
Form
Form to use (for instance, Letter). M ust match an available paper size listed on the
Device S ettings tab of the printers Properties Sheet.
S ETPTR S pooler Options
Option
Description
M ode
Prefix
Font
FontSize
FontStyle
LeftM argin
RightM argin
TopM argin
Top margin of the page, in inches. TopM argin is measured beginning at the value of
the SETPTR topmargin option (default is 3 lines). If topmargin is 3 lines (the
default) and TopM argin = 1, the first printed line is one inch below the third line on
the page.
S ETPTR S pooler Options (continued)
125
126
Option
BottomM argin
Priority
JobState
Description
Bottom margin of the page, in inches.
BottomM argin is measured beginning at the value of the SETPTR
bottommargin option (default is 3 lines). If bottom-margin is 3 lines (the
default) and BottomM argin = 1, the first printed line is one inch above the
third line from the end of the page.
M ust be from 1 to 99, where 1 is minimum priority and 99 is maximum.
The only valid value is PAUSE, which stops all jobs to the print unit.
You can reverse this option from the Printers applet.
S ETPTR S pooler Options (continued)
12.4.1 Examples
You can define local or network printers to OASYS using the SETPTR command, as shown in the following
examples:
127
command or LPTR with no print unit specified, OASYS directs your print job to LETTER.
Use SETPTR unit to display the current settings for a print unit.
When you specify spooler options (TopMargin, BottomMargin), OASYS automatically recalculates the width
and length taking these into account. When you specify formatting options in a quoted string, OASYS
implicitly changes the spooler Mode from RAW (the default) to WINDOW.
You can specify spooler options in a quoted string either before or after SETPTR options like AT, DEFER.
You can map a printer unit to a network print device even if that device is not displayed in your Printers dialog.
After you have defined printers with SETPTR, you can display a list with the LISTPTR command, as shown
below:
Only users with Full Control permissions on a printer can control the printer with PTRDISABLE and
PTRENABLE. Check Permissions on the Security tab of the Properties sheet for the printer to determine who
has permissions.
Notice that the argument for PTRDISABLE and PTRENABLE is the name of the printer (as specified with DEST
or AT in SETPTR).
You can use the ECL SP.STATUS command to display information about printers defined with SETPTR and print
2012 Onsystex Inc.
128
The status of all the printers is Running, and the network print device has a deferred job.
Depending on how a print device was configured, users in console sessions may see printer notification
messages when a job completes.
Note: The Printing Notification only displays if you log on to a console session. If you log on to OASYS
through Telnet, you will not see the notification.
129
RAW Mode
In RAW mode, the default, all formatting is controlled by printer-specific escape sequences you include in your
print job. OASYS writes to the spooler device using the WritePrinter win32 API call. RAW mode enables you to
migrate existing applications and utilities without rewriting printing logic.
WINDOW Mode
In WINDOW mode, formatting is controlled by your selection of SETPTR options and spooler options. You can
print in WINDOW mode by specifying Mode=WINDOW on the SETPTR command line or by including any of
the spooler options (Form, Font, FontSize, Orientation, FontStyle, DefaultSource, or Duplex) that only work in
WINDOW mode.
Examples
In the following example, the spooler mode is changed from RAW (the default) to WINDOW. Notice that OASYS
2012 Onsystex Inc.
130
In the next example, setting Font to COURIER implicitly changes the spooler mode to WINDOW, even though
the display does not indicate this. Notice that width and length were adjusted:
131
If you combine incompatible options on the SETPTR command line, the command fails with an error message as
shown in the following example:
12.5
Description
SETPTR
SPOOL
132
PTRDISABLE or
STOPPTR
Pauses a Windows printer. You must supply the printer name (the name you used with the
DEST or AT option) rather than the OASYS logical print unit number.
PTRENABLE or
STARTPTR
Resumes a Windows local printer. You must supply the printer name (the name you used with
the DEST or AT option) rather than the OASYS logical print unit number.
SP.CLOSE
SP.ASSIGN
SP.EDIT
SP.KILL
SP.OPEN
SP.STATUS
LISTPTR
LISTPEQS
Note: See the OASYS Commands Reference for the syntax of these ECL commands.
Part
13
134
13
13.1
Records beginning with an underscore are compiled programs. Other records are OASBasic source files.
Note: Use the ECL RUN command to execute a compiled program. See the OASYS Commands Reference and
Developing OASBasic Applications for information about the RUN command.
13.2
135
136
If not, oas_objmanager loads a copy into one of its shared memory segments for you to execute.
Any object file located in the OASHOME\sysprog\CTLG file system is handled by oas_objmanager, regardless
of how the program is accessed.
The oas_objmanager process can manage up to 20 shared memory segments for globally cataloged programs.
OASYS determines the size of each segment by the OAS_MaxCatalogBytes parameter in the OASYS
configuration file (\OASHOME\include\oasconfig). The default value for OAS_MaxCatalogBytes is 1,048,576
bytes (1 MB), which is set when you install OASYS. You will encounter runtime errors if this size is
insufficient. You can increase the segment size as long as you do not exceed the configuration parameter
OAS_MaxShmSize.
Tip: See Appendix A OASYS Configuration Parameters for more information about OAS_MaxCatalogBytes
and OAS_MaxShmSize.
13.3
137
The _MAP_ file also contains information about the contents of a global catalog. In addition to the information
in CTLGTB, _MAP_ includes the size of each compiled program, the date it was cataloged, and the last date it
was executed. The _MAP_ file is not dynamically maintained by OASYS. The ECL MAP command updates the
_MAP_ file to reflect recent activity. The MAP command clears the _MAP_ file, updates the file, and displays its
contents, as shown in the following example:
138
By default, the CTLGTB file and the _MAP_ file are located in the same directory as the global catalog:
OASHOME\sysprog.
Tip: The CTLGTB file and the _MAP_ file are OASYS hashed files. You can display records in these files with
standard ECL and OASQuery commands to determine if particular programs are in the global catalog.
program.name
Description
Name of the file containing the program (BP, for instance).
Name given to the program when you executed CATALOG. For example, the
command CATALOG BP TRIAL TEST creates a global catalog entry named
TRIAL from a program called TEST. So catalog.name is TRIAL.
Name of the program source file. In the example in the previous row of this
table, program.name is TEST.
VCATALOG Parameters
Note: If catalog.name and program.name are the same, you need only supply the name once.
139
In the example, notice that recataloging the program did not make the program verify. This result indicates that
the source code was changed, but was not recompiled or recataloged. After the source code was recompiled and
recataloged, the program verified successfully.
See the OASYS Commands Reference for more information about the VCATALOG command.
Subroutines
If a subroutine is recataloged while the main program is running, users will not execute the newly-cataloged
subroutine until the next time they execute the main program. This prevents inconsistent execution of a
subroutine during one execution of the main program. Under certain circumstances, however, a user or system
administrator can override the default behavior. Overrides are dangerous in a production environment, but may
be useful in a development or test environment.
NEWVERSION Keyword
The NEWVERSION keyword for the CATALOG command allows a user logged on as an Administrator to
dynamically replace a globally cataloged subroutine. If a subroutine is cataloged with NEWVERSION, any user
executing the main program accesses the new version of the subroutine with the next CALL or EXECUTE of the
subroutine, rather than waiting until the main program completes. Consider the following sequence of events:
1. A user executes the main program MAIN.
2. MAIN calls a subroutine called SUBR, which completes and returns to MAIN.
3. MAIN continues with other processing.
4. MAIN calls SUBR again. SUBR completes and returns to MAIN.
5. MAIN completes.
If SUBR is recataloged after step 1 without the NEWVERSION keyword, the same version of SUBR is used for
both calls (step 2 and step 4). With the next execution of MAIN, the newly cataloged SUBR is used.
If SUBR is recataloged after step 1, with the NEWVERSION keyword, there are three possible results:
140
CATALOG happens after step 1 but before step 2. In this case, the newly cataloged SUBR gets accessed in
both step 2 and step 4.
CATALOG happens after step 2, but before step 4. In this case, the prior version of SUBR gets accessed in
step 2, and the newly cataloged version gets accessed in step 4.
CATALOG happens after step 4. In this case, the prior version gets accessed in both step 2 and step 4. With
the next execution of MAIN, the newly cataloged SUBR is accessed.
Warning: Using the NEWVERSION keyword to CATALOG a subroutine can produce inconsistent results for
users who are currently executing the main program. For example, the number of arguments could change.
The following sample CATALOG command shows the syntax including the NEWVERSION keyword:
Description
path
userno...
In the example, the newly cataloged subroutine is dynamically available to cgustafs, the owner of user number
2664. If cgustafs is executing a main program that calls a subroutine, the next call to the subroutine accesses the
newly cataloged version. For all users other than cgustafs, the default behavior remains in effect. The newly
cataloged subroutine is activated with the next execution of the main program, not the next subroutine call. Notice
that, in the example, the subroutine is globally cataloged; this command works with locally or directly cataloged
2012 Onsystex Inc.
141
routines as well.
NEWPCODE Command
The ECL NEWPCODE command dynamically activates a cataloged subroutine. This command is useful if a
developer uses a OASBasic shell program to modify, recompile, recatalog, and retest a OASBasic program
without exiting to ECL.
Syntax:
NEWPCODE path
path is the absolute path of a cataloged subroutine. The following example shows one use of the NEWPCODE
command executed in a OASBasic program:
In the example, a user executing MAINPROG accesses the current version of MAINPROG2 in the first statement.
Including the NEWPCODE command before the next execution of MAINPROG2 causes the program to access the
newest version. (In the example, MAINPROG2 was recompiled and recataloged after the first step, so the next
execution accesses the newly cataloged MAINPROG2.)
Tip: If you are developing programs with the AE editor, the N option of the FI command equates to the
NEWPCODE command. For example, FIBCFN compiles a program and catalogs it (locally) with NEWPCODE.
You need to use F (force) in conjunction with the N option. See the online help for the AE editor or Developing
OASBasic Applications for more information.
Note: The NEWPCODE command is effective only in the oas session where it is executed. Although
NEWPCODE is an ECL command, you cannot affect a different user or even a different window with
NEWPCODE.
13.4
In the example, two users are executing AE, and two are executing AE_AE. The oas_objmanager daemon
maintains the counter, incrementing it as users execute a program and decreasing it as users complete execution.
When the counter for a routine reaches zero, oas_objmanager removes the copy of the compiled program from
shared memory, making the space available for other programs as needed.
Tip: If you run oas_objrunning regularly throughout your processing cycle, you can learn which programs are
used most heavily. This information is useful if you are troubleshooting an application performance problem.
Note: The reference counter is not decremented when a user terminates abnormally (for example, when a
2012 Onsystex Inc.
142
process is killed). Because of this, the count may be inaccu-rately high, causing excess memory to remain held.
Stopping and restarting OASYS resets the counter and releases memory.
13.5
143
144
2. Execute oas_newhome
Execute the oas_newhome command, indicating the path to the new account. In this example, a new directory,
FirstAccount, will be created under \OAS61\FirstAccount.
Notice that the oas_newhome command is executed from the ECL prompt, and therefore is preceded by the ! ECL
command:
145
You do not need to log on as an Administrator to edit the VOC entries; however, you need write permissions on
the VOC file in each account.
Notice that AE is running twice, but that the two copies are cataloged in different global catalog spaces.
Part
14
14
147
14.1
Description
Defines a logical tape unit in OASYS; must precede any other tape
commands.
Links a logical tape unit to a OASYS process; must precede any reads/
writes involving the tape.
T.BAK
T.CHK
T.DET
T.DUM P
T.EOD
T.FWD
T.LOAD
T.RDLBL
T.READ
Reads and displays the first 80 characters of the tape label on a tape
created with T.DUM P.
Reads and displays the next record from tape.
T.REW
T.SPACE
T.STATUS
T.UNLOAD
T.WEOF
Note: See the OASYS Commands Reference for information about ECL commands.
The next table summarizes OASBasic commands for I/O on tape devices.
Command
Description
READT
RESIZET
REWIND
WEOF
WRITET
Note: See the OASBasic Commands Reference for information about these OASBasic commands.
148
14.1.1 SETTAPE
Syntax:
SETTAPE unit.no [dn.path.nr][dn.path.r][blocksize]
Description
The SETTAPE command defines logical tape units in your OASYS environment. This command establishes a link
between a OASYS internal tape unit number and a tape device. You can use SETTAPE to relate unit number to
tape devices or disk files. Any user can execute SETTAPE unit.no to display the current settings for a tape unit.
However, you must log on as an Administrator to define a tape unit or modify settings. Once a tape unit has been
defined using SETTAPE, it can be accessed by users in any OASYS account on your system. The tape unit
definition remains the same unless it is changed by an Administrator.
Writing to a Device
To relate a tape unit number to a tape device, use the full UNC format for the device name in the SETTAPE
command syntax. The following example shows how to identify a tape device with SETTAPE:
Writing to a File
To relate a tape unit number to a disk file, use the full path and file name in the SETTAPE command syntax. The
disk file must already exist. The following example shows how to identify a disk file with SETTAPE:
Parameters
The following table describes the parameters of the SETTAPE syntax.
Parameter
Description
unit.no
Internal OASYS tape unit number. M ust be from 0 to 9. The default tape
unit is 0.
Device name, in UNC format, or full path and file name of disk file for no
rewind device driver for unit.no.
Device name, in UNC format, or full path and file name of disk file, for
rewind device driver for unit.no.
Tape block size in bytes; must be a multiple of 512. If you do not
specify blocksize, the default value is 4096.
S ETTAPE Parameters
[dn.path.nr]
[dn.path.r]
[blocksize]
14.2
149
When you define a tape device or modify a definition, you create or update an entry in the text file OASHOME
\sysprog\tapeinfo.
Notice that the tape devices for tape units 1 and 2 are actually disk files. A:\TAPEFILE is a FAT file,
while \USERS\DEFAULT\TAPEFILE is a NTFS file. When using a disk file as a tape device the functionality is
naturally limited to simple loads and unloads, but this may be useful for demonstration or testing.
Warning: Do not specify a disk drive (for instance, A:) as a tape device. SETTAPE may succeed, but you will be
unable to write to the disk drive. If you wish to dump files to disk, create disk files and then specify the disk files
as tape devices.
150
Part
15
152
15
15.1
15.2
153
For information about file sizing commands, see the OASYS Commands Reference.
154
15.3
OasBasic Profiling
OASYS allows users to generate execution profiles that track call counts and execution times for OASBasic
programs, internal subroutines, and program calls. You can use these profiles to identify sections of your
OASBasic application that are called most frequently, and then focus optimization efforts in those areas.
Complete the following steps to create OASBasic execution profiles.
155
In this example, the main program is called TIME_TST. It has three internal functions, named A, B, and C.
Note: profile.pid reports execution times as CPU execution time, while profile.elapse.pid reports real time.
Each profile display includes two sections. The top section presents summary infor-mation, and the bottom
section presents detail. The following table describes the fields in the top section of a OASBasic Profile display.
There is one line for each function of the program.
Field
%time
cumsecs
seconds
calls
name
Description
Percentage of the total run time of the program used by the function
Running sum of seconds the function and those listed above it used
within a cycle
Number of seconds used by the function in a cycle
Number of times the function was invoked in a cycle
Name of the function
OAS Basic Profiling: S ummary Information
OASYS sorts program functions by execution time, and assigns an index to each function for ease of reporting.
For each index, OASYS computes information about functions that call, or are called by, the function
corresponding to the index. The detail section of a profile contains this information, grouped by index. The next
table describes the fields in the detail section.
Field
Description
156
index
%time
self
descendents
called
Field
called+self
name
index
Description
Reported for the current index function; the number of times the function is
called by others, plus the number of times the function calls itself
recursively.
Function name.
Index value assigned to the function.
OAS Basic Profiling: Detail Information (continued)
The following screen shows one group of data, selected from the sample OASBasic profile:
This subset of the report contains data relative to the internal function A, which is identified by index number 2.
Parent functions, or functions which call A, are listed above it; descendents, or functions called by A, are
listed beneath it.
In the example, the report indicates that 97.6% of the execution time for the entire program is used by A. The
function is called 5 times, all by the main program, BP/TIME_TST. In turn, A is responsible for all 60 of the calls
to B, and 15 of the 1,215 calls to C.
Part
16
158
16
Appendix A
OAS Configuration Parameters
This appendix lists the names and descriptions for all OASYS configuration param-eters as of Release 7.1. See
Chapter 7, Configuring Your OASYS System, for more information about modifying your oasconfig file.
The following tables describe the configuration parameters that are placed in the oasconfig file located in \
OASHOME\include at the time of installation. They are system-dependent and should not be changed.
Parameter
Description
OAS_BlockingSequence The locking sequence of processes in the system. This parameter should not be changed.
OAS_BlockingStrategy Type of P/V operations used for the Recoverable File System (RFS) only. Determined at
installation; platform dependent. Do not change unless instructed by Onsystex.
oasconfig File Parameters that should not be changed
Description
OAS_M axTables
Number of physical files that can be opened at the operating system level at one time in
a OASYS session. This limit is for both oas and tm processes; the name of the
corresponding kernel parameter varies among OS versions.
Limit for number of OASYS user processes (such as oas and PHANTOM ) that can run
at the same time.
Switch for turning on and off messaging to your console. M ust be greater than zero for
messages to display at console.
Path of a directory for storing intermediate work files. Default is \OASYS\ud61\temp.
Specifies a character to print to represent the null value. The ASCII character that
represents the null value is nonprinting.
Used with OASYS Physical Lock M anager. If a Linux platform supports test-n-set
instruction, OAS_BlockingStrategy is set to 3 and OAS_TestandSet is set to 0. If a
Linux platform does not support test-n-set instruction, OAS_BlockingStrategy is set to
2 and OAS_TestandSet is set to 1. Do not change this parameter unless instructed to do
so by Onsystex.
If OAS_TestandSet is set to 0, the length of time (in milli-seconds) that a process waits
to access a shared memory address held by another process. This parameter has no effect
if OAS_TestandSet is set to 1. Do not change unless instructed to do so by Onsystex.
OAS_M axUsers
OAS_Console
OAS_Tmp
OAS_NULL
OAS_TestandSet
OAS_WaitM illiseconds
OAS_NullFlag
OAS_M axSystemFiles
Toggles null value handling on and off. If 0, null value handling is off. M ust be greater
than 0 for null value handling to be in effect.
M aximum number of Linux file systems allowed. If you have more than 200 Linux file
systems, increase to your number of file systems.
oasconfig File Parameters that may be changed
Parameter
Description
OAS_NoGlobalSlots
The number of hash buckets systemwide, used to hold the lock names in shared
memory. This setting directly affects performance. Normally, the default value of
this parameter should not be changed. However, if you notice significant
degradation in performance, or your appli-cation intensively accesses specific files,
you can increase this parameter. The default value is the closest prime number to
OAS_M axUsers * 3.
159
OAS_NoLocalSlots
The number of hash buckets for the per-process locking table. This parameter is
highly application dependent. If the application requires a large number of locks in
one transaction (more than 20), you should increase this setting to the closest
prime number to the maximum number of locks per transaction.
OAS_NoBlockingNodes
The number of lock nodes allocated for each memory request. This parameter is
highly application dependent. If the application requires a large number of locks in
one transaction, this setting should be increased to the maximum number of locks
per transaction * 2.
OAS_BytesperNode
The segment size for each shared memory segment required for the lock manager.
The maximum number of segments is 16. Large application environments require a
larger size. Each oas will register the lock names it is locking in its per-process
locking table. This table is also organized as a hashed table.
oasconfig File Parameters that may be changed (continued)
Description
OAS_Language
The language group ID used to distinguish language groups that use similar special
characters. OAS_Languageis composed of the record mark, escape sequence mark, and the
null value mark. The default is 255/192/129.
Internationalization oasconfig Parameters
The following table describes shared memory related parameters. These parameters may be changed to suit your
environment.
Parameter
Description
OAS_M axCatalogBytes
OAS_M axShmSize
OAS_AttachShmDir
OAS_ShmAlignment
OAS_ShmM inAttach
OAS_NoGlobalTables
The minimum number of shared memory segments that should be kept attached to a
process.
Number of GCTs (global control tables) in CTL. Each shared memory segment is
associated with a GCT. The GCT registers the use of global pages in its associated
shared memory segment. Cannot exceed the kernel parameter shmmni.
OAS_GlobalPagesperSegment
Parameter
Description
OAS_BytesperPage
OAS_ProcessesperGroup
OAS_GlobalPagesperProcess
160
OAS_LocalPagesperProcess
OAS_BytesperLocalPage
OAS_FreePagesTx100
OAS_M axFreeSegments
The number of entries in the CI table of each LCT, which is the number of local pages
that can be attached by a process.
Size, in 512-byte blocks, of each local page in a global page. A global page is divided into
local pages, so OAS_BytesperPage must be a multiple of OAS_BytesperLocalPage.
Percentage of freed global pages in an active global shared memory segment that OASYS
keeps in the global shared memory pool. oas_shmanager checks the current percentage;
if the percentage is less than OAS_FreePagesTx100, oas_shmanager creates a new
shared segment.
The number of inactive shared memory segments that OASYS keeps in the system.
oas_shmanager checks the current number of inactive segments; if the number is larger
than OAS_M axFreeSegments, oas_shmanager returns some inactive global shared
segments to Linux.
S hared Memory oasconfig File Parameters (continued)
Description
OAS_AverageRecordLength
Number of local pages that matches the average length of records in your applications.
Specifies the length of a buffer kept by OAS for holding a record. Should not exceed the
number of local pages in a global page.
OAS_IntermediateBufferLength Number of local pages used for expression buffers.OAS keeps a buffer of this size for
intermediate results. Onsystex recommends you set this parameter so the buffer is onequarter to one-half the size of a global page.
OAS_M axSizeBasicObject
M aximum size, in bytes, of object programs that can be loaded into shared memory.
Object programs larger than this size are loaded into the users address space instead of
shared memory.
OAS_M inGlobalPagesforTemp The minimum number of local pages that should be kept for temporary buffers in a
Buff
process group. Determined at installation.
S ize Limitation oasconfig File Parameters
Description
OAS_FreeBlocksinGroup
Pertains to dynamic files only; the number of free blocks kept in the free block list
at the group level. If more blocks are freed, they are kept at the file level.
M aximum number of dynamic files that can be open concurrently, systemwide.
Default loading factor option (percent) at which a group in a dynamic file using the
KEYONLY option splits. Splitting occurs when the percentage of space in a group
occupied by keys and pointers reaches the split load. The ECL CONFIGURE.
FILE command overrides this for individual files.
Default loading factor (percent) at which a group pair in a dynamic file using the
KEYONLY option merges. A group pair is eligible for merging when the sum of the
percentages of space occupied by keys and pointers in both groups is less than
M ERGE_LOAD. The CONFIGURE.FILE command lets users override this for
individual files.
Default loading factor (percent) at which a group in a dynamic file using the
KEYDATA option splits. Splitting occurs when the percentage of space in a group
occupied by keys and pointers reaches the split load. The ECL CONFIGURE.
FILE command overrides this for individual files.
Default loading factor (percent) at which a group pair in a dynamic file using the
KEYDATA option merges. A group pair is eligible for merging when the sum of
the percentages of space occupied by keys and pointers in both groups is less than
KEYDATA_M ERGE_LOAD. The CONFIGURE.FILE command overrides this
for individual files.
OAS_M axOpenDynamicTables
OAS_SplitLoad
OAS_M ergeLoad
OAS_KeySplitLoad
OAS_KeyM ergeLoad
OAS_M axPartitionLength
161
Upper size limit, in bytes, of each partition file (dat00x) of a dynamic file. When a
part file reaches this size, OASYS does not add further blocks to it, but creates
another part file using the part table. The default value is 1073741824 bytes (1
GB). M ust be greater than 32768 bytes (32 KB) and less than 2147467264 bytes
(2 GB-16KB).
Path of a Linux text file that directs OASYS where to create dynamic file part files.
OAS_PathPartitionTable
Description
OAS_WaitBlockingTime
OAS_WaitforInput
Used by the Telnet server to specify the maximum time to wait for a lock.
Used by the OAS ts executable to specify the maximum number of seconds to wait
for input from client about device information. If the information is not provided,
OASYS starts without the device information.
Telnet oasconfig File Parameters
Description
OAS_M axJournalProcesses
M aximum number of journal processes per journal path.
OAS_M axTablesperJournalProcess M aximum number of journal files allowed per journal process.
Journaling oasconfig File Parameters
Description
OAS_M axOpenTables
OAS_M axSequentialTables
M aximum number of sequential files that can be opened at one time by OASBasic
OPENSEQ statements, per oas process.
M aximum number of Linux sequential files that can be opened at one time by
OASBasic OSOPEN statements, per oas process.
OAS_M axSystemTables
OAS_M axDynamicFileParts
Description
OAS_M axLevelExecuteCapturing
OAS_M axLevelExecuteReturning
OAS_CompressVariablePolicy
162
OAS_VarM emPct
Description
OAS_SemaphoresperGroup
Description
OAS_UseBufferswithIndexes
OAS_SetIndexValidateKeys
The following parameter is used with the OASYS Physical Lock Manager.
Parameter
Description
OAS_NodesperSlot
Description
OAS_M axDigitsSpoolJob
Enables you to specify the number of digits used for the next SpoolJobs file
number, found in the NEXT.HOLD record of D__HOLD.
OAS_ValidateSpoolJobExist
Description
163
Part
17
17
165
Appendix B
Environment Variables for OAS
This appendix lists environment variables that can be set to customize a OASYS environment. Users can set them
before entering OASYS to affect a particular OASYS session. System administrators can also set them for one or
more users to establish defaults for some or all users. The following table lists environment variables in
alphabetical order.
Parameter
CSTACKSZ
INIT_BREAKOFF
[0 | 1]
Parameter
Description
Establishes the maximum number of commands in the ECL command stack.
Each stack entry can hold a 2720 character command. The default is 49.
Enables/disables break key prior to invoking OASYS. If
INIT_BREAKOFF is not set, the break key is enabled by default.
Environment Variables for OAS YS
Description
LPREQ
Number of TRANS fields that can be kept concurrently; default value is 12;
must not be greater than 64
Number of TRANS files that can be open concurrently; default value is 32;
must not be greater than 32.
Bypasses Linux printer verification; useful for large systems with hundreds of
printers defined. Valid on OASYS for Linux only.
Environment Variables for OAS YS
Parameter
Description
SETINDEX_BUFFER_KEYS
SETINDEX_
VALIDATE_KEY
TABSTOPS
OAS_Tmp
OAS_EDIT
166
Parameter
Description
OAS_SAVELIST
Allows you to specify a default list name for each OASYS user. Set in the
users .login or .profile. Users can also specify a list name when executing the
SAVE.LIST command.
Size of a buffer used to keep select list in memory. If a select list is larger then
the size of this buffer, it will be written to a file. If OASYS_SELECTSIZE is
not defined, the system uses a buffer size of 10 KB.
Location of OASYS executables.
OAS_SELECTSIZE
OASBIN
OASERRLOG_LEVEL
OASHOM E
VFIELDSIZE
VOC_READONLY
Determines the logs to which file open errors are written. If the value of this
environment variable is equal to or greater than 2, OASYS writes file open
errors to the oas.errlog, and on Windows platforms, to the Windows event log.
Otherwise, OASYS does not log file open errors.
Location of the OASYS home directory, which contains directories including
sysprog, demo, lib, work, sybase, and include.
Increases the size for the stack of C routines used to process formulas created
in virtual fields. Default is 300. Define a larger number if users see virtual field
too big errors in OASQuery.
If set to a nonzero number, allows OASYS to run with read-only access to the
VOC file.
Environment Variables for OAS YS