CONTENTS Title Page Copyright Page Preface 1 Introduction to Utility Routines 2 Access Control List (ACL) Editor Routine 2.1 Using the ACL Editor Routine: An Example 2.2 ACL Editor Routine ACLEDIT$EDIT 3 Command Language (CLI) Routines 3.1 Introduction to CLI Routines 3.2 Using the CLI Routines:An Example 3.3 CLI Routines CLI$DCL_PARSE CLI$DISPATCH CLI$GET_VALUE CLI$PRESENT 4 Convert (CONV) Routines 4.1 Introduction to Convert Routines 4.2 Using the Convert Routines: Examples 4.3 Convert Routines CONV$CONVERT CONV$PASS_FILES CONV$PASS_OPTIONS CONV$RECLAIM 5 Data Compression/Expansion (DCX) Routines 5.1 Introduction to DCX Routines 5.2 Using the DCX Routines: Examples 5.3 DCX Routines DCX$ANALYZE_DATA DCX$ANALYZE_DONE DCX$ANALYZE_INIT DCX$COMPRESS_DATA DCX$COMPRESS_DONE DCX$COMPRESS_INIT DCX$EXPAND_DATA DCX$EXPAND_DONE DCX$EXPAND_INIT DCX$MAKE_MAP 6 EDT Routines 6.1 Introduction to EDT Routines 6.2 Using EDT Routines: An Example 6.3 EDT Routines EDT$EDIT FILEIO WORKIO XLATE 7 File Definition Language (FDL) Routines 7.1 Introduction to FDL Routines 7.2 Using the FDL Routines: Examples 7.3 FDL Routines FDL$CREATE FDL$GENERATE FDL$PARSE FDL$RELEASE 8 Librarian (LBR) Routines 8.1 Introduction to LBR Routines 8.1.1 Types of Library 8.1.2 Structure of Libraries 8.1.2.1 Library Headers 8.1.2.2 Modules 8.1.2.3 Indexes and Keys 8.1.2.4 Summary of Routines 8.2 Using the LBR Routines: Examples 8.3 LBR Routines LBR$CLOSE LBR$DELETE_DATA LBR$DELETE_KEY LBR$FIND LBR$FLUSH LBR$GET_HEADER LBR$GET_HELP LBR$GET_HISTORY LBR$GET_INDEX LBR$GET_RECORD LBR$INI_CONTROL LBR$INSERT_KEY LBR$LOOKUP_KEY LBR$OPEN LBR$OUTPUT_HELP LBR$PUT_END LBR$PUT_HISTORY LBR$PUT_RECORD LBR$REPLACE_KEY LBR$RET_RMSSTV LBR$SEARCH LBR$SET_INDEX LBR$SET_LOCATE LBR$SET_MODULE LBR$SET_MOVE 9 MAIL Routines 9.1 Introduction to MAIL Routines 9.2 Messages 9.3 Folders 9.4 Mail Files 9.5 User Common Database 9.6 MAIL Processing Contexts 9.6.1 Callable MAIL Routines 9.6.2 Single and Multiple Threads 9.7 Programming Considerations 9.7.1 Condition Handling 9.7.2 Item Lists and Item Descriptors 9.7.2.1 Structure of an Item Descriptor 9.7.2.2 Null Item Lists 9.7.2.3 Declaring Item Lists and Item Descriptors 9.7.2.4 Terminating an Item List 9.7.3 Action Routines 9.7.3.1 Types of Action Routines 9.8 Mail File Context 9.8.1 Managing Mail Files 9.8.1.1 Opening and Closing Mail Files 9.8.1.1.1 Using the Default Specification for Mail Files 9.8.1.1.2 Specifying an Alternate Mail File Specification 9.8.1.2 Displaying Folder Names 9.8.1.3 Purging Mail Files Using the Wastebasket Folder 9.8.1.3.1 Reclaiming Disk Space 9.8.1.3.2 Compressing Mail Files 9.9 Message Context 9.9.1 Selecting Messages 9.9.2 Reading and Printing Messages 9.9.3 Modifying Messages 9.9.4 Copying and Moving Messages 9.9.4.1 Creating Folders 9.9.4.2 Deleting Folders 9.9.4.3 Creating Mail Files 9.9.5 Deleting Messages 9.10 Send Context 9.10.1 Sending New Messages 9.10.1.1 Creating a Message 9.10.1.1.1 Constructing the Message Header 9.10.1.1.2 Constructing the Body of the Message 9.10.1.2 Creating an Address List 9.10.2 Sending Existing Messages 9.10.3 Send Action Routines 9.10.3.1 Success Action Routines 9.10.3.2 Error Handling Routines 9.10.3.3 Aborting a Send Operation 9.11 User Profile Context 9.11.1 User Profile Entries 9.11.1.1 Adding User Profile Entries to the User Common Database 9.11.1.2 Modifying or Deleting User Profile Entries 9.12 Input Item Codes 9.13 Output Item Codes 9.14 Examples of Using MAIL Routines 9.15 MAIL Routines MAIL$MAILFILE_BEGIN MAIL$MAILFILE_CLOSE MAIL$MAILFILE_COMPRESS MAIL$MAILFILE_END MAIL$MAILFILE_INFO_FILE MAIL$MAILFILE_MODIFY MAIL$MAILFILE_OPEN MAIL$MAILFILE_PURGE_WASTE MAIL$MESSAGE_BEGIN MAIL$MESSAGE_COPY MAIL$MESSAGE_DELETE MAIL$MESSAGE_END MAIL$MESSAGE_GET MAIL$MESSAGE_INFO MAIL$MESSAGE_MODIFY MAIL$MESSAGE_SELECT MAIL$SEND_ABORT MAIL$SEND_ADD_ADDRESS MAIL$SEND_ADD_ATTRIBUTE MAIL$SEND_BEGIN MAIL$SEND_ADD_BODYPART MAIL$SEND_END MAIL$SEND_MESSAGE MAIL$USER_BEGIN MAIL$USER_DELETE_INFO MAIL$USER_END MAIL$USER_GET_INFO MAIL$USER_SET_INFO 10 National Character Set (NCS) Utility Routines 10.1 Introduction to NCS Routines 10.2 Examples of How to Use NCS Utility Routines 10.3 NCS Routines NCS$COMPARE NCS$CONVERT NCS$END_CF NCS$END_CS NCS$GET_CF NCS$GET_CS NCS$RESTORE_CF NCS$RESTORE_CS NCS$SAVE_CF NCS$SAVE_CS 11 Print Symbiont Modification (PSM) Routines 11.1 Introduction to PSM Routines 11.2 VMS Print Symbiont Overview 11.2.1 Components of the VMS Print Symbiont 11.2.2 Creation of the Print Symbiont Process 11.2.3 Symbiont Streams 11.2.4 Symbiont and Job Controller Functions 11.2.5 Print Symbiont Internal Logic 11.3 Symbiont Modification Procedure 11.3.1 Guidelines and Restrictions 11.3.2 Writing an Input Routine 11.3.2.1 Internal Logic of the Symbiont's Main Input Routine 11.3.2.2 Symbiont Processing of Carriage Control 11.3.3 Writing a Format Routine 11.3.3.1 Internal Logic of the Symbiont's Main Format Routine 11.3.4 Writing an Output Routine 11.3.4.1 Internal Logic of the Symbiont's Main Output Routine 11.3.5 Other Function Codes 11.3.6 Writing a Symbiont Initialization Routine 11.3.7 Integrating a Modified Symbiont 11.4 Example of Using the PSM Routines 11.5 PSM Routines PSM$PRINT PSM$READ_ITEM_DX PSM$REPLACE PSM$REPORT USER-FORMAT-ROUTINE USER-INPUT-ROUTINE USER-OUTPUT-ROUTINE 12 Symbiont/Job Controller Interface (SMB) Routines 12.1 Introduction to SMB Routines 12.1.1 Types of Symbiont 12.1.2 Symbionts Supplied with the VMS Operating System 12.1.3 Symbiont Behavior in the VMS Environment 12.1.4 Writing a Symbiont 12.1.5 Guidelines for Writing a Symbiont 12.1.6 The Symbiont/Job-Controller Interface Routines 12.1.7 Choosing the Symbiont Environment 12.1.7.1 Synchronous Versus Asynchronous Delivery of Requests 12.1.7.2 Single-Streaming Versus Multistreaming 12.1.8 Reading Job Controller Requests 12.1.9 Processing Job Controller Requests 12.1.10 Responding to Job Controller Requests 12.2 SMB Routines SMB$CHECK_FOR_MESSAGE SMB$INITIALIZE SMB$READ_MESSAGE SMB$READ_MESSAGE_ITEM SMB$SEND_TO_JOBCTL 13 Sort/Merge (SOR) Routines 13.1 Introduction to SOR Routines 13.1.1 Arguments to SOR Routines 13.1.2 Interfaces to SOR Routines 13.1.2.1 Sort Operation Using File Interface 13.1.2.2 Sort Operation Using Record Interface 13.1.2.3 Merge Operation Using File Interface 13.1.2.4 Merge Operation Using Record Interface 13.1.3 Reentrancy 13.2 Examples of Using SOR Routines 13.3 SOR Routines SOR$BEGIN_MERGE SOR$BEGIN_SORT SOR$DTYPE SOR$END_SORT SOR$PASS_FILES SOR$RELEASE_REC SOR$RETURN_REC SOR$SORT_MERGE SOR$SPEC_FILE SOR$STAT 14 VAX Text Processing Utility (VAXTPU) Routines 14.1 Introduction to VAXTPU Routines 14.1.1 Two Interfaces to Callable VAXTPU 14.1.2 Shareable Image 14.1.3 Passing Parameters to Callable VAXTPU Routines 14.1.4 Error Handling 14.1.5 Return Values 14.2 The Simplified Callable Interface 14.2.1 Examples of the Simplified Interface 14.3 The Full Callable Interface 14.3.1 Main Callable VAXTPU Utility Routines 14.3.2 Other VAXTPU Utility Routines 14.3.3 User-Written Routines 14.4 Examples of Using VAXTPU Routines 14.5 VAXTPU Routines TPU$CLEANUP TPU$CLIPARSE TPU$CLOSE_TERMINAL TPU$CONTROL TPU$EDIT TPU$EXECUTE_COMMAND TPU$EXECUTE_INIFILE TPU$FILEIO TPU$HANDLER TPU$INITIALIZE TPU$MESSAGE TPU$PARSEINFO TPU$TPU FILEIO HANDLER INITIALIZE USER EXAMPLES 2-1 Calling the ACL Editor with a VAX BLISS Program 3-1 Using the CLI Routines to Retrieve Information About Command Lines in a FORTRAN Program 4-1 Using the Convert Routines in a FORTRAN Program 4-2 Using the Convert Routines in a MACRO Program 4-3 Using the CONV$RECLAIM Routine in a FORTRAN Program 4-4 Using the CONV$RECLAIM Routine in a MACRO Program 5-1 Compressing a File in a VAX FORTRAN Program 5-2 Expanding a Compressed File in a VAX FORTRAN Program 6-1 Using the EDT Routines in a VAX BASIC Program 7-1 Using FDL$CREATE in a FORTRAN Program 7-2 Using FDL$PARSE and FDL$RELEASE in a MACRO Program 7-3 Using FDL$PARSE and FDL$GENERATE in a VAX Pascal Program 8-1 Creating a New Library Using VAX Pascal 8-2 Inserting a Module Into a Library Using VAX Pascal 8-3 Extracting a Module from a Library Using VAX Pascal 8-4 Deleting a Module from a Library Using VAX Pascal 9-1 Sending a File 9-2 Displaying Folders 9-3 Displaying User Profile Information 10-1 Using NCS Routines in a FORTRAN Program 10-2 Using NCS Routines in a MACRO-32 Program 11-1 Using PSM Routines to Supply a Page Header Routine in a MACRO Program 13-1 Using SOR Routines to Perform a Merge Using Record Interface in a VAX FORTRAN Program 13-2 Using SOR Routines to Sort Using Mixed Interface in a VAX FORTRAN Program 13-3 Using SOR Routines to Merge Three Input Files in a VAX Pascal Program 13-4 Using SOR Routines to Sort Records from Two Input Files in a VAX Pascal Program 14-1 Sample VAX BLISS Template for Callable VAXTPU 14-2 Normal VAXTPU Setup in VAX FORTRAN 14-3 Building a Callback Item List with VAX FORTRAN 14-4 Specifying a User-Written File I/O Routine in VAX C FIGURES 8-1 Structure of a Macro, Text, or Help Library 8-2 Structure-of an Object or Shareable Image Library 8-3 Structure of a User-Developed Library 9-1 Standard Message Format 9-2 Item Descriptor 11-1 Multithreaded Symbiont 11-2 Symbiont Execution Sequence or Flow of Control 12-1 Symbionts in the VMS Operating System Environment 12-2 Flowchart for a Single-Threaded, Synchronous Symbiont 12-3 Flow Chart for a Single-Threaded, Asynchronous Symbiont (MAIN Routine) 12-4 Flow Chart for a Single-Threaded, Asynchronous Symbiont (AST Routine) TABLES 9-1 Default Mail Folders 9-2 User Profile Information 9-3 Levels of MAIL Processing 9-4 Callable MAIL Routines 9-5 Mail File Routines 9-6 Message Routines 9-7 Send Routines 9-8 User Profile Context Routines 9-9 Input Item Codes 9-10 Output Item Codes 10-1 NCS Routines 11-1 Routine Codes for Specification to PSM$REPLACE