Guardian Programmer's Guide
Table Of Contents
- Guardian Programmer’s Guide
- Contents
- What’s New in This Manual
- About This Manual
- Legal Notices
- 1 Introduction to Guardian Programming
- 2 Using the File System
- 3 Coordinating Concurrent File Access
- 4 Using Nowait Input/Output
- 5 Communicating With Disk Files
- Types of Disk Files
- Using Unstructured Files
- Creating Unstructured Files
- Opening Unstructured Files
- Positioning, Reading, and Writing With Unstructured Files
- Locking With Unstructured Files
- Renaming Unstructured Files
- Avoiding Unnecessary Cache Flushes to Unstructured Files
- Closing Unstructured Files
- Purging Unstructured Files
- Altering Unstructured-File Attributes
- Using Relative Files
- Using Entry-Sequenced Files
- Using Key-Sequenced Files
- Creating Key-Sequenced Files
- Opening Key-Sequenced Files
- Positioning, Reading, and Writing With Key-Sequenced Files
- Locking, Renaming, Caching, Closing, Purging, and Altering Key-Sequenced Files
- Key-Sequenced File Programming Example
- Using Alternate Keys With an Entry-Sequenced File
- Using Alternate Keys With a Key-Sequenced File
- Using Partitioned Files
- Using Alternate Keys
- 6 Communicating With Processes
- Sending and Receiving Messages: An Introduction
- Sending Messages to Other Processes
- Queuing Messages on $RECEIVE
- Receiving and Replying to Messages From Other Processes
- Receiving Messages From Other Processes: One-Way Communication
- Handling Multiple Messages Concurrently
- Checking for Canceled Messages
- Receiving and Processing System Messages
- Handling Errors
- Communicating With Processes: Sample Programs
- 7 Using DEFINEs
- 8 Communicating With a TACL Process
- 9 Communicating With Devices
- 10 Communicating With Terminals
- 11 Communicating With Printers
- 12 Communicating With Magnetic Tape
- Accessing Magnetic Tape: An Introduction
- Positioning the Tape
- Reading and Writing Tape Records
- Blocking Tape Records
- Working in Buffered Mode
- Working With Standard Labeled Tapes
- Enabling Labeled Tape Processing
- Creating Labeled Tapes
- Checking for Labeled Tape Support
- Accessing Labeled Tapes
- Writing to the Only File on a Labeled Tape Volume
- Writing to a File on a Multiple-File Labeled Tape Volume
- Writing to a File on Multiple Labeled Tape Volumes
- Reading From the Only File on a Labeled Tape Volume
- Reading From a File on a Multiple-File Labeled Tape Volume
- Reading From a File on Multiple Labeled Tape Volumes
- Accessing a Labeled Tape File: An Example
- Working With Unlabeled Tapes
- Terminating Tape Access
- Recovering From Errors
- Accessing an Unlabeled Tape File: An Example
- 13 Manipulating File Names
- 14 Using the IOEdit Procedures
- 15 Using the Sequential Input/Output Procedures
- An Introduction to the SIO Procedures
- Initializing SIO Files Using TAL or pTAL DEFINEs
- Opening and Creating SIO Files
- Getting Information About SIO Files
- Reading and Writing SIO Files
- Accessing EDIT Files
- Handling Nowait I/O
- Handling Interprocess Messages
- Handling System Messages
- Handling BREAK Ownership
- Handling SIO Errors
- Closing SIO Files
- Initializing SIO Files Without TAL or pTAL DEFINEs
- Using the SIO Procedures: An Example
- 16 Creating and Managing Processes
- 17 Managing Memory
- An Introduction to Memory-Management Procedures
- Managing the User Data Areas
- Using (Extended) Data Segments
- Overview of Selectable Segments
- Overview of Flat Segments
- Which Type of Segment Should You Use?
- Using Selectable Segments in TNS Processes
- Accessing Data in Extended Data Segments
- Attributes of Extended Data Segments
- Allocating Extended Data Segments
- Checking Whether an Extended Data Segment Is Selectable or Flat
- Making a Selectable Segment Current
- Referencing Data in an Extended Data Segment
- Checking the Size of an Extended Data Segment
- Changing the Size of an Extended Data Segment
- Transferring Data Between an Extended Data Segment and a File
- Moving Data Between Extended Data Segments
- Checking Address Limits of an Extended Data Segment
- Sharing an Extended Data Segment
- Determining the Starting Address of a Flat Segment
- Deallocating an Extended Data Segment
- Using Memory Pools
- 18 Managing Time
- 19 Formatting and Manipulating Character Data
- Using the Formatter
- Manipulating Character Strings
- Programming With Multibyte Character Sets
- Checking for Multibyte Character-Set Support
- Determining the Default Character Set
- Analyzing a Multibyte Character String
- Dealing With Fragments of Multibyte Characters
- Handling Multibyte Blank Characters
- Determining the Character Size of a Multibyte Character Set
- Case Shifting With Multibyte Characters
- Testing for Special Symbols
- Sample Program
- 20 Interfacing With the ERROR Program
- 21 Writing a Requester Program
- 22 Writing a Server Program
- 23 Writing a Command-Interpreter Monitor ($CMON)
- Communicating With TACL Processes
- Controlling the Configuration of a TACL Process
- Controlling Logon and Logoff
- Controlling Passwords
- Controlling Process Creation
- Controlling Change of Process Priority
- Controlling Adding and Deleting Users
- Controlling $CMON While the System Is Running
- Writing a $CMON Program: An Example
- Debugging a TACL Monitor ($CMON)
- 24 Writing a Terminal Simulator
- 25 Debugging, Trap Handling, and Signal Handling
- 26 Synchronizing Processes
- 27 Fault-Tolerant Programming in C
- Overview of Active Backup Programming
- Summary of Active Backup Processing
- What the Programmer Must Do
- C Extensions That Support Active Backup Programming
- Starting the Backup Process
- Opening a File With a Specified Sync Depth
- Retrieving File Open State Information in the Primary Process
- Opening Files in the Backup Process
- Retrieving File State Information in the Primary Process
- Updating File State Information in the Backup Process
- Terminating the Primary and Backup Processes
- Organizing an Active Backup Program
- Updating State Information
- Providing Communication Between the Primary and Backup Processes
- Programming Considerations
- Comparison of Active Backup and Passive Backup
- Active Backup Example 1
- Active Backup Example 2
- 28 Using Floating-Point Formats
- Differences Between Tandem and IEEE Floating-Point Formats
- Building and Running IEEE Floating-Point Programs
- Compiling and Linking Floating-Point Programs
- Link-Time Consistency Checking
- Run-Time Consistency Checking
- Run-Time Support
- Debugging Options
- Conversion Routines
- Floating-Point Operating Mode Routines
- A Mixed Data Model Programming
- Glossary
- Index

Index
Guardian Programmer’s Guide—421922-014
Index-18
M
Magnetic tape
positioning 12-4/12-11
reading, concepts of 12-11/12-13
rewinding 12-10/12-11
See also Labeled tape
See also Unlabeled tape
writing to, concepts of 12-13/12-14
Magnetic tape files 2-3
Main procedure
TNS 17-4
TNS/R native 17-9
Main stack 1-8, 16-8, 16-9, 17-6
bounds checking 17-15/17-16
sizing 17-13/17-15
use for procedure calls 17-9
Main stack, TNS/E 16-9, 17-13
MAP CLASS DEFINEs
example of 7-3/7-4
FILE attribute 2-10
purpose 2-10, 7-2
Matrix line printers, communicating
with 11-2/11-9, 11-19/11-49
MBCS 1-9, 19-49/19-65
MBCS_CHARSIZE_ procedure 19-50,
19-54/19-55
MBCS_CHARSTRING_ procedure 19-51
MBCS_CHAR_ procedure 19-50,
19-52/19-53
MBCS_CODESETS_SUPPORTED_
procedure 19-50
, 19-51/19-52
MBCS_DEFAULTCHARSET_
procedure 19-50, 19-52
MBCS_EXTERNAL_TO_TANDEM_
procedure 19-51
MBCS_FORMAT_CRT_FIELD_
procedure 19-51
MBCS_FORMAT_ITI_BUFFER_
procedure 19-51
MBCS_REPLACEBLANK_
procedure 19-50, 19-54
MBCS_SHIFTSTRING_ procedure 19-50,
19-55
MBCS_TANDEM_TO_EXTERNAL_
procedure 19-51
MBCS_TESTBYTE_
procedure 19-55/19-56
MBCS_TRIMFRAGMENT_
procedure 19-50, 19-54
MEDIACOM utility 12-21
Memory pools
debugging 17-48
defining 17-43/17-45
getting information about 17-48
getting space in 17-46/17-47
introduction to 17-42/17-43
resizing 17-47/17-48
returning space to 17-47
Memory stack, TNS/E 16-9, 17-13
Memory, virtual 16-4, 16-5
Message system 1-6
Message tag 6-21
MESSAGESTATUS procedure 6-3, 6-25
Metacharacters
See File-name patterns
See Wild-card characters
Mirrored disk 1-3
Modifiers, formatter 19-6
Mom process 16-12
Monitor 1-15
Monitor process 1-2, 1-15
MONITORCPUS procedure 22-7/22-8
Monitoring a child process 16-46/16-47
MONITORNET procedure 22-7/22-8
Monolithic program
See Unified program
MOUNTMSG attribute 12-28
MOVEX procedure 17-1, 17-37/17-38
multibyte 1-9
Multibyte character sets (MBCS) 1-9,
19-49/19-65