Sei sulla pagina 1di 344

Guardian Programming Reference Summary for C

Abstract
This summary provides a quick reference to information required for Guardian programming in C.

Product Version
G09

Supported Releases
This manual supports G06.15 and all subsequent releases until otherwise indicated in a new edition.

Part Number
522630-001

Published
February 2002

Document History
Part Number 142747 422953-001 522630-001 Product Version G06.03 G06.06 G09 Published December 1998 August 1999 February 2002

Ordering Information
For manual ordering information: domestic U.S. customers, call 1-800-243-6886; international customers, contact your local sales representative.

Document Disclaimer
Information contained in a manual is subject to change without notice. Please check with your authorized representative to make sure you have the most recent information.

Export Statement
Export of the information contained in this manual may require authorization from the U.S. Department of Commerce.

Examples
Examples and sample programs are for illustration only and may not be suited for your particular purpose. The inclusion of examples and sample programs in the documentation does not warrant, guarantee, or make any representations regarding the use or the results of the use of any examples or sample programs in any documentation. You should verify the applicability of any example or sample program before placing the software into productive use.

U.S. Government Customers


FOR U.S. GOVERNMENT CUSTOMERS REGARDING THIS DOCUMENTATION AND THE ASSOCIATED SOFTWARE: These notices shall be marked on any reproduction of this data, in whole or in part. NOTICE: Notwithstanding any other lease or license that may pertain to, or accompany the delivery of, this computer software, the rights of the Government regarding its use, reproduction and disclosure are as set forth in Section 52.227-19 of the FARS Computer SoftwareRestricted Rights clause. RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the Government is subject to the restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013. RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in paragraph (b)(3)(B) of the rights in Technical Data and Computer Software clause in DAR 7-104.9(a). This computer software is submitted with restricted rights. Use, duplication or disclosure is subject to the restrictions as set forth in NASA FAR SUP 18-52 227-79 (April 1985) Commercial Computer SoftwareRestricted Rights (April 1985). If the contract contains the Clause at 18-52 227-74 Rights in Data General then the Alternate III clause applies. U.S. Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract. Unpublished All rights reserved under the Copyright Laws of the United States.

Guardian Programming Reference Summary for C

Tables

Whats New in This Manual v Manual Information v New and Changed Information vi About This Manual vii Your Comments Invited vii Notation Conventions vii

Compaq Computer Corporation 522630-001 iii

Contents

1. Process Name and ID Formats

1. Process Name and ID Formats 2. File Codes 3. Device Types and Subtypes 4. Functions Summary (A-C) 5. Functions Summary (D-F) 6. Functions Summary (G-N) 7. Functions Summary (O-Q) 8. Functions Summary (R-Z) 9. CONTROL Operations 10. SET^FILE Operations 11. SETMODE Operations 12. Completion Codes 13. Traps 14. Interprocess Messages 15. Error Codes 16. ASCII Character Set 17. TNS Instruction Set
TNS Alphabetical List of Instructions 323

Tables
Table 3-1. Table 9-1. Table 9-2. Device Types and Subtypes (page 1 of 14) CONTROL Operation 1 227 CONTROL Operations 2 - 27 229 17

Guardian Programming Reference Summary for C 522630-001 iv

Whats New in This Manual


Manual Information
Guardian Programming Reference Summary for C

Abstract This summary provides a quick reference to information required for Guardian programming in C. Product Version G09 Supported Releases This manual supports G06.15 and all subsequent releases until otherwise indicated in a new edition.
Part Number 522630-001 Published February 2002

Document History
Part Number 142747 422953-001 522630-001 Product Version G06.03 G06.06 G09 Published December 1998 August 1999 February 2002

Guardian Programming Reference Summary for C 522630-001 v

Whats New in This Manual

New and Changed Information

New and Changed Information



An entry has been added to Section 4, Functions Summary (A-C), in the CPU_GETINFOLIST procedure that provides a link to the PROCESSOR_GETINFOLIST_ documentation. The unsupported proc call GETSYSTEMSERIALNUMBER has been removed from Section 6, Functions Summary (G-N). Table 3-1, Device Types and Subtypes, on page 3-1 has been updated to include an entry for the 4619 disk drive.

Guardian Programming Reference Summary for C 522630-001 vi

About This Manual


Your Comments Invited
After using this manual, please take a moment to send us your comments. You can do this by returning a Reader Comment Card or by sending an Internet mail message. A Reader Comment Card is located at the back of printed manuals and as a separate file on the Tandem User Documentation disc. You can either fax or mail the card to us. The fax number and mailing address are provided on the card. Also provided on the Reader Comment Card is an Internet mail address. When you send an Internet mail message to us, we immediately acknowledge receipt of your message. A detailed response to your message is sent as soon as possible. Be sure to include your name, company name, address, and phone number in your message. If your comments are specific to a particular manual, also include the part number and title of the manual. Many of the improvements you see in Tandem manuals are a result of suggestions from our customers. Please take this opportunity to help us improve future manuals.

Notation Conventions
General Syntax Notation
The following list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS. Uppercase letters indicate keywords and reserved words; enter these items exactly as shown. Items not enclosed in brackets are required. For example:
MAXATTACH

lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required. For example:
file-name

[ ] Brackets. Brackets enclose optional syntax items. For example:


TERM [\system-name.]$terminal-name INT[ERRUPTS]

A group of items enclosed in brackets is a list from which you can choose one item or none. The items in the list may be arranged either vertically, with aligned brackets on

Guardian Programming Reference Summary for C 522630-001 vii

About This Manual

General Syntax Notation

each side of the list, or horizontally, enclosed in a pair of brackets and separated by vertical lines. For example:
LIGHTS [ ON ] [ OFF ] [ SMOOTH [ num ] ] K [ X | D ] address-1

{ } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list may be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example:
LISTOPENS PROCESS { $appl-mgr-name } { $process-name } ALLOWSU { ON | OFF }

| Vertical Line. A vertical line separates alternatives in a horizontal list that is enclosed in brackets or braces. For example:
INSPECT { OFF | ON | SAVEABEND }

Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example:
M address-1 [ , new-value ]... [ - ] {0|1|2|3|4|5|6|7|8|9}...

An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example:
"s-char..."

Punctuation. Parentheses, commas, semicolons, and other symbols not previously described must be entered as shown. For example:
error := NEXTFILENAME ( file-name ) ; LISTOPENS SU $process-name.#su-name

Quotation marks around a symbol such as a bracket or brace indicate that the symbol is a required character that you must enter as shown. For example:
"[" repetition-constant-list "]"

Item Spacing. Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or a comma. For example:
CALL STEPMOM ( process-id ) ;

If there is no space between two items, spaces are not permitted. In the following example, there are no spaces permitted between the period and any other items:
$process-name.#su-name
Guardian Programming Reference Summary for C 522630-001 viii

About This Manual

Change Bar Notation

Line Spacing. If the syntax of a command is too long to fit on a single line, each continuation line is indented three spaces and is separated from the preceding line by a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections. For example:
ALTER [ / OUT file-spec / ] CONTROLLER [ , attribute-spec ]...

/* i */, /* o */. In function calls, the /* i */ notation follows an input parameter (one that passes data to the called procedure); the /* o */ notation follows an output parameter (one that returns data to the calling program). For example:
short DEFINEMODE ( [ short new-value ] ,[ short _near *old-value ] ); /* i */ /* o */

/* i,o */. In procedure calls, the /* i,o */ notation follows an input/output parameter (one that both passes data to the called procedure and returns data to the calling program). For example:
error = COMPRESSEDIT ( filenum ) ; /* i,o */

Change Bar Notation


Change bars are used to indicate substantive differences between this edition of the manual and the preceding edition. Change bars are vertical rules placed in the right margin of changed portions of text, figures, tables, examples, and so on. Change bars highlight new or revised information. For example: The message types specified in the REPORT clause are different in the COBOL85 environment and the Common Run-Time Environment (CRE). The CRE has many new message types and some new message type codes for old message types. In the CRE, the message type SYSTEM includes all messages except LOGICAL-CLOSE and LOGICAL-OPEN.

Guardian Programming Reference Summary for C 522630-001 ix

About This Manual

Change Bar Notation

Guardian Programming Reference Summary for C 522630-001 x

1
node

Process Name and ID Formats


[node]$:cpu:pin:seq-no

D-Series Process File Name Formats The syntax for a process file name that identifies an unnamed process is: The syntax for a process file name that identifies a named process is:
[node]process-name[:seq-no][.qual-l[.qual-2]]

specifies the name of the node on which the process is running. A node name consists of a backslash (\) followed by one through seven alphanumeric characters; the first alphanumeric character must be a letter.
cpu

specifies the number of the processor in which the process is running. The cpu parameter is one or two digits representing a value in the range 0 through 15.
pin

specifies the PIN (process identification number) of the process. The pin parameter is one through five digits representing a value in the range 0 through the maximum value allowed for the processor.
seq-no

specifies the system-assigned sequence number of the process. The seq-no parameter has a maximum of 13 digits. Any leading zeroes are suppressed.
process-name

specifies the name of the process. A process name consists of a dollar sign ($) followed by one through five alphanumeric characters; the first alphanumeric character must be a letter. Note that a process running on a D-series system cannot identify a remote C-series process name that has more than four characters after the dollar sign.
qual-1 and qual-2

are optional qualifiers. The first qualifier consists of a pound sign (#) followed by one through seven alphanumeric characters; the first alphanumeric character must be a letter. The second qualifier contains one through eight alphanumeric characters; the first character must be a letter.

Guardian Programming Reference Summary for C 522630-001 1 -1

Process Name and ID Formats

Process Descriptors A process descriptor is a form of process file name that always includes the node and seq-no sections of the name; when identifying a named process, it never includes the optional qualifiers qual-1 or qual-2. Operating-system procedures always use the external file-name notation when returning a process descriptor. Process Handles A process handle is a 10-word structure that identifies a single named or unnamed process.

Guardian Programming Reference Summary for C 522630-001 1 -2

2
100 101 110 111 115 120-128 129 130 134 170 175 176 180 223 230-232 250 251 252 253 254 255 256 257 258 259 260 261

File Codes
Description Object file EDIT-format file EDIT VS recovery file EDIT VS stack dump file (data area image) TEDIT TEDPROFL file Spooler control files Spooler job file Inspect save file TMF audit-trail file XRAYSCAN structured output files for Enform reports Measure data file NonStop SQL Table file for Surveyor C data file Enable log file Ada data file Transfer profile file Transfer session file Transfer item descriptor file Transfer recipient file Transfer folder file Transfer item data file Transfer distribution list file Transfer ready file Transfer time file Transfer network file Transfer inverted folder file Transfer restart file
Guardian Programming Reference Summary for C 522630-001 2 -1

For additional information about file codes, refer to the Guardian Procedure Errors and Messages Manual.
File Code

File Codes

262 263 264 265 266 267 268 275 276 277 278 280 281 282 283-299 300 301 302 303-304 305 306 307 308 309 310-399 400 401 410 411 412-419 430

Transfer name file Transfer DIN file Transfer alias file Transfer trace file Transfer queue file Transfer inverted attachment file Transfer external objects file Transfer WORDLINK and Translator format name file Transfer WORDLINK and Translator character map file Transfer WORDLINK and Translator batch gateway configuration file Transfer WORDLINK and Translator format type file Transfer WORDLINK and Translator text server text file Transfer System Management Monitor database monitor sample file Transfer System Management Monitor queue monitor sample file Transfer files TPS (Pathway) TCL program directory file TPS (Pathway) TCL program code file TPS (Pathway) SCREEN COBOL symbol file TPS (Pathway) files TPS (Pathway) TCP data area swap file TPS (Pathway) AM control file TPS (Pathway) Path TCP dump file TPS (Pathway) Pathway trace file TPS (Pathway) PATHMON stack dump file TPS (Pathway) files Tape simulator control file Tape simulator data file EXERCISE message file EXERCISE error information file EXERCISE files EXERCISE Tandump segmented save file
Guardian Programming Reference Summary for C 522630-001 2 -2

File Codes

440 450 451 500 502 505 510 520 521 525 540-549 550-599 600 601 602 603-620 660 661-669 700 830-831 832-833 834-835 840 841 842 843 844 845 846 847-848 849

TACL saved variable segment file C00 file server and ViewPoint status display configuration file Event display configuration file NonStop II processor microcode file NonStop II microcode file for SHADOW 5106 Tri-Density tape drive microcode object file Standard (unformatted) microcode file NonStop TXP processor microcode file GASM-format microcode object file NonStop VLX processor microcode file Safeguard files NonStop SQL files MUMPS global file MUMPS routine file MUMPS global directory file MUMPS files Encore capture file Encore files Native object file Comm trace files Comm configuration files Comm configuration database files SNAX utility output file COUP database file COUP process image file EMS logger file EMS formatter template EMS compiled filter Cover files NetBatch files DNS configuration file
Guardian Programming Reference Summary for C 522630-001 2 -3

File Codes

850 851 852 853-854 855 888 904

DNS database file SNAX5 configuration file NonStop CLX shutdown file Optical disk files FUP restart file Enform compiled query file Exchange trace file

Guardian Programming Reference Summary for C 522630-001 2 -4

3
Type 0

Device Types and Subtypes


Device Process Sub type 0 1-49 D-Series Description Default subtype for general use Reserved for definition by Tandem. The following subtypes are defined: 1 = CMI process 2 = Security monitor process 30 = Device simulation process 31 = Spooler collector process G-Series Description Default subtype for general use Reserved for definition by Tandem. The following subtypes are defined: 1 = CMI process 2 = Security monitor process 30 = WANBOOT process 31 = Spooler collector process 48 = TFTP server process 49 = SNMP trap multiplexor 5063 For general use $0 (operator process) or alternate collector $0.#ZSPI ($0 opened to receive SPI commands) $Z0 (compatibility distributor) 4103 (160 MB formatted capacity) 4104 (240 MB formatted capacity) 4105 or 4106 (64 MB formatted capacity) 4109 (moving-head part, 64 MB formatted capacity) 4116 (540 MB formatted capacity) For general use $0 (operator process) or alternate collector $0.#ZSPI ($0 opened to receive SPI commands) $Z0 (compatibility distributor) N.A. N.A. N.A. N.A. N.A.

Table 3-1. Device Types and Subtypes (page 1 of 14)

Operator console

0 1 2

2 3

$RECEIVE Disk

0 2 3 4 5 6

Guardian Programming Reference Summary for C 522630-001 3 -1

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 2 of 14)


Type 3 Device Disk Sub type 7 8 D-Series Description 4109 (fixed-head part, 1.45 MB formatted capacity) 4110, 4111 (128 MB formatted capacity) 4120 (V8) (128 MB formatted capacity) 9 10 16 4114 or 4115 (264 MB formatted capacity) 4130 (XL8) (415 MB formatted capacity) 4160 (V80) (265 MB formatted capacity) with 3125 controller 4210 (145 MB formatted capacity) 4170 (XL80) (895 MB formatted capacity) with 3129 controller 4220 (300 MB formatted capacity) with 3681 MFC 4580 (8 GB) with 3129 controller 4230 (648 MB formatted capacity) with 3681 MFC 4500 (1038 MB formatted capacity per spindle) with 3128 controller 4240 (1038 MB formatted capacity) with 3681 MFC 4330 (160 MB formatted capacity) 4250 (2 GB formatted capacity) with 3681 MFC 4510 (2 GB formatted capacity per spindle) with 3128 controller G-Series Description N.A. N.A. N.A. N.A. N.A. N.A.

17 18

N.A. N.A.

19 20 21 22

N.A. N.A. N.A. N.A.

23 26 29 31

N.A. N.A. N.A. N.A.

Guardian Programming Reference Summary for C 522630-001 3 -2

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 3 of 14)


Type 3 Device Disk Sub type 33 34 36 D-Series Description 4245 (1038 MB formatted capacity) with 3681 MFC 4255 (2 GB formatted capacity) with 3681 MFC NonStop Storage Management Foundation (SMF) virtual disk process 4560 (2 GB formatted capaity per spindle) with 3129 controller 4570 (4 GB) N.A. N.A. N.A. N.A. N.A. 4580 48 56 4590 (18 GB) 5200 Optical Disk Subsystem (1.3 GB per volume) with 3128 controller 5101, 5103, 5104, 5110, 5114 (9-track, 45/125 ips) tape units with 3202 controller 5105 (7-track, 45 ips) tape unit with 3203 controller 5106 (tri density) master tape unit or 5107 slave unit with 3206 controller 4560 (2 GB formatted capacity per spindle) with ServerNet/DA 4570 (4 GB) with ServerNet/DA 4604 (4 GB) 4608 (8 GB) 4609 (8 GB) 43 43 44 4618 (18 GB) 4619 (18 GB) (15,000 rpm) 4636 (36 GB) 4590 (18 GB) with ServerNet/DA 4590 (18 GB) with ServerNet/DA N.A. G-Series Description N.A. N.A.

38

39 41 42

Magnetic tape unit

N.A.

1 2

N.A. N.A.

Guardian Programming Reference Summary for C 522630-001 3 -3

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 4 of 14)


Type Device Sub type 3 D-Series Description 5101, 5103, 5104, 5110, 5114 (9-track, 45/125 ips) tape units with 3207 controllers 5130 (9-track, 200 ips) master tape unit or 5131 slave unit with 3208 controller 5120 cartridge tape unit with 3209 or 3681 controller in 3681 MFC 5160 tape unit (1600 bits per inch, or bpi) or 5170 tape unit (1600, 6250 bpi) with 3214 controller or 3681 MFC or PMF/IOMF 5130 master tape unit (9-track, 200 ips) or 5131 slave unit with 3211 controller 5180 tape unit (18 track, 38000 bpi) with 3215 controller 5190 tape unit (18 track, 38000 bpi) with 3216 controller or 3681 MFC and 5194 tape unit (36 tracks, 38000 bpi) 5188 tape unit (38000 bpi) with 3217 controller G-Series Description N.A.

Magnetic tape unit

N.A.

N.A.

5170 tape unit (1600, 6250 bpi) PMF/IOMF or ServerNet/DA

N.A.

N.A.

5190 tape unit (18 track, 38000 bpi) or 5194 tape unit (36 tracks, 38000 bpi) with PMF, IOMF, or ServerNet/DA N.A. 5142 DAT with PMF or IOMF

10 11 5 Printer 0 1

SNAX PRT protocol 5502, 5503, 5504, 5510, 5513, and 5514 (parallel printers) or 5518 parallel printer (for 7-bit data transfer) with 3601 UI 5508 (serial printer) N.A.

Guardian Programming Reference Summary for C 522630-001 3 -4

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 5 of 14)


Type 5 Device Printer Sub type 4 5 D-Series Description 5520 (serial printer) 5510, 5513, 5514 (alternate character set) for parallel (band) printers or 5518 parallel printer (for 8-bit data transfer) with 3601 UI 5530 (letter-quality serial printer) 5515, 5516 dot matrix (parallel and serial printers) 5518 dot matrix (parallel printer) 5573 or 5574 laser (serial printer) 5512 dot matrix (serial printer) 5577 laser (serial printer) ASYNC_PRT Device. Nonstandard serial printers (DTR printer and 554x printers) Conversational mode (P/N 6401/6402) or ASYNC_TERM device Page mode (P/N 6511, 6512) Page mode (P/N 6520, 6524) Page mode (P/N 6520 remote) ITI protocol for use by AM6520 Page mode (P/N 6526, 6528, 653x) Page mode (P/N 6530 remote) ITI protocol for use by AM6520 Conversational mode Conversational mode (P/N 6401/6402) or PATPTERM (non-Tandem) device Page mode (P/N 6511, 6512) Page mode (P/N 6520, 6524) N.A. N.A. G-Series Description

6 7

8 9 10 32

Terminal

1 2 3

4 5

Page mode (P/N 6526, 6528, 653x) N.A.

6-10

Conversational mode

Guardian Programming Reference Summary for C 522630-001 3 -5

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 6 of 14)


Type Device Sub type D-Series Description 6 = 3277 (screen size 12x40) 6 Terminal 7 = 3277 (screen size 24x80) 8 = 3277 (screen size 32x80) 9 = 3277 (screen size 43x80) 10 = 3277 (screen size 12x80) 11 16 6340 FaxLink Nonstandard device with 3606 controller, for read-continuous/type-ahead capability 3275-11, 3276-1 & -11, 3277-1, 3278-1 3275-11, 3276-1 & -11, 3277-1, 3278-1 G-Series Description 6 = 3277 (screen size 12x40) 7 = 3277 (screen size 24x80) 8 = 3277 (screen size 32x80) 9 = 3277 (screen size 43x80) 10 = 3277 (screen size 12x80) 6340 FaxLink

SNAX Interactive Terminal Interface (ITI) Protocol

20

21

3275-12, 3276-2 & -12, 3277-2, 3278-2, 3178-C10, -C20, -C3, & C4, 3191-A1K & -A2K, 3279-2A, -2B, -S2A, -S2B, & -02X, 5578-001, -002, F-6652-A, & -C 3276-3, 3278-3, 3277-3, 3279-3A, -3B, -S3G, & -03X 3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, A08, & -A10 3278-5 3262, 3284, 3286, 3282, 3289 Hard-copy console

3275-12, 3276-2 & -12, 3277-2, 3278-2, 3178-C10, -C20, -C3, & C4, 3191-A1K & -A2K, 3279-2A, -2B, -S2A, S2B, & -02X, 5578-001, -002, F-6652A, & -C 3276-3, 3278-3, 3277-3, 3279-3A, -3B, -S3G, & 03X 3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, -A08, & -A10 3278-5 3262, 3284, 3286, 3282, 3289 6603/6604 terminal

22

23

24 30 32

Guardian Programming Reference Summary for C 522630-001 3 -6

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 7 of 14)


Type 7 Device Envoy data communications line Sub type 0 D-Series Description BISYNC, point-to-point, nonswitched BISYNC, point-to-point, switched BISYNC, multipoint, tributary BISYNC, multipoint, supervisor ADM-2, multipoint, supervisor TINET, multipoint, supervisor Burroughs, multipoint, supervisor Burroughs, point-to-point, contention Burroughs, point-to-point, contention Full duplex (FDX), out line Full duplex (FDX), in line NASDAQ, Full duplex (FDX), out line NASDAQ, Full duplex (FDX), in line G-Series Description BISYNC, point-to-point, nonswitched BISYNC, point-to-point, switched BISYNC, multipoint, tributary BISYNC, multipoint, supervisor ADM-2, multipoint, supervisor TINET, multipoint, supervisor Burroughs, multipoint, supervisor Burroughs, point-to-point, contention Burroughs, point-to-point, contention Full duplex (FDX), out line Full duplex (FDX), in line NASDAQ, Full duplex (FDX), out line NASDAQ, Full duplex (FDX), in line Asynchronous line supervisor Isochronous line Automatic calling unit (ACU) N.A. 0 X25AM process N.A. N.A.

1 2 3 8 9 10 11 13 30 31 32 33 40 50 56 8 9 Open SCSI Process-to-process interface

Guardian Programming Reference Summary for C 522630-001 3 -7

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 8 of 14)


Type 10 Device Terminal SNAX Cathode-Ray Tube (CRT) protocol Sub type 0 D-Series Description 327x CRT mode Interface G-Series Description 327x CRT mode Interface

20 21

3275-11, 3276-1 & -11, 3277-1, 3278-1 3275-12, 3276-2 & -12, 3277-2, 3278-2, 3178-C10, -C20, -C3, & C4, 3279-2A, -2B, -S2A, -S2B, & -02X 3276-3, 3278-3, 3277-3, 3279-3A, -3B, -S3G, & -03X 3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, A08, & -A10 3278-5, 3276-5, 3277-5 3262, 3284, 3286, 3287, 3289

3275-11, 3276-1 & -11, 3277-1, 3278-1 3275-12, 3276-2 & -12, 3277-2, 3278-2, 3178-C10, -C20, -C3, & C4, 3279-2A, -2B, -S2A, S2B, & -02X 3276-3, 3278-3, 3277-3, 3279-3A, -3B, -S3G, & 03X 3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, -A08, & -A10 3278-5, 3276-5, 3277-5 3262, 3284, 3286, 3287, 3289 FRMEXF or SDLCXF (synchronous data-link control) line HDLCXF (high-level data-link control) line ADCCP (advanced data communications control procedures) line Frame protocol

22

23

24 30 11 EnvoyACP/XF 40

41 42

43 12 13 14 15 Tandem-to-IBM Link (TIL) SNAX/XF or SNAX/APN SNALU SNAX/3501 0 5 0 0 3501 Data Encryption Devices

SNASVM (Service Manager Process) SNA Application Logical Unit (SNALU) 3501 Data Encryption Devices

Guardian Programming Reference Summary for C 522630-001 3 -8

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 9 of 14)


Type 15 Device SNAX/3501 Sub type 1 3 NSP 4 D-Series Description Key manager (ZKEY) High performance security modules Atalla A6000 Network Security Processor with 3605 controller Manager process Protocol process NonStop Transaction Manager/MP Open System Services 0 0 0 Interprocessor bus monitor for Fiber Optic Extension (FOX) or TorusNet vertical subsystem in FOX-compatibility mode $IPB1 (TorusNet vertical subsystem master service manager in multiple-link mode) Service manager for additional TorusNet vertical links Interprocessor bus monitor for Fiber Optic Extension (FOX) or TorusNet vertical subsystem in FOX-compatibility mode $IPB1 (TorusNet vertical subsystem master service manager in multiple-link mode) Service manager for additional TorusNet vertical links Network Utility Process Subsystem manager 5200 Optical Storage Facility (OSF) disk drive with 3128 controller 5410 optical disk subsystem with 3219 controller 5411 optical disk subsystem with 3220 controller N.A. N.A. G-Series Description Key manager (ZKEY) High performance security modules Atalla A6000 Network Security Processor Manager process Protocol process NonStop Transaction Manager/MP Open System Services Storage pool process

19 2023 24 25 26 27

IPX/SPX NTM/MP OSS SMF pool Tandem HyperLink (THL) IPBMON

0 1 0

28 29 30

$ZNUP $ZMIOP Optical disk unit

0 1 0

1 2

N.A. N.A.

Guardian Programming Reference Summary for C 522630-001 3 -9

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 10 of 14)


Type 30 31 36 Device Optical disk unit SNMP TandemTalk Sub type 3 0 1 2 3 4 37 ISDN 0 D-Series Description 5420 optical disk subsystem with 3220 controller NonStop SNMP Agent AppleTalk Transaction Protocol (ATP) AppleTalk Data Stream Protocol (ADSP) AppleTalk Session Protocol (ASP) AppleTalk Printer Access Protocol (PAP) Integrated Services Digital Network Subsystem Manager N.A. G-Series Description N.A. NonStop SNMP Agent N.A. N.A. N.A. N.A. Integrated Services Digital Network Subsystem Manager ServerNet LAN Systems Access (SLSA) manager process (LAN MAN) ServerNet LAN Systems Access (SLSA) monitor process (LAN MON) 44 is displayed as the type for any device with a device type greater than 63. The program is unable to return information on device types greater than 63. Use the newer Guardian procedures (those that are not superseded) to obtain information on device types that are greater than 63. Queue I/O Monitor Process TELNET Server Process N.A.

43

SLSA

N.A.

44

any device type > 63

44 is displayed as the type for any device with a device type greater than 63. The program is unable to return information on device types greater than 63. Use the newer Guardian procedures (those that are not superseded) to obtain information on device types that are greater than 63.

45 46 48 49

QIO TELNET TCP/IP SNAX/CDF

0 0 0 0

Queued I/O Monitor Process TELNET Server Process

Guardian Programming Reference Summary for C 522630-001 3- 10

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 11 of 14)


Type 50 Device CSM Sub type 0 D-Series Description Communications Subsystem Manager with 3650, 6100, or 6110 controller Single-board (SBSCSM) with 3605 or 3606 controller N.A. N.A. Subsystem Control Point (SCP) Line interface unit (LIU) Bisynchronous (BISYNC) point-to-point line ADCCP line TINET line MPSB Burroughs multipoint N.A. ASYNCTERMPROC: Terminals or serial printers attached to 3605, 6105, or 6110 controller (LIU-1) ASYNCTERMPROC: Terminals or serial printers attached to 3606, 6105, or 6110 controller (LIU-4) ASYNCPROC: ATP6100 lines on the 3681 multifunction controller Non-3650 or non-6100 3650 or 6100 N.A. OSI/Application Services (OSI/AS) Manager Transport service provider (TSP) G-Series Description N.A.

1 2 3 63 51 CP6100 0 1 2 3 4 52 53 SMF master ATP6100 0 0

N.A. SWAN Concentrator Manager(CONMGR) $ZZWAN WAN manager process Subsystem Control Point (SCP) Line interface unit (LIU) Bisynchronous (BISYNC) point-to-point line ADCCP line N.A. MPSB Burroughs multipoint SMF master process

54 55

DDNAM Open Systems Interconnection (OSI)

0 63 1

N.A.

Guardian Programming Reference Summary for C 522630-001 3- 11

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 12 of 14)


Type 55 Device Open Systems Interconnection (OSI) Sub type 5 D-Series Description N.A. G-Series Description Tandem application, presentation, and session (TAPS) processes OSI/Message Handling System (OSI/MHS) OSI/Message Handling System (OSI/MHS) OSI/FTAM Application Manager OSI/FTAM Services OSI/CMIP OSI/FTAM Services N.A.

11 12 20 21 24 25 56 Multilan 0

N.A. N.A. N.A. N.A. N.A. N.A. MLAM line attached to the 3613, 3615, or 3616 TLAM controller Network-basic input-output system (NETBIOS) Dynamic Configuration Management Controller Debug SAP NAM (Expand) Ethernet Logical link control (LLC) type 1 General Device Support SDLC (6203 or 6204) line with 3604 controller Line to 3605, 6100, or 6110 controller Line attached to 3840, or 3841 SNAXLink controller (SNAX/XF only) SNAX/XF Over X.25 (SOX) Support for TLAM token-ring lines

1 2 3 4 5 6 57 58 GDS SNAX/XF or SNAX/APN 0 0 1 2

N.A. N.A. N.A. N.A. N.A. N.A. General Device Support

N.A.

3 4

Guardian Programming Reference Summary for C 522630-001 3- 12

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 13 of 14)


Type 59 Device AM6520 Sub type 0 10 60 AM3270 0 10 TR3271 1 11 61 X.25 0-61 62 63 62 63 Expand NCP Expand Line Handler 0 0 NETNAM single-line handler attached to a non-3605 controller NETDIRECT multiline line handler Multiline line handler attached to a non-3605 controller NETCLUSTER FOX line handler NETDIRECT single-line handler attached to 3605, 6100, 6110 CSS, or 6105 CC Multiline line handler attached to 3605, 6100, 6110 CSS, or 6105 CC D-Series Description Line attached to a byte-synchronous controller Line attached to 3605, 6100 CSS, or 6105 or 6110 CC Line attached to a bytesynchronous controller Line attached to 3605, 6100 CSS, or 6105 or 6110 CC Line attached to a bytesynchronous controller Line attached to 3605, 6100 CSS, or 6105 or 6110 CC Line attached to a 3604 controller Line attached to a 3681 multifunction controller Line attached to 3605, 6110 controller, or 6100 CSS Line attached to SWAN concentrator N.A. N.A. Line attached to SWAN concentrator $NCP Network Control Process NETNAM single-line handler attached to a non-3605 controller NETDIRECT multiline line handler Multiline line handler attached to a non-3605 controller NETCLUSTER FOX line handler NETDIRECT single-line handler attached to 3605, 6100, 6110 CSS, or 6105 CC Multiline line handler attached to 3605, 6100, 6110 CSS, or 6105 CC Line attached to SWAN concentrator G-Series Description N.A. N.A.

1 2

3 5

Guardian Programming Reference Summary for C 522630-001 3- 13

Device Types and Subtypes

Table 3-1. Device Types and Subtypes (page 14 of 14)


Type 65 Device Storage Subsystem Manager NonStop Kernel Management Sub type 0 D-Series Description N.A. G-Series Description responsible for the configuration and control of storage I/O processes responsible for the configuration and control of system-wide attributes and generic processes responsible for coordinating resource sharing SCSI I/O subsystem components across processors

66

N.A.

67

SCSI Lock Management

N.A.

Guardian Programming Reference Summary for C 522630-001 3- 14

Functions Summary (A-C)

This section lists funtions in alphabetic order and briefly describes the syntax of each. For additional information about the funtions, refer to the Guardian Procedure Calls Reference Manual.

ABEND
(superseded by PROCESS_STOP_) Deletes a process or a process pair. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

ACTIVATEPROCESS
(superseded by PROCESS_ACTIVATE_) Returns a process or process pair from the suspended state to the ready state. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

ADDDSTTRANSITION
(superseded by DST_TRANSITION_ADD_) Allows a super-group user (255,n) to add an entry to the daylight-saving-time (DST) transition table.
#include <cextdecs(ADDDSTTRANSITION)> _cc_status ADDDSTTRANSITION ( long long low-gmt /* i */ ,long long high-gmt /* i */ ,short offset ); /* i */

_status_lt (<return_value>)

You are not super ID (255,255), you loaded the DST table inconsistently (that is, the DST table contains gaps or an overlap of entries), or you were loading the DST table at the same time someone else was loading the DST table. The DST table was loaded successfully.

_status_eq (<return_value>)

Guardian Programming Reference Summary for C 522630-001 4 -1

Functions Summary (A-C)

ADDRESS_DELIMIT_
Obtains the addresses of the first and last bytes of a particular area of the callers logical address space. It can also obtain a set of flags that describe the area, and the logical segment ID of the area.
#include <cextdecs(ADDRESS_DELIMIT_)> short ADDRESS_DELIMIT_ ( long address ,long *low-address ,long *high-address ,short *address-descriptor ,short *segment-id ,short error-detail ); return value:
!

/* /* /* /* /* /*

i o o o o o

*/ */ */ */ */ */

0 2 3

No error; the requested values are returned. Parameter error; address parameter was missing. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. This error is returned only to nonprivileged callers. address is not mapped. address If bit 0 of address = 1, address is an invalid address. If bit 0 of address = 0, address is within relative segment 0, 1, 2, or 3 .

4 5

address-descriptor Bits 0-6 Bit 7 Bit 8 Bit 9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 Bits are reserved; 0 is returned. A flat, kernel-aliased segment. A kernel-aliased segment does not have a corresponding absolute segment address. A flat, aliased segment. An aliased segment has a corresponding absolute segment address. The currently addressable extended data segment. Accessible only by privileged processes. Shared by another process. Cannot be deallocated. Writeback-inhibited. Extensible. Resident.

Guardian Programming Reference Summary for C 522630-001 4 -2

Functions Summary (A-C)

segment-id -110 -109 -108 -107 -106 -105 -104 -103 -102 -101 -100 -99 -98 -97 -96 -95 -94 Last valid extended data segment ID. Accelerator-generated code segment. Accelerator read-only data segment for user code segment. Accelerator-generated user library segment. Accelerator read-only data segment for library code segment. TNS user code segment. TNS user library segment. TNS user data segment. Main RISC stack segment. Debug stack segment. Priv RISC stack segment. System data segment. System code segment . System code segment. System code segment. System code segment. System code segment.

ADDRTOPROCNAME
Accepts a P register value and stack marker ENV value and returns the associated symbolic procedure name and various optional items that describe the procedure in detail.
#include <cextdecs(ADDRTOPROCNAME)> short ADDRTOPROCNAME ( short p-reg ,short stack-env ,char *proc-name ,short proc-name-size ,short *proc-name-length ,[short *base ] ,[short *size ] ,[short *entry ] ,[short *attributes ] ,[short pin ] ); /* /* /* /* /* /* /* /* /* /* i i o i o o o o o i */ */ */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 4 -3

Functions Summary (A-C)

_status_eq (<return_value>) _status_gt (<return_value>) return value: 0 11 22 23 24 29 122

The symbolic procedure name was found; error contains 0. An error occurred; error contains the error value.

Successful call; the procedure name is deposited into proc-name for procname-length bytes. A procedure name was not found. One of the parameters specifies an address that is out of bounds. The p-reg, stack-env, and pin parameters do not indicate a legal code location. The pin parameter was supplied, and the caller is not privileged. A required parameter was not supplied. The supplied value of proc-name-size is less than the length of the procedure name that is to be returned into proc-name.

stack-env Bit 4 Bit 7 Bits 11-15 attributes Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bits 7-15 = Priv bit = Callable bit = Resident bit = Interrupt bit = Entry point bit = Variable bit = Extensible bit = PEP number = Library bit = System code bit = Space ID bits

Guardian Programming Reference Summary for C 522630-001 4 -4

Functions Summary (A-C)

ALLOCATESEGMENT
(superseded by SEGMENT_ALLOCATE_) Allocates a selectable extended data segment for use by the calling process. It can also be used to share selectable extended data segments or flat extended data segments allocated by other processes. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

ALTER
(superseded by FILE_ALTERLIST_ ) Changes disk file characteristics that cannot ordinarily be changed while the file is open. This procedure operates only on Guardian objects. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

ALTERPRIORITY
(superseded by PROCESS_SETINFO_) Is used to change the execution priority of a process or process pair. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

ARMTRAP
(superseded by SIGACTION_INIT_) Specifies a location within the application program where execution begins if a trap occurs. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 4 -5

Functions Summary (A-C)

AWAITIO[X]
Completes a previously initiated I/O operation.
#include <cextdecs(AWAITIO)> _cc_status AWAITIO ;( short _near *filenum /* i,o ,[ short _near *buffer-addr ] /* o ,[ short _near *count-transferred ] /* o ,[ long _near *tag ] /* o ,[ long timelimit ] ); /* i #include <cextdecs(AWAITIOX)> _cc_status AWAITIOX ;( short *filenum /* i,o ,[ long *buffer-addr ] /* o ,[ short *count-transferred ] /* o ,[ long *tag ] /* o ,[ long timelimit ] /* i ,[ short *segment-id ] ); /* o */ */ */ */ */ */ */ */ */ */ */

_status_lt (<return_value>) _status_eq (<return_value>) _status_gt (<return_value>)

An error occurred (call FILEINFO). An I/O operation finished. A warning occurred (call FILEINFO).

timelimit
> 0D = -1D = 0D < -1D omitted A wait-for-completion is specified. An indefinite wait is indicated. A check for completion is specified. File-system error 590 occurs. An indefinite wait is indicated.

BACKSPACEEDIT
Sets the current record number of an IOEdit file to that of the line preceding what was the current record before the call. BACKSPACEEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(BACKSPACEEDIT)> short BACKSPACEEDIT ( short filenum ); /* i */
Guardian Programming Reference Summary for C 522630-001 4 -6

Functions Summary (A-C)

BINSEM_CLOSE_
Closes access to a binary semaphore.
#include <cextdecs(BINSEM_CLOSE_)> short BINSEM_CLOSE_ ( long semid return value: 0 29 4022 = = = No error. Required parameter missing. The semid parameter must be specified. Invalid parameter. The semid parameter does not identify a binary semaphore that is opened by the calling process. The corresponding OSS errno value is EINVAL. Deadlock. The binary semaphore specified by semid cannot be closed, because it is locked by the calling process. The corresponding OSS errno value is EDEADLK. ); /* i */

4045

BINSEM_CREATE_
Creates, opens, and locks a binary semaphore.
#include <cextdecs(BINSEM_CREATE_)> short BINSEM_CREATE_ ( long *semid ,short security ); /* o */ /* i */

return value:
0 22 29 4022 = No error. = Bounds error. The semid parameter cannot be written to by the calling process. = Required parameter missing. The semid and security parameters must be specified. = Invalid parameter. The value of security is not a valid value. Specifying an invalid value for security could cause unpredictable results in future releases. The corresponding OSS errno value is EINVAL. = Process cannot open the binary semaphore. The process has reached the maximum number of binary semaphores it can open, or the process file segment (PFS) has reached the maximum limit of available space. The corresponding OSS errno value is EMFILE. = No space. The processor has reached the maximum limit of space available for binary semaphores. The corresponding OSS errno value is ENOSPC.
Guardian Programming Reference Summary for C 522630-001 4 -7

4024

4028

Functions Summary (A-C)

BINSEM_FORCELOCK_
Forces a lock on a binary semaphore
#include <cextdecs(BINSEM_FORCELOCK_)> short BINSEM_FORCELOCK_ ( long semid /* i */ ,short *processhandle );/* o */

return value:
0 22 4022 = = = No error. Bounds error. The processhandle parameter cannot be written to by the calling process. Invalid parameter. The semid parameter does not identify a binary semaphore that is opened by the calling process. The corresponding OSS errno value is EINVAL. Deadlock. The binary semaphore was forsaken before the procedure call, and it is now locked. The corresponding OSS errno value is EDEADLK. Already locked. The binary semaphore was locked by the calling process before the procedure call, and it remains locked. The corresponding OSS errno value is EALREADY.

4045 4103

= =

BINSEM_LOCK_
Locks a binary semaphore.
#include <cextdecs(BINSEM_LOCK_)> short BINSEM_LOCK_ ( long semid /* i */ ,long timeout );/* i */

return value:
0 4011 = = No error. The binary semaphore becomes locked. Operation timed out. The timeout value was reached before the binary semaphore could be locked. The corresponding OSS errno value is EAGAIN. Invalid parameter. The semid parameter does not identify a binary semaphore that is opened by the calling process. The corresponding OSS errno value is EINVAL. Deadlock. The binary semaphore was forsaken before the procedure call, and it is now locked. The corresponding OSS errno value is EDEADLK.

4022

4045

Guardian Programming Reference Summary for C 522630-001 4 -8

Functions Summary (A-C)

BINSEM_OPEN_
Opens a binary semaphore.
#include <cextdecs(BINSEM_OPEN_)> short BINSEM_OPEN_ ( long *semid /* o */ ,short *processhandle /* i */ ,long proc-semid ); /* i */

return value:
0 22 29 4002 = = = = No error. Bounds error. The semid parameter cannot be written by the calling process, or processhandle cannot be read from the calling process. Required parameter missing. The semid, processhandle, and procsemid parameters must be specified. No entry. The proc-semid and processhandle parameters do not identify a binary semaphore in the processor. The corresponding OSS errno value is ENOENT. Invalid access. The calling process does not have access to the binary semaphore because of its security. The security for a binary semaphore is set by the BINSEM_CREATE_ procedure. The corresponding OSS errno value is EACCESS. Invalid parameter. The processhandle parameter does not specify a process. A process that is being created or is terminating is treated as though it does not exist. The corresponding OSS errno value is EINVAL. Process cannot open the binary semaphore. The process has reached the maximum number of binary semaphores it can open, or the process file segment (PFS) has reached the maximum limit of available space. The corresponding OSS errno value is EMFILE.

4013

4022

4024

BINSEM_UNLOCK_
Unlocks a binary semaphore.
#include <cextdecs(BINSEM_UNLOCK_)> short BINSEM_UNLOCK_ ( long semid ); /* i */

Guardian Programming Reference Summary for C 522630-001 4 -9

Functions Summary (A-C)

return value:
0 4001 4022 = = = No error. Cannot lock. The semid parameter is not locked by the calling process. The corresponding OSS errno value is EPERM. Invalid parameter. The semid parameter does not identify a binary semaphore that is opened by the calling process. The corresponding OSS errno value is EINVAL.

BREAKMESSAGE_SEND_
Sends a break-on-device message to a specified process.
#include <cextdecs(BREAKMESSAGE_SEND_)> short BREAKMESSAGE_SEND_ ( short *processhandle ,short receiver-filenum ,[ short *breaktag ] ); /* i */ /* i */ /* i */

CANCEL
Cancels the oldest incomplete operation on a file opened nowait.
#include <cextdecs(CANCEL)> _cc_status CANCEL ( short filenum ); /* i */

_status_lt (<return_value>) _status_eq (<return_value>)

An error occurred (call FILEINFO). The operation was canceled.

CANCELPROCESSTIMEOUT
Cancels a timer set by SIGNALPROCESSTIMEOUT.
#include <cextdecs(CANCELPROCESSTIMEOUT)> _cc_status CANCELPROCESSTIMEOUT ( short tag ); /* i */

_status_eq (<return_value>) _status_gt (<return_value>)

CANCELPROCESSTIMEOUT was successful. The value of tag was invalid.

Guardian Programming Reference Summary for C 522630-001 4- 10

Functions Summary (A-C)

CANCELREQ
Cancels an incomplete operation on a file opened for nowait I/O.
#include <cextdecs(CANCELREQ)> _cc_status CANCELREQ ( short filenum /* i */ ,[ long tag ] );/* i */

_status_lt (<return_value>) _status_eq (<return_value>)

An error occurred (call FILEINFO). The operation was canceled.

CANCELTIMEOUT
Cancels a timer initiated by SIGNALTIMEOUT.
#include <cextdecs(CANCELTIMEOUT)> _cc_status CANCELTIMEOUT ( short tag ); /* i */

_status_eq (<return_value>) _status_gt (<return_value>)

CANCELTIMEOUT finished successfully. The value of tag was invalid.

CHANGELIST
Controls polling when the application program acts as a supervisor or tributary station in a centralized multipoint configuration.
#include <cextdecs(CHANGELIST)> _cc_status CHANGELIST ( short filenum ,short function /* i */ ,short parameter );/* i */

_status_lt (<return_value>) _status_eq (<return_value>)

An error occurred (call FILEINFO). The CHANGELIST procedure executed successfully.

Guardian Programming Reference Summary for C 522630-001 4- 11

Functions Summary (A-C)

function >= 0 -1 -2 = = = Changes the poll state bit. Changes the polling type. Restores all partially disabled stations.

parameter >= 0 -1 -2 = = = Set (1) or clear (0) poll or select state bit. Continuous polling (0) or noncontinuous polling (>0). Dummy value.

CHECK^BREAK
Tests whether the BREAK key has been pressed since the last CHECK^BREAK. CHECK^BREAK is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(CHECK_BREAK)> short CHECK_BREAK ( short { _near *common-fcb } /* i */ { _near *file-fcb } );/* i */ return value: 1 0 = = The BREAK key was pressed; the process owns BREAK. The BREAK key was not pressed; this process does not own BREAK.

Guardian Programming Reference Summary for C 522630-001 4- 12

Functions Summary (A-C)

CHECK^FILE
Checks the file characteristics. CHECK^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE. TNS/R Native C Programming Information
#include <cextdecs(CHECK_FILE)> short CHECK_FILE ( short { _near *common-fcb } { _near *file-fcb } ,short operation ,[ short _near *ret-addr ] ); /* /* /* /* i i i o */ */ */ */

TNS C Programming Information


#include <cextdecs(CHECK_FILE)> short CHECK_FILE ( short { _near *common-fcb } /* i */ { _near *file-fcb } /* i */ ,short operation ); /* i */

CHECKALLOCATESEGMENT
(superseded by SEGMENT_ALLOCATE_CHKPT_) Allocates an extended data segment for use by the backup process in a NonStop process pair. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CHECKCLOSE
(superseded by FILE_CLOSE_CHKPT_) Is called by a primary process to close a designated file in its backup process. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CHECKDEALLOCATESEGMENT
(superseded by SEGMENT_DEALLOCATE_CHKPT_) Removes an extended data segment from use by the backup process in a NonStop process pair. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 4- 13

Functions Summary (A-C)

CHECKDEFINE
Updates a backup process with a DEFINE that was changed in the primary process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKMONITOR
Is called by a backup process to monitor the state of the primary process and to return control to the appropriate point (in the backup process) in the event that the primary process fails. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKOPEN
(superseded by FILE_OPEN_CHKPT_) Is called by a primary process to open a designated file for the primarys backup process. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CHECKPOINT
(superseded by CHECKPOINTX) Is called by a primary process to send information about the primary processs current executing state to the backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKPOINTMANY
(superseded by CHECKPOINTMANYX) Is called by a primary process to send information about the primary processs current executing state to the backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKPOINTMANYX
Is called by a primary process to send information about the primary processs current executing state to the backup process when more than five pieces of information are sent. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

Guardian Programming Reference Summary for C 522630-001 4- 14

Functions Summary (A-C)

CHECKPOINTX
Is called by a primary process to send information about the primary processs current executing state to the backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKRESIZESEGMENT
Complements the RESIZESEGMENT procedure. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKSETMODE
Allows a primary process of a NonStop process pair to propagate SETMODE operations to the backup process of the pair. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHECKSWITCH
Is called by a primary process to interchange the duties of the primary and backup processes. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

CHILD_LOST
Examines a system message to determine whether a specified process or process pair has been lost.
#include <cextdecs(CHILD_LOST_ )> short CHILD_LOST_ ( char *message /* i */ ,short length /* i */ ,short *processhandle );/* i */ return value 0 1 2 = = = Process or process pair is not lost. Reserved. Parameter error.

Guardian Programming Reference Summary for C 522630-001 4- 15

Functions Summary (A-C)

3 4 5

= = =

Bounds error. Process or process pair is lost. System message is not relevant.

message -2 -5 -6 -8 -100 -101 -110 = = = = = = = Local processor down. Process deletion (stop). Process deletion (abend). Network status change. Remote processor down. Process deletion. Connection to remote system lost.

CLOSE
(superseded by FILE_CLOSE_) Is called by a primary process to close a designated file in its backup process. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CLOSE^FILE
Closes a file. CLOSE^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(CLOSE_FILE)> short CLOSE_FILE ( { short _near *common-fcb } /* i */ { short _near *file-fcb } /* i */ ,[ short tape-disposition ] ); /* i */

CLOSEALLEDIT
Closes all open IOEdit files. CLOSEALLEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(CLOSEALLEDIT)> void CLOSEALLEDIT ();

Guardian Programming Reference Summary for C 522630-001 4- 16

Functions Summary (A-C)

CLOSEEDIT
Closes a specified file that was opened by OPENEDIT or OPENEDIT_. CLOSEEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CLOSEEDIT_
Closes a specified file that was opened by OPENEDIT or OPENEDIT_. CLOSEEDIT_ is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(CLOSEEDIT_ )> short CLOSEEDIT_ ( short filenum /* i */ ,[ short keep-filenum ] );/* i */

COMPLETEIOEDIT
Informs IOEdit that an outstanding I/O request has finished. COMPLETEIOEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(COMPLETEIOEDIT)> short COMPLETEIOEDIT ( short filenum /* i,o */ ,short count-transferred /* i */ ,long tag); /* i */

COMPRESSEDIT
Copies a specified EDIT file to a new EDIT file that it creates. COMPRESSEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(COMPRESSEDIT)> short COMPRESSEDIT ( short *filenum /* i,o */ ,short count-transferred /* i */ ,long tag); /* i */

Guardian Programming Reference Summary for C 522630-001 4- 17

Functions Summary (A-C)

COMPUTEJULIANDAYNO
Converts a Gregorian calendar date on or after January 1, 0001, to a Julian day number.
#include <cextdecs(COMPUTEJULIANDAYNO)> long COMPUTEJULIANDAYNO ( short year ,short month ,short day ,[ short _near *error-mask ] ); error-mask Bit 0 Bit 1 Bit 2 = = = Year Month Day /* /* /* /* i i i o */ */ */ */

COMPUTETIMESTAMP
Converts a Gregorian (common civil calendar) date and time into a 64-bit Julian timestamp.
#include <cextdecs(COMPUTETIMESTAMP)> long long COMPUTETIMESTAMP ( short _near *date-n-time /* i */ ,[ short _near *errormask ] ); /* o */ date-n-time [0] [1] [2] [3] [4] [5] [6] [7] = = = = = = = = The Gregorian year (yyyy, for example, 1986). The Gregorian month The Gregorian day of the month The hour of the day The minute of the hour The second of the minute The millisecond of the second The microsecond of the millisecond (1-12). (1-31). (0-23). (0-59). (0-59). (0-999). (0-999).

Guardian Programming Reference Summary for C 522630-001 4- 18

Functions Summary (A-C)

errormask Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 = = = = = = = = Year Month Day Hour of day Minute of hour Second of minute Millisecond of second Microsecond of millisecond

CONFIG_GETINFO_BYLDEV CONFIG_GETINFO_BYNAME
Obtain the logical and physical attributes of a device on a G-series release. Use the CONFIG_GETINFO_BYLDEV procedure to specify the device by logical device number. Use the CONFIG_GETINFO_BYNAME procedure to specify the device by name.
Note. These procedures are supported only on G-series releases. To obtain information about devices on D-series releases, call one of the following procedures: FILE_GETINFOBYNAME_, DEVICE_GETINFOBYNAME_, or DEVICE_GETINFOBYLDEV_.

#include <cextdecs(CONFIG_GETINFO_BYLDEV_)> short CONFIG_GETINFO_BYLDEV_ ( long ldevnum , long *common-info , long common-info-maxlen , long *common-info-len , char *specific-info , long specific-info-maxlen , long *specific-info-len , long timeout , long *error-detail ) /* /* /* /* /* /* /* /* /* i o i o o i o i o */ */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 4- 19

Functions Summary (A-C)

#include <cextdecs(CONFIG_GETINFO_BYNAME_)> short CONFIG_GETINFO_BYNAME_ ( char *devname , long length , long *common-info , long common-info-maxlen , long *common-info-len , char *specific-info , long specific-info-maxlen , long *specific-info-len , long timeout , long *error-detail ); /* /* /* /* /* /* /* /* /* /* i i o i o o i o i o */ */ */ */ */ */ */ */ */ */

return value:
0D 1D 2D 3D 4D Information was successfully returned. Either the device or the process simulating a device detected a file-system error; error-detail contains a file-system error number. Parameter error; error-detail contains the number of the first parameter to be in error, where 1D designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter to be in error, where 1D designates the first parameter on the left. Either the device or the process simulating a device detected an error; errordetail contains the error number returned by the device.

CONFIG_GETINFO_BYLDEV2 CONFIG_GETINFO_BYNAME2
The CONFIG_GETINFO_BYLDEV2_ and CONFIG_GETINFO_BYNAME2_ procedures are variants of CONFIG_GETINFO_BYLDEV and CONFIG_GETINFO_BYNAME. The CONFIG_GETINFO_BYLDEV2_ and CONFIG_GETINFO_BYNAME2_ procedures allow the caller to specify device names that do not conform to Guardian file-name formats as required by some communication devices.
Note. These procedures are supported only on G-series releases. To obtain information about devices on D-series releases, call one of the following procedures: FILE_GETINFOBYNAME_, DEVICE_GETINFOBYNAME_, or DEVICE_GETINFOBYLDEV_.

Guardian Programming Reference Summary for C 522630-001 4- 20

Functions Summary (A-C)

#include <cextdecs(CONFIG_GETINFO_BYLDEV2_)> short CONFIG_GETINFO_BYLDEV2_ ( long ldevnum , long *common-info , long common-maxlen , long *common-len , char *specific-info ] , long specific-maxlen ] , long *specific-len ] , long timeout ] , long *error-detail ] ); /* /* /* /* /* /* /* /* /* i o i o o i o i o */ */ */ */ */ */ */ */ */

#include <cextdecs(CONFIG_GETINFO_BYNAME2_)> short CONFIG_GETINFO_BYNAME2_ ( char *devname , long length , long *common-info , long common-maxlen , long *common-len , char *specific-info , long specific-maxlen , long *specific-len , long timeout , long *error-detail ); /* /* /* /* /* /* /* /* /* /* i i o i o o i o i o */ */ */ */ */ */ */ */ */ */

return value:
0D 1D 2D 3D 4D Device found and data is returned. The value of error-detail is set to zero. Device or subtype 30 process returned an error. The error is reported in errordetail. Required parameter is invalid. The value of error-detail is set to the ordinal number of the invalid parameter. Bounds error; a reference parameter contained an illegal address. The value of error-detail is set to the ordinal number of the invalid parameter. Device returned error or invalid data to the inquiry. If Error-detail is -1, then the device returned zero and the response is invalid. Otherwise, errordetail is the value of the error returned to the inquiry by the device.

Guardian Programming Reference Summary for C 522630-001 4- 21

Functions Summary (A-C)

CONTIME
Converts a 48-bit timestamp to a date and time in integer form.
#include <cextdecs(CONTIME)> void CONTIME ( short ,short ,short ,short date-and-time [0] [1] [2] [3] [4] [5] [6] = = = = = = = Year Month Day Hour Minute Second 0.01 sec (1975, 1976, ... ) (1-12) (1-31) (0-23) (0-59) (0-59) (0-99) _near *date-and-time t0 t1 t2 ); /* /* /* /* o i i i */ */ */ */

CONTROL
Performs device-dependent I/O operations.
#include <cextdecs(CONTROL)> _cc_status CONTROL ( short filenum ,short operation ,[ short param ] ,[ long tag ] ); /* /* /* /* i i i i */ */ */ */

_status_lt (<return_value>) _status_eq (<return_value>) _status_gt (<return_value>)

An error occurred (call FILEINFO). CONTROL was successful. For magnetic tape, the end of file (EOF) was encountered while spacing records; for a process file, the process is not accepting CONTROL system messages. When device handlers do not allow the operation, file-system error 2 returns.

Note. CONTROL operations are summarized in Section 5. CONTROL operations used with the I/O devices are discussed in the Guardian Procedure Calls Reference Manual.

Guardian Programming Reference Summary for C 522630-001 4- 22

Functions Summary (A-C)

CONTROLBUF
Performs device-dependent I/O operations requiring a data buffer.
#include <cextdecs(CONTROLBUF)> _cc_status CONTROLBUF ( short filenum /* ,short operation /* ,short _near *buffer /* ,short count /* ,[ short _near *count-transferred ] /* ,[ long tag ] ); /* i i i i o i */ */ */ */ */ */

_status_lt (<return_value>) _status_eq (<return_value>) _status_gt (<return_value>)

An error occurred (call FILEINFO). CONTROLBUF was successful. For a process file, the process is not accepting CONTROLBUF system messages.

CONTROLMESSAGESYSTEM
Controls the maximum number of receive and send XLBs (extended memory control blocks) used by a process.
#include <cextdecs(CONTROLMESSAGESYSTEM)> short CONTROLMESSAGESYSTEM ( short actioncode /* i */ ,short value ); /* i */ error 0 2 21 29 = = = = Successful, no error Bad actioncode Bad value Missing parameter

value
0 1 = = Sets the limit on the number of outstanding messages to the process, including time-limit expiration messages. Sets the limit on the number of outstanding messages sent by the process (the maximum number of send XLBs for this process).

Guardian Programming Reference Summary for C 522630-001 4- 23

Functions Summary (A-C)

CONVERTASCIIEBCDIC
Translates the 256 EBCDIC encodings to and from the 256 8-bit ASCII encodings. For more information, refer to the Guardian Procedure Calls Reference Manual.
#include <cextdecs(CONVERTASCIIEBCDIC)> void CONVERTASCIIEBCDIC ( const char* buffer /* i */ ,const unsigned short count /* i */ ,const short translation); /* i */

CONVERTPROCESSNAME
(superseded by FILENAME_RESOLVE_) Converts a process name from local to network form. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CONVERTPROCESSTIME
Converts the quad microsecond process time returned by PROCESSTIME, MYPROCESSTIME, or PROCESSINFO into hours, minutes, seconds, milliseconds, and microseconds.
#include <cextdecs(CONVERTPROCESSTIME)> _cc_status CONVERTPROCESSTIME ( long long process-time /* ,[ short _near *hours ] /* ,[ short _near *minutes ] /* ,[ short _near *seconds ] /* ,[ short _near *milliseconds ] /* ,[ short _near *microseconds ] );/* i o o o o o */ */ */ */ */ */

_status_lt (<return value>) _status_eq (<return value>) _status_gt (<return value>)

The process-time parameter represents a quantity greater than 3.7 years. CONVERTPROCESSTIME is successful. One or more of the supplied output parameters failed the bounds check on the address.

Guardian Programming Reference Summary for C 522630-001 4- 24

Functions Summary (A-C)

CONVERTTIMESTAMP
Converts a GMT timestamp to or from a local-time-based timestamp within any accessible node in the network.
#include <cextdecs(CONVERTTIMESTAMP)> long long CONVERTTIMESTAMP ( long long julian-timestamp ,[ short direction ] ,[ short node ] ,[ short _near *error ] ); direction 0 1 2 3 error -5 -4 -3 -2 -1 0 1 2 >2 = = = = = = = = = Value of node is out of range. The timestamp parameter not supplied or has invalid value. Invalid value supplied for direction. Impossible LCT. Ambiguous LCT. No errors, successful. DST range error. DST table not loaded. File-system error (attempting to reach NODE). = = = = GMT to local civil time (LCTthe default) GMT to local standard time (LST) LCT to GMT LST to GMT /* /* /* /* i i i o */ */ */ */

CPU_GETINFOLIST_
Use the PROCESSOR_GETINFOLIST_ procedure instead of CPU_GETINFOLIST_. Calls to PROCESSOR_GETINFOLIST_ are identical in their format and values to those for CPU_GETINFOLIST_.

Guardian Programming Reference Summary for C 522630-001 4- 25

Functions Summary (A-C)

CPUTIMES
Returns the length of time, in microseconds, since the cold load that a given processor has spent in the busy, idle, or interrupt states.
#include <cextdecs(CPUTIMES)> _cc_status CPUTIMES([ ,[ ,[ ,[ ,[ ,[ short cpu ] /* i */ short sysid ] /* i */ long long *total-time ] /* o */ long long *cpu-process-busy ]/* o */ long long *cpu-interrupt ] /* o */ long long *cpu-idle ] ); /* o */

_status_lt (<return value>)

The system is unavailable, the system does not exist, the procedure could not get resources to execute, or the system is running on a pre-B00 version of the operating system. CPUTIMES is successful. The supplied parameters failed the bounds check.

_status_eq (<return value>) _status_gt (<return value>)

CREATE
(superseded by FILE_CREATE_ and FILE_CREATELIST_) Defines a new structured or unstructured disk file. This procedure operates only on Guardian objects. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CREATEPROCESSNAME
(superseded by PROCESSNAME_CREATE_) Returns a unique process name suitable for passing to NEWPROCESS and NEWPROCESSNOWAIT. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CREATEREMOTENAME
(superseded by PROCESSNAME_CREATE_) Supplies a process name that is unique for the specified system in a network. (This process name goes into the name parameter of NEWPROCESS.) This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.
Guardian Programming Reference Summary for C 522630-001 4- 26

Functions Summary (A-C)

CREATORACCESSID
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the creator access ID (CAID) of the process that created the calling process. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

CRTPID_TO_PROCESSHANDLE_
Converts a process ID (CRTPID) to the corresponding process handle.
#include <cextdecs(CRTPID_TO_PROCESSHANDLE_ )> short CRTPID_TO_PROCESSHANDLE_ ( short *process-id ,short *processhandle ,[ short *pair-flag ] ,[ long node-number ] ); /* /* /* /* i o o i */ */ */ */

CURRENTSPACE
Returns the ENV register (as saved in the stack marker) and a string (in ASCII) containing the space ID of the caller.
#include <cextdecs(CURRENTSPACE)> short CURRENTSPACE ( [ char *ascii-space-id ] ); /* o */

return value:
Bit 4 Bit 7 Bit 11-15 Library bit System code bit Space ID bits

Guardian Programming Reference Summary for C 522630-001 4- 27

Functions Summary (A-C)

Guardian Programming Reference Summary for C 522630-001 4- 28

Functions Summary (D-F)

This section lists functions in alphabetic order and briefly describes the syntax of each. For additional information about the functions, refer to the Guardian Procedure Calls Reference Manual.

DAYOFWEEK
Takes a 32-bit Julian day number and returns the corresponding day of the week.
#include <cextdecs(DAYOFWEEK)> short DAYOFWEEK ( long julian-day-num ); /* i */ julian-day-num 0 -1 = = Sunday, 1 = Monday, ..., 6 = Saturday. The value of julian-day-num is negative.

DEALLOCATESEGMENT
(superseded by SEGMENT_DEALLOCATE_) Deallocates an extended data segment when the segment is no longer needed by the calling process. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

DEBUG
Directly invokes the debug facility.
#include <cextdecs(DEBUG)> void DEBUG ();

DEBUGPROCESS
(superseded by PROCESS_DEBUG_) Invokes the debug facility on a process.
CALL DEBUGPROCESS ( process-id ,error ,[term ] ,[ now ] ); /* /* /* /* i o i i */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5 -1

Functions Summary (D-F)

error 0 11 13 14 18 22 29 48 190 201 240-249 250 590 = = = = = = = = = = = = = No error. Specified process does not exist. Invalid name. Supplied process ID references an LDEV that does not exist. Specified system is not known. Parameter or buffer out of bounds. Missing parameter. Security violation. The value of term (or the callers home terminal if term was not specified) is not device type 6. Unable to communicate over this path. Network errors. All paths to the specified system are down. Bad parameter value.

DEFINEADD
Adds a DEFINE to the calling processs context using the attributes in the working set. DEFINEADD can replace an existing DEFINE with the attributes in the working set.
#include <cextdecs(DEFINEADD)> short DEFINEADD ( constchar *define-name /* i */ ,[ short replace ] /* i */ ,[ short _near *checknum ] ); /* o */

return value:
0 2049 2050 2051 2052 2053 2054 2057 2058 = = = = = = = = = Add was successful. A syntax error occurred in name. Define already exists. Define does not exist. Unable to obtain file-system buffer space. Unable to obtain physical memory. Bounds error in define-name. Working set is not complete. Working set is not consistent.

Guardian Programming Reference Summary for C 522630-001 5 -2

Functions Summary (D-F)

2059 2066 2069

= = =

Working set is invalid. Missing parameter. The DEFMODE of the process does not permit the addition of the DEFINE.

checknum
001 002 003 = = = Specify either RETENTION or EXPIRATION, not both. If you specify USE IN or EXTEND, you must include LABELS ANSI, VOLUMES. If you specify VOLUME, you must also specify LABELS ANSI, LABELS IBM, or LABELS IBMBACKUP. If you specify one of theseLABELS, you must also specify VOLUME. If you specify LABELS ANSI, you must not specify LABELS EBCDIC, and vice versa. If you specify RECFORM F, then you must specify a BLOCKLEN that is a multiple of RECLEN. If you specify DEVICE, you cannot specify SYSTEM in the same DEFINE, and vice versa. If you specify LABELS BYPASS or LABELS OMITTED, then DEVICE is required and the following attributes may not be specified: VOLUME, OWNER, FILESECT, FILESEQ, FILEID, RETENTION, EXPIRATION, GEN, VERSION, RECFORM, BLOCKLEN, RECLEN, REELS, USE, EBCDIC, SYSTEM. If you specify VOLUME SCRATCH, then USE IN or USE EXTEND is not allowed. If you specify LABELS IBM or LABELS IBMBACKUP, FILEID must be specified. If you do not specify BLOCKLEN but do specify RECLEN, you must specify a RECLEN value that is greater than 0. If you specify LABELS IBMBACKUP, the system you specify in the SYSTEM or DEVICE attribute must have an operating system version of C20 or later.

004 005 006 007

= = = =

008 009 010 011

= = = =

DEFINEDELETE
Deletes a DEFINE from the calling processs context.
#include <cextdecs(DEFINEDELETE)> short DEFINEDELETE ( constchar *define-name ); /* i */

Guardian Programming Reference Summary for C 522630-001 5 -3

Functions Summary (D-F)

return value:
0 2049 2051 2052 2054 2066 = = = = = = Add was successful. A syntax error occurred in name. Define does not exist. Unable to obtain file-system buffer space. Bounds error in define-name. Missing parameter.

DEFINEDELETEALL
Deletes all DEFINEs from the calling processs context.
#include <cextdecs(DEFINEDELETEALL)> short DEFINEDELETEALL ();

DEFINEINFO
Returns selected information about a DEFINE.
#include <cextdecs(DEFINEINFO)> short DEFINEINFO ( constchar *define-name ,char *class ,char *attribute-name ,char *value-buf ,short value-buf-len ,short _near *value-len ); /* /* /* /* /* /* i o o o o o */ */ */ */ */ */

return value:
0 2049 2051 2052 2054 2066 = = = = = = Add was successful. A syntax error occurred in name. Define does not exist. Unable to obtain file-system buffer space. Bounds error in define-name. Missing parameter.

Guardian Programming Reference Summary for C 522630-001 5 -4

Functions Summary (D-F)

DEFINELIST
Specifies the station addresses of the stations the application process wishes to communicate with, but only when the process acts as a supervisor or tributary station in a centralized multipoint configuration.
#include <cextdecs(DEFINELIST)>

_cc_status DEFINELIST ( short filenum


,short ,short ,short ,short ,short _near *address-list address-size num-entries polling-count polling-type );

/* /* /* /* /* /*

i i i i i i

*/ */ */ */ */ */

_status_lt (<return_value>) _status_eq (<return_value>)

An error occurred (call FILEINFO). The DEFINELIST procedure was executed successfully.

DEFINEMODE
Controls the use of DEFINEs.
#include <cextdecs(DEFINEMODE)> short DEFINEMODE ( [ short new-value ] /* i */ ,[ short _near *old-value ] ); /* o */

return value:
0 2067 = = Success. The value supplied in new-value is invalid.

DEFINENEXTNAME
Returns the name of the DEFINE that follows the specified DEFINE (in ASCII order).
#include <cextdecs(DEFINENEXTNAME)> short DEFINENEXTNAME ( char *define-name ); /* i,o */

Guardian Programming Reference Summary for C 522630-001 5 -5

Functions Summary (D-F)

return value:
0 2049 2051 2052 2054 2066 2060 = = = = = = = Successful. A syntax error occurred in name. DEFINE not found. Unable to obtain file-system buffer space. Parameter address is bad. Missing parameter. No more DEFINEs.

DEFINEPOOL
(superseded by POOL_CHECK_, POOL_DEFINE_, POOL_GETINFO_, POOL_GETSPACE_, POOL_PUTSPACE_, and POOL_RESIZE_) Designates a portion of a users stack or an extended data segment for use as a pool.
#include <cextdecs(DEFINEPOOL)> short DEFINEPOOL ( short *pool-head /* o */ ,short *pool /* i */ ,long pool-size ); /* i */ status 0 1 2 3 4 5 6 = = = = = = = No error. Bounds error on pool-head. Bounds error on pool. Invalid pool-size. The pool-head and pool parameters overlap. The pool-head parameter is not word-aligned. The pool parameter is not word-aligned.

Guardian Programming Reference Summary for C 522630-001 5 -6

Functions Summary (D-F)

DEFINEREADATTR
Obtains the current value of an attribute in a DEFINE in the calling processs context or in the working set.
#include <cextdecs(DEFINEREADATTR)> short DEFINEREADATTR( [ constchar *define-name ] /* ,char *attribute-name /* ,[ short _near *cursor ] /* ,char *value-buf /* ,short value-buf-len /* ,short _near *value-len /* ,[ short read-mode ] /* ,[ short _near *info-word ] );/* i i,o i,o o i o i o */ */ */ */ */ */ */ */

return value:
0 2049 2051 2052 2054 2055 2061 2066 read-mode 0 1 2 = = = Search the present attributes only. Search the present plus required attributes that are not present. Search the present plus the required and optional attributes that are not present. = = = = = = = = Successful. A syntax error occurred in name. DEFINE not found. An error occurred when placing PFS in use. Bounds error on parameter. Attribute not supported. No more attributes. Missing parameter.

info-word Bits 14-15 Indicates the type of the attribute: 0 = Optional, 1 = Defaulted, 2 = Required.

Guardian Programming Reference Summary for C 522630-001 5 -7

Functions Summary (D-F)

DEFINERESTORE
Uses a saved version of a DEFINE in the users buffer to create an active DEFINE. If an active DEFINE of the same name already exists, it can optionally be replaced. The saved DEFINE can also be placed in the working set without its name.
#include <cextdecs(DEFINERESTORE)> short DEFINERESTORE ( short *buffer ,[ short options ] ,[ char *define-name ] ,[ short _near *checknum ] ); /* /* /* /* i i o o */ */ */ */

return value:
0 2050 2051 2052 2053 2054 2055 2057 2058 2059 2066 2067 2068 2069 2075 2077 2078 = = = = = = = = = = = = = = = = = Successful. DEFINE already exists and options.<15> is 0 or options is omitted. DEFINE does not exist and options.<15> is 1. Unable to obtain file-system buffer space. Unable to obtain physical memory. Bounds error on buffer, define-name or checknum parameter. Illegal attribute in saved DEFINE. DEFINE or working set is incomplete. DEFINE or working set is inconsistent. DEFINE or working set is invalid. Parameter missing. Attribute contained an illegal value. Saved DEFINE was of invalid CLASS. Attempt to add a DEFINE that does not fall under the current DEFMODE setting. The value of option (bits 0-13) is not 0. The buffer or define-name parameter is in invalid segment. The buffer parameter does not contain a valid saved DEFINE.

Guardian Programming Reference Summary for C 522630-001 5 -8

Functions Summary (D-F)

DEFINERESTOREWORK[2]
DEFINERESTOREWORK restores the DEFINE working set from the background set. DEFINERESTOREWORK2 allows a second background DEFINE working set to be restored.
#include <cextdecs(DEFINERESTOREWORK[2])> short DEFINERESTOREWORK[2] ();

return value:
0 2052 2053 = = = Success. Unable to obtain file-system buffer space. Unable to obtain physical memory.

DEFINESAVE
Copies an active DEFINE or the current working attribute set into a user buffer. The saved DEFINE can later be made an active DEFINE or be placed into the working set by using DEFINERESTORE.
#include <cextdecs(DEFINESAVE)> short DEFINESAVE ( constchar *define-name ,short *buffer ] ,short buflen ,short *deflen ,[ short option ] ); /* /* /* /* /* i o i o i */ */ */ */ */

return value:
0 2049 2051 2052 2053 2054 2057 2058 2059 2066 = = = = = = = = = = Successful. Syntax error in name. DEFINE not found. Unable to obtain file-system buffer space. Not enough physical memory. Bounds error on buffer, deflen or define-name parameters. DEFINE or working set is incomplete. DEFINE or working set is inconsistent. DEFINE or working set is invalid. Parameter missing.

Guardian Programming Reference Summary for C 522630-001 5 -9

Functions Summary (D-F)

2075 2076 2077 2079 option

= = = =

The value of option (bits 0-14) is not 0. Users buffer is too small. The buffer or define-name parameter is in invalid segment. An attempt to save the working set occurred, but define-name is DEFAULTS and working set is not class DEFAULTS.

Bits 0-14 Bit 15

are reserved and must be 0. 1 Save the current working set and name it define-name. 0 Save the active DEFINE named by define-name.

DEFINESAVEWORK[2]
DEFINESAVEWORK saves the DEFINE working set in the background set. DEFINESAVEWORK2 allows a second background working set to be saved.
#include <cextdecs(DEFINESAVEWORK[2])> short DEFINESAVEWORK[2] ();

return value:
0 2052 2053 = = = Successful Unable to obtain file-system buffer space Not enough physical memory

DEFINESETATTR
Modifies the value of an attribute in the DEFINE working set.
#include <cextdecs(DEFINESETATTR)> short DEFINESETATTR ( constchar *attribute-name ,[ const char *value ] ,[ short value-len ] ,[ short _near *default-names ] ); /* /* /* /* i i i i */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 10

Functions Summary (D-F)

return value:
0 2049 2052 2055 2062 2063 2064 2066 2067 = = = = = = = = = Successful. Syntax error in name. Unable to obtain file-system buffer space. Attribute not supported. Attribute name too long. A syntax error occurred in default names. The required attribute cannot be reset. Parameter missing. Illegal value.

default-names Bits 0-3 Bits 4-7 The default volume name (blank-filled on the right) The default subvolume name (blank-filled on the right)

DEFINESETLIKE
Initializes the working set with the attributes in an existing DEFINE.
#include <cextdecs(DEFINESETLIKE)> short DEFINESETLIKE ( constchar *define-name ); /* i */

return value:
0 2049 2051 2052 2053 2054 2066 = = = = = = = Successful. Syntax error in name. DEFINE not found. Unable to obtain file-system buffer space. Unable to obtain physical memory. Bounds error occurred on define-name. Parameter missing.

Guardian Programming Reference Summary for C 522630-001 5- 11

Functions Summary (D-F)

DEFINEVALIDATEWORK
Checks the working set for consistency.
#include <cextdecs(DEFINEVALIDATEWORK)> short DEFINEVALIDATEWORK( short _near *checknum ); /* o */

return value:
0 2057 2058 2059 = = = = Successful. Working set is incomplete. Working set is inconsistent. Working set is invalid.

DELAY
Allows a process to suspend itself for a timed interval.
#include <cextdecs(DELAY)> void DELAY ( long time-period ); /* i */

DELETEEDIT
Deletes from an EDIT file all lines that have line numbers in a specified range. DELETEEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(DELETEEDIT)> short DELETEEDIT ( short filenum ,long first ,long last ); /* i */ /* i */ /* i */

Guardian Programming Reference Summary for C 522630-001 5- 12

Functions Summary (D-F)

DEVICE_GETINFOBYLDEV_
Obtains the logical and physical attributes of a device.
#include <cextdecs(DEVICE_GETINFOBYLDEV_)> short DEVICE_GETINFOBYLDEV_ ( long ldevnum ,[ short *logical-info ] ,[ short logical-info-maxlen ] ,[ short *logical-info-len ] ,[ short *primary-info ] ,[ short primary-info-maxlen ] ,[ short *primary-info-len ] ,[ short *backup-info ] ,[ short backup-info-maxlen ] ,[ short *backup-info-len ] ,[ long timeout ] ,[ short options ] ,[ short match-type ] ,[ short match-subtype ] ,[ char *devname ] ,[ short maxlen ] ,[ short *devname-len ] ,[ short *error-detail ] ); /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* i o i o o i o o i o i i i i i o:i o o */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

return value:
0 1 2 3 4 5 options Bits 0-12 Bit 13 Reserved (specify 0). Specifies that the procedure search for the next device that has a subtype of match-subtype. Bit 15 of the options parameter must be set and match-subtype must be specified when this option is used. Specifies that the procedure search for the next device that has a type of match-subtype. Bit 15 of the options parameter must be set and match-type must be specified when this option is used. Specifies that the procedure search for the next device that matches the selection criteria.
Guardian Programming Reference Summary for C 522630-001 5- 13

= = = = = =

Information successfully returned. Reserved. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Device not found; error-detail contains a file-system error number. Buffer too small. This error applies only to devname:maxlen.

Bit 14

Bit 15

Functions Summary (D-F)

DEVICE_GETINFOBYNAME_
Obtains the logical and physical attributes of a device.
#include <cextdecs(DEVICE_GETINFOBYNAME_)> short DEVICE_GETINFOBYNAME_ ( char *devname /* ,short length /* ,[ short *logical-info ] /* ,[ short *logical-info-len ] /* ,[ short *primary-info ] /* ,[ short primary-info-maxlen ]/* ,[ short *primary-info-len ] /* ,[ short *backup-info ] /* ,[ short backup-info-maxlen ] /* ,[ short *backup-info-len ] /* ,[ long timeout ] /* ,[ short *error-detail ] ); /* i i o o o i o o i o i o */ */ */ */ */ */ */ */ */ */ */ */

return value:
1 2 3 4 = = = = Reserved. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Device not found; error-detail contains a file-system error number.

DEVICEINFO
(superseded by FILE_GETINFOBYNAME_ or FILE_GETINFOLISTBYNAME_) Obtains the device type and physical record length of a file. The file can be opened or closed. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

DEVICEINFO2
(superseded by FILE_GETINFOBYNAME_or FILE_GETINFOLISTBYNAME_) Obtains the device type and the physical record length of a file. The file can be opened or closed. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 5- 14

Functions Summary (D-F)

DISK_REFRESH_
(superseded on G-series releases) Causes control information to be written to the associated disk volume.
#include <cextdecs(DISK_REFRESH_)> short DISK_REFRESH_ ( char *name /* i */ ,short length ); /* i */

DISKINFO
(superseded by FILE_GETINFOLISTBYNAME_) Obtains information about disk volumes. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

DNUMIN
Converts the ASCII characters that represent a number into the signed double-word integer value for that number.
#include <cextdecs(DNUMIN)> long DNUMIN ( char *ascii-num ,long *signed-result ,short base ,[ short *status ] ,[ short flags ] ); status 1 0 -1 = = = A nonexistent number (The string does not start with a valid sign, prefix, or numeric.) Valid conversion. Illegal integer (The number cannot be represented in 32 bits as a signed quantity.) /* /* /* /* /* i o i o i */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 15

Functions Summary (D-F)

flags Bits 0-12 Bit 13 Bit 14 Bit 15 Must be 0. Disallow preceding sign (+/-). Disallow prefixes (%, #, and so on). Permit a two-word number of the form integer1.integer2, where each unsigned integer must fit within a 16-bit word.

DNUMOUT
Converts unsigned double-word integer values to their ASCII equivalents, right-justified in an array.
#include <cextdecs(DNUMOUT)> short DNUMOUT ( char *ascii-result ,long unsigned-doubleword ,short base ,[ short width ] ,[ short flags ] ); flags Bits 0-14 Bit 15 Must be 0 Blank-fill on left (The default is zero-fill.) /* /* /* /* /* o i i i i */ */ */ */ */

DST_GETINFO_
Provides information about the DST entry that is in effect at time keygmt.
#include <cextdecs(DST_GETINFO_)> short DST_GETINFO_ ( long long keygmt /* i */ ,short *dstentry ); /* o */

Guardian Programming Reference Summary for C 522630-001 5- 16

Functions Summary (D-F)

DST_TRANSITION_ADD_
Allows a super-group user (255,n) to add an entry to the daylight-saving-time (DST) transition table. This operation is allowed only when the DAYLIGHT_SAVING_TIME option in the system is configured to the TABLE option. This procedure supersedes the ADDDSTTRANSITION procedure.
#include <cextdecs(DST_TRANSITION_ADD_)> short DST_TRANSITION_ADD_ ( short *dstentry ); /* i */

DST_TRANSITION_DELETE_
Allows a super-group user (255,n) to delete an existing entry from the daylight-savingtime (DST) transition table. This operation is allowed only when the DAYLIGHT_SAVING_TIME option in the system is configured to the TABLE option.
#include <cextdecs(DST_TRANSITION_DELETE_)> short DST_TRANSITION_DELETE_ ( short *dstentry ); /* i */ dstentry Error 0 1 2 Literal Value ZSYS^VAL^DST^OK ZSYS^VAL^DST^ SECURITY^ERROR ZSYS^VAL^DST^ BAD^VERSION Description The operation is successful. The caller is not a super-group user (255,n). The version number passed in ZSYS^DDL^DST^ENTRY^DEF is not valid. The only valid version is ZSYS^VAL^DST^VERSION^SEP1997. One of the specified parameters is not valid. Invalid interval operation. An attempt was made to add, delete, or modify a DST entry that causes a collision with an existing DST entry. An attempt was made to delete a required DST entry. This error is returned when the DST entry that the user attempted to delete is in effect at the time the delete operation was attempted and the offset of the entry is nonzero. The DAYLIGHT_SAVING_TIME option in the system is not configured to use the TABLE option.

3 4

ZSYS^VAL^DST^BAD ^PARAMETER ZSYS^VAL^DST^ INTERVAL^ERROR ZSYS^VAL^DST^ DELETE^NOW^ ERROR

ZSYS^VAL^DST^ TYPE^ERROR

Guardian Programming Reference Summary for C 522630-001 5- 17

Functions Summary (D-F)

Error 7 8

Literal Value ZSYS^VAL^DST^ TABLE^EMPTY ZSYS^VAL^DST^ BOUNDS^ERROR

Description The DST table has no entries. This error is returned by the DST_GETINFO_ procedure. An attempt was made to use time values outside the supported range. The supported range is 1/ 1/ 1 0:00:00.000000 through 10000/12/31 23:59:59.999999 GMT. The specified keygmt value was less than the lowgmt value of the first DST interval with nonzero offset. This error is returned by the DST_GETINFO_ procedure. The specified keygmt value is greater than the highgmt of the last DST interval with nonzero offset. This error is returned by the DST_GETINFO_ procedure. An attempt was made to add too many entries to the table. Delete some of the entries and try again.

ZSYS^VAL^DST^RAN GE^LOW

10

ZSYS^VAL^DST^RAN GE^HIGH

11

ZSYS^VAL^DST^COU NT^OVERFLOW

DST_TRANSITION_MODIFY_
Allows a super-group user (255,n) to modify an entry in the daylight-saving-time (DST) transition table. This operation is allowed only when the DAYLIGHT_SAVING_TIME option in the system is configured to the TABLE option.
#include <cextdecs(DST_TRANSITION_MODIFY_)> short DST_TRANSITION_MODIFY_ ( short *olddst /* i */ ,short *newdst ); /* i */

EDITREAD
Reads text lines from an EDIT file (file code = 101). One line is transferred by each call to EDITREAD.
#include <cextdecs(EDITREAD)> short EDITREAD ( short _near *edit-controlblk ,char *buffer ,short bufferlen ,long *sequence-num ); /* /* /* /* i o i o */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 18

Functions Summary (D-F)

status >= 0 -1 -2 -3 -4 -5 -6 = = = = = = = Indicates that the reading of the file was successful. End of file encountered. Error occurred while reading. Text file format error. Sequence error. Checksum error. Invalid buffer address.

EDITREADINIT
Prepares a buffer in the application programs data area for subsequent calls to EDITREAD.
#include <cextdecs(EDITREADINIT)> short EDITREADINIT ( short _near *edit-controlblk ,short filenum ,short bufferlen ); status 0 -1 -2 -3 -6 = = = = = Successful (OK to read). End of file detected (empty file). I/O error. Format error (not EDIT file), or buffer length is incorrect. Invalid buffer address. /* i */ /* i */ /* i */

ERRNO_GET_
Obtains the value of the errno variable set by many OSS, native C/C++, and some Guardian routines. C programmers using the C run-time libraries, CRE support libraries, or shared run-time libraries (SRLs) can access the errno variable directly and do not use this procedure.

Guardian Programming Reference Summary for C 522630-001 5- 19

Functions Summary (D-F)

EXTENDEDIT
Copies an EDIT file to a new file that it creates and that has a larger extent size than the original file. EXTENDEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(EXTENDEDIT)> long EXTENDEDIT ( short *filenum /* i,o */ ,[ long start ] /* i */ ,[ long increment ] ); /* i */

FILE_ALTERLIST_
Changes certain attributes of a disk file that are normally set when the file is created. This procedure operates only on Guardian objects.
#include <cextdecs(FILE_ALTERLIST_)> short FILE_ALTERLIST_ ( const char *filename ,short length ,short *item-list ,short number-of-items ,short *values ,short values-length ,[ short partonly ] ,[ short *error-item ] ); /* /* /* /* /* /* /* /* i i i i i i i o */ */ */ */ */ */ */ */

FILE_CLOSE_
Closes an open file opened by either FILE_OPEN_ or OPEN.
#include <cextdecs(FILE_CLOSE_)> short FILE_CLOSE_ ( short filenum /* i */ ,[ short tape-disposition ] ); /* i */ tape-disposition 0 1 2 3 4 = = = = = Rewind and unload; do not wait for completion. Rewind and take offline; do not wait for completion. Rewind and leave online; do not wait for completion. Rewind and leave online; wait for completion. Do not rewind; leave online.

Guardian Programming Reference Summary for C 522630-001 5- 20

Functions Summary (D-F)

FILE_CLOSE_CHKPT_
Is called by a primary process to close a designated file in its backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

FILE_COMPLETE_
completes one previously initiated I/O operation for a Guardian file or returns ready information for one Open System Services (OSS) file.
#include <cextdecs(FILE_COMPLETE_)> short FILE_COMPLETE_ ( short *completion-info ,[ long timelimit ] ,[ short *complete-element-list ,[ short num-complete-elements ] ,[ short *error-complete-element ] ); timelimit >0D = Wait for completion. The timelimit parameter specifies the maximum time (in 0.01-second units) from the time of the FILE_COMPLETE_ call that the caller can wait for completion. Check for completion. FILE_COMPLETE_ immediately returns to the caller, regardless of whether completion has occurred. Wait indefinitely. An invalid value (file-system error 590 occurs). Wait indefinitely. /* /* /* /* /* o i i i o */ */ */ */ */

= 0D = -1D < -1D omitted

= = = =

FILE_COMPLETE_GETINFO_
Provides information about the set of files that are currently enabled for completion and thus can be completed by the FILE_COMPLETE_ procedure. These files were enabled for completion by one or more previous calls to the FILE_COMPLETE_SET_ procedure. The information returned includes a list that can contain both Guardian files and Open System Services (OSS) files.
#include <cextdecs(FILE_COMPLETE_GETINFO_)> short FILE_COMPLETE_GETINFO_ ( short *info-list /* o */ ,short maxnum-info-elements /* i */ ,[ short *num-info-elements ] ); /* o */

Guardian Programming Reference Summary for C 522630-001 5- 21

Functions Summary (D-F)

FILE_COMPLETE_SET_
Enables a set of Guardian and Open System Services (OSS) files for completion by subsequent calls to the FILE_COMPLETE_ procedure.
#include <cextdecs(FILE_COMPLETE_SET_)> short FILE_COMPLETE_SET_ ( short *complete-element-list /* i */ ,short num-complete-elements /* i */ ,[ short *error-complete-element ] ); /* o */

FILE_CREATE_
Defines a new structured or unstructured disk file. This procedure operates only on Guardian objects.
#include <cextdecs(FILE_CREATE_)> short FILE_CREATE_ ( char *filename /* ,short maxlen /* ,short *filenamelen /* ,[ short file-code ] /* ,[ short primary-extent-size ] /* ,[ short secondary-extent-size]/* ,[ short maximum-extents ] /* ,[ short file-type ] /* ,[ short options ] /* ,[ short recordlen ] /* ,[ short blocklen ] /* ,[ short keylen ] /* ,[ short key-offset ] ); /* file-type 0 1 2 3 = = = = Unstructured Relative Entry-sequenced Key-sequenced i o:i i,o i i i i i i i i i i */ */ */ */ */ */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 22

Functions Summary (D-F)

options Bits 0-9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 Reserved (must be 0). Refresh EOF. A change to the end-of-file value is to cause the file label to be written immediately to disk. Index compression. For key-sequenced files, the entries in the index blocks are to be compressed. Must be 0 for other file types. Data compression. For key-sequenced files, the keys of entries in the data blocks are to be compressed. Must be 0 for other file types. Audit compression. For audited files, the audit data is to be compressed. Audited. The file is to be audited under the TMF subsystem. Must be 0 for systems without the TMF subsystem. Odd unstructured. For unstructured files, I/O transfers are to occur with the exact counts specified. If this option is not selected, transfers are rounded up to an even byte boundary. Must be 0 for other file types.

FILE_CREATELIST_
Defines a new structured or unstructured disk file with characteristics that cannot be specified through FILE_CREATE_. This procedure operates only on Guardian objects.
#include <cextdecs(FILE_CREATELIST_)> short FILE_CREATELIST_ ( char *filename ,short maxlen ,short *filenamelen ,short *item-list ,short number-of-items ,short *values ,short values-length ,[ short *error-item ] ); /* /* /* /* /* /* /* /* i o:i i,o i i i i o */ */ */ */ */ */ */ */

FILE_GETINFO_
Obtains a limited set of information about a file identified by file number.
#include <cextdecs(FILE_GETINFO_)> short FILE_GETINFO_ ( short filenum /* i ,[ short *last-error ] /* o ,[ char *filename ] /* o ,[ short maxlen ] /* i ,[ short *filename-length ] /* o ,[ short *type-info ] /* o ,[ short *flags ] ); /* o */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 23

Functions Summary (D-F)

type-info
[0] [1] [2] >0 0 -1 [3] 0 1 2 3 -1 [4] >=0 -1 = = = = = = = = = = = = = = = Device type Device subtype Object type SQL disk file Non-SQL disk file Not a disk file File type Unstructured disk file Relative disk file Entry-sequenced disk file Key-sequenced disk file Not a disk file File code Disk file Not a disk file

flags
Bits 0-14 Bit 15 Reserved and undefined. File is an OSS file.

FILE_GETINFOBYNAME_
Obtains a limited set of information about a file identified by file name.
#include <cextdecs(FILE_GETINFOBYNAME_)> short FILE_GETINFOBYNAME_ ( const char *filename /* ,short length /* ,[ short *type-info ] /* ,[ short *physical-recordlen]/* ,[ short options ] /* ,[ long tag-or-timeout ] ) /* ,[ short *flags ] ); /* i i o o i i o */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 24

Functions Summary (D-F)

type-info [0] [1] [2] >0 0 -1 0 1 2 3 -1 [4] >=0 -1 options Bits 0-12 Bit 13 Reserved (specify 0). Specifies that this call is only initiating a nowait inquiry and the information will be returned in a system message. Do not set both options.<13> and options.<14>. Specifies that the sending of a device type inquiry message to a subtype 30 process should not be allowed to take longer than indicated by timeout. If the time is exceeded, error 40 is returned. Specifies that device type inquiry messages are not to be sent to subtype 30 processes. = = = = = = = = = = = = = = Device type Device subtype Object type SQL disk file Non-SQL disk file Not a disk file Unstructured disk file Relative disk file Entry-sequenced disk file Key-sequenced disk file Not a disk file File code Disk file Not a disk file

Bit 14

Bit 15 flags Bit 0-14 Bit 15

Reserved and undefined. File is an OSS file.

Guardian Programming Reference Summary for C 522630-001 5- 25

Functions Summary (D-F)

FILE_GETINFOLIST_
Obtains detailed information about a file identified by file number.
#include <cextdecs(FILE_GETINFOLIST_)> short FILE_GETINFOLIST_ ( short filenum ,short *item-list ,short number-of-items ,short *result ,short result-max ,[ short *result-length ] ,[ short *error-item ] ); error-item Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Size (bytes) 2 * 2 * 2 * 2 2 2 2 4 4 2 2 * 2 * 6 2 2 2 2 Description File name length File name Current file-name length Current file name DEFINE name length DEFINE name Last error Last-error detail Partition in error Key in error Next record pointer Current record pointer Current key specifier Current key length Current key value Current primary-key length Current primary-key value Tape volume Highest open-file number Next open-file number Current access mode Open exclusion mode /* /* /* /* /* /* /* i i i o i o o */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 26

Functions Summary (D-F)

Code 23 24 25 26 30 31 32 33 34 35 36 40 41 42 43 44 45 46 47 50 51 52 53 54 56 57 58 59 60 61 62 63 65 66

Size (bytes) 2 2 2 4 2 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 2 2 2 2 4 2 2 2

Description Open nowait depth Open sync depth Open options Open information Device type Device subtype Demountable disk Audited disk Physical record length Logical device number Subdevice number SQL type File type File code Logical record length Block length Key offset Key length Lock key length Primary extent size Secondary extent size Maximum extents Allocated extents Creation time Last open time Expiration time File owner Safeguard security Progid security Clear on purge Operating-system security string Licensed file Odd unstructured file Audited file

Guardian Programming Reference Summary for C 522630-001 5- 27

Functions Summary (D-F)

Code 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 90 91 92 93 94 95 96 100 101 102 103 104 105 110 111

Size (bytes) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 * 2 * * * 2 * 2 2 * 2 * * 2 4 4

Description Audit compression Data compression Index compression Refresh EOF Create options Write through Verify writes Serial writes File is open Crash open Rollforward needed Broken Corrupt Secondary partition Index levels SQL program SQL valid SQL-catalog name length SQL-catalog name Number of partitions Partition descriptors Partition-volume name-length array Partition-volume names Partition partial-key length Partition partial-key values Partition-volume names total length Number of alternate keys Alternate-key descriptors Number of alternate-key files Alternate-file name-length array Alternate-file names Alternate-file total name length Volume capacity Volume free space

Guardian Programming Reference Summary for C 522630-001 5- 28

Functions Summary (D-F)

Code 112 113 114 115 116 117 118 119 136 137 140 141 142 143 144 145 153 160 161 164 165 166 167 168 169

Size (bytes) 4 4 16 8 2 8 8 8 4 4 8 8 4 4 8 8 2 6 2 4 4 2 4 2 2

Description Volume fragments Largest volume fragment Disk drive types Disk drive capacities Sequential block buffering Last open LCT Expiration LCT Creation LCT Partition EOF Partition maximum size Partition modification time Partition modification LCT Aggregate EOF Aggregate maximum file size Aggregate modification time Aggregate modification LCT Logical (packed) record length Three-word partition modification LCT OSS file OSS group ID OSS access permissions OSS open OSS user ID OSS number of links Security mechanisms in effect

Guardian Programming Reference Summary for C 522630-001 5- 29

Functions Summary (D-F)

FILE_GETINFOLISTBYNAME_
Obtains detailed information about a file identified by file name.
#include <cextdecs(FILE_GETINFOLISTBYNAME_)> short FILE_GETINFOLISTBYNAME_ ( const char *filename ,short length ,short *item-list ,short number-of-items ,short *result ,short result-max ,[ short *result-length] ,[ short *error-item ] ); /* /* /* /* /* /* /* /* i i i i o i o o */ */ */ */ */ */ */ */

FILE_GETLOCKINFO_
Obtains information about locks (held or pending) on a local disk file or on a set of files on a local disk volume. This procedure operates only on Guardian objects.
#include <cextdecs(FILE_GETLOCKINFO_)> short FILE_GETLOCKINFO_ ( const char *name ,short length ,[ short *processhandle ] ,[ short *transid ] ,short *control ,short *lock-descr ,short lock-descr-length ,short *participants ,short max-participants ,[ char *locked-name ] , short maxlen ] ,[ short *locked-name-length ] ); /* /* /* /* /* /* /* /* /* /* /* /* i i i i i,o o i o i o i o */ */ */ */ */ */ */ */ */ */ */ */

return value:
0 = Information for one locked file and all its lock holders/waiters was returned without error. More locks might exist; continue calling FILE_GETLOCKINFO_. End of information about locks associated with a process or transid. Lock information for the file processor transaction was not found. If any information has been returned already it is now invalid.

1 11

= =

Guardian Programming Reference Summary for C 522630-001 5- 30

Functions Summary (D-F)

Information for one locked file and all its lock holders/waiters was returned without error. More locks might exist; continue calling FILE_GETLOCKINFO_. The disk-process lock tables were changed between calls Checksum error on control. The control parameter has been altered between calls to FILE_GETLOCKINFO_ or was not initialized before the first call. Information for one locked record or file has been returned

12 41

= =

45

lock-descr [0] [1] = = Lock type. 0 indicates a file lock; 1 indicates a record lock. Flags. The bits are: <0> = 1 indicates a generic lock. <1:15> = Reserved. [2] [3:4] [5] [6:n] = = = = The number of participants (the number of holders and waiters for the lock). Record ID if the lock is a record lock on a file that is not key-sequenced; undefined otherwise. The length in bytes of the key if the lock is a record lock on a key-sequenced file; 0 otherwise. The key value if the lock is a record lock on a key-sequenced file.

participants [0] = Flags. The bits have the following meanings: Bit 0 Bits 1-3 Bit 4 Bits 5-15 =1 =0 =1 =0 =1 The participant is identified by process handle. The participant is identified by transid. The lock is granted. The lock is in the waiting state. The lock is an intent lock internally set by DP2. Reserved.

[1] = Reserved. [2:11] = The process handle of the participant (if bit 0 of the participants parameter = 1). [2:5] = The transid of the participant (if bit 0 of the participants parameter = 0).

Guardian Programming Reference Summary for C 522630-001 5- 31

Functions Summary (D-F)

FILE_GETOPENINFO_
Obtains information about the opens of one disk file or all the files on a disk device, or the opens of certain nondisk devices.
#include <cextdecs(FILE_GETOPENINFO_)> short FILE_GETOPENINFO_ ( const char *searchname ,short length ,long long *prevtag ,[ short *primary-opener ] ,[ short *backup-opener ] ,[ short *accessmode ] ,[ short *exclusion ] ,[ short *syncdepth ] ,[ char *filename ] ,[ short maxlen ] ,[ short *filenamelen ] ,[ short *accessid ] ,[ short *validmask ] ); accessmode 0 1 2 = = = Read-write Read only Write only /* /* /* /* /* /* /* /* /* /* /* /* /* i i i,o o o i,o o o o i o o o */ */ */ */ */ */ */ */ */ */ */ */ */

exclusion 0 1 2 3 = = = = Shared Exclusive Process exclusive (supported only for Optical Storage Facility) Protected

validmask Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 = = = = = = = Primary-opener Backup-opener Accessmode Exclusion Syncdepth Filename Accessid

Guardian Programming Reference Summary for C 522630-001 5- 32

Functions Summary (D-F)

FILE_GETRECEIVEINFO_
Returns information about the last message read on the $RECEIVE file.
#include <cextdecs(FILE_GETRECEIVEINFO_)> short FILE_GETRECEIVEINFO_ ( short *receive-info ); /* o */ receive-info [0] I/O type. Indicates the data operation last performed by the message sender. 0 = Not a data message (system message). 1 = Sender called WRITE. 2 = Sender called READ. 3 = Sender called WRITEREAD. [1] [2] [3] [4:5] [6:15] Maximum reply count. The maximum number of bytes of data that can be returned by REPLY (as determined by the read count of the sender). Message tag. The value that identifies the request message just read. File number. The value that identifies the file associated with this message in the requesting process. Sync ID. The sync ID associated with this message. Sender process handle. The process handle of the process that sent the last message. For system messages other than the open, close, control, setmode, setparam, resetsync, or controlbuf messages, the null process handle (-1 in each word) is returned. Open label. The value assigned by the application (when replying to the open system message) to the open on which the received message was sent. If this value is unavailable (as when the opener is running on a C-series system), -1 is returned.

[16]

FILE_GETSYNCINFO_
The FILE_GETSYNCINFO_ procedure is called by the primary process of a process pair before starting a series of write operations to a file open with paired access. Unlike the GETSYNCINFO procedure, this procedure can be used with format 2 files.
#include <cextdecs(FILE_GETSYNCINFO_)> short FILE_GETSYNCINFO_ ( short filenum /* i */ , short * infobuf /* o */ , short infosize ); /* o */

Guardian Programming Reference Summary for C 522630-001 5- 33

Functions Summary (D-F)

FILE_OPEN_
Establishes a communication path between an application process and a file and returns a file number to the caller.
#include <cextdecs(FILE_OPEN_)> short FILE_OPEN_ ( { const char *filename | /* const char *pathname } /* ,short length /* ,short *filenum /* ,[ short access ] /* ,[ short exclusion ] /* ,[ short nowait-depth ] /* ,[ short sync-or-receive-depth ] /* ,[ short options ] /* ,[ short seq-block-buffer-id ] /* ,[ short seq-block-buffer-len ] /* ,[ short *primary-processhandle ] );/* access 0 1 2 3 = = = = Read-write Read only Write only Extend (supported only for tape) i i i i,o i i i i i i i i */ */ */ */ */ */ */ */ */ */ */ */

exclusion 0 1 2 3 = = = = Shared Exclusive Process exclusive (supported only for Optical Storage Facility) Protected

options
Bit 0 Unstructured access. For disk files, access is to occur as if the file were unstructured, that is, without regard to record structures and partitioning. (For unstructured files, setting this bit to 1 causes secondary partitions to be inaccessible.) Must be 0 for other devices. Nowait open processing. Specifies that the processing of the open proceed in a nowait manner. This option cannot be specified for the TMF transaction pseudofile (TFILE). The value of nowait-depth must be a nonzero value when this option is used. No open time update. For disk files, the time of last open file attribute is not updated by this open. Must be 0 for other devices.
Guardian Programming Reference Summary for C 522630-001 5- 34

Bit 1

Bit 2

Functions Summary (D-F)

Bit 3

Any file number for backup open. When performing a backup open, specifies that the system can use any file number for the backup open. 0 specifies that the backup open is to have the same file number as the primary open. Error 12 is returned if that file number is already in use. Reserved (specify 0). Open an OSS file by its OSS pathname. Specifies that the file to be opened is identified by the pathname parameter. Reserved (specify 0). No transactions. For $RECEIVE, system messages do not include transaction identifiers. Must be 0 if bit 15 is 1. I18N locale support. For $RECEIVE, data messages include internationalization locale information. Must be 0 if bit 15 is 1. Old format system messages. For $RECEIVE, system messages should be delivered in C-series format. If this bit is 0, D-series format messages are delivered. For other device types, this bit must be 0. No file management system messages. For $RECEIVE, specifies that the caller does not wish to receive process open, process close, CONTROL, SETMODE, SETPARAM, RESETSYNC, and CONTROLBUF messages. If this bit is 0, messages are delivered as normal. For other device types, this bit must be 0.

Bits 4-9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14

Bit 15

FILE_OPEN_CHKPT_
Is called by a primary process to open a designated file for its backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

FILE_PURGE_
Deletes a disk file that is not open. This procedure operates only on Guardian objects.
#include <cextdecs(FILE_PURGE_)> short FILE_PURGE_ ( const char *filename /* i */ ,short length ); /* i */

FILE_RENAME_
Changes the name of an open disk file.
#include <cextdecs(FILE_RENAME_)> short FILE_RENAME_ ( short filenum /* i */ ,const char *newname /* i */ ,short length ); /* i */
Guardian Programming Reference Summary for C 522630-001 5- 35

Functions Summary (D-F)

FILE_RESTOREPOSITION_
The FILE_RESTOREPOSITION_ procedure supersedes the REPOSITION procedure and is used to position a disk file to a saved position (the positioning information having been saved by a call to the FILE_SAVEPOSITION_ procedure).
#include <cextdecs(FILE_RESTOREPOSITION_)> short FILE_RESTOREPOSITION_ ( short filenum /* i */ ,short * savearea /* i */ ,short savesize ); /* i */

FILE_SAVEPOSITION_
The FILE_SAVEPOSITION_ procedure supersedes the SAVEPOSITION procedure and is used to save a disk files current file positioning information in anticipation of a need to return to that position. This procedure can be used with format 2 files.
#include <cextdecs(FILE_SAVEPOSITION_)> short FILE_SAVEPOSITION_ ( short filenum ,short * savearea ,short savemax ,short * savesize ); /* /* /* /* i o i o */ */ */ */

FILE_SETKEY_
The FILE_SETKEY_ procedure supersedes the KEYPOSITION[X] procedures. The FILE_SETKEY_ procedure is used to position by primary or alternate key within a structured file, and sets the current position, access path, and positioning mode for the specified file. FILE_SETKEY_ can be used with format 2 files.
#include <cextdecs(FILE_SETKEY_)> short FILE_SETKEY_ ( , , , , , , short filenum char * key-value short key-len [ short keyspecifier ] [ short positioningmode ] [ short options ] [ short comparelength ] ); /* /* /* /* /* /* /* i i i i i i i */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 5- 36

Functions Summary (D-F)

FILE_SETPOSITION_
The FILE_SETPOSITION_ procedure supersedes the POSITION procedure. This procedure has the same function as the POSITION procedure but the FILE_SETPOSITION_ procedure accepts an 8-byte record specifier, enabling use with format 2 files.
#include <cextdecs(FILE_SETPOSITION_)> short FILE_SETPOSITION_ ( short filenum /* i */ , long long recordspecifier );/* i */

FILE_SETSYNCINFO_
The FILE_SETSYNCINFO_ procedure supersedes the SETSYNCINFO procedure and is used by the backup process of a process pair after a failure of the primary process. The FILE_SETSYNCINFO_ procedure passes a process pairs latest synchronization block (received in a checkpoint message from the primary) to the file system. Unlike the SETSYNCINFO procedure, the FILE_SETSYNCINFO_ procedure can be used with format 2 files.
#include <cextdecs(FILE_SETSYNCINFO_)> short FILE_SETSYNCINFO_ ( short filenum /* i */ , short * infobuf /* i */ , short infosize ); /* i */

FILEERROR
Determines whether an I/O operation that completed with an error should be retried.
#include <cextdecs(FILEERROR)> short FILEERROR ( short filenum ); /* i */ status 0= 1= The operation should not be retried. The operation should be retried.

Guardian Programming Reference Summary for C 522630-001 5- 37

Functions Summary (D-F)

FILEINFO
(superseded by FILE_GETINFO_, FILE_GETINFOBYNAME_, FILE_GETINFOLIST_, and FILE_GETINFOLISTBYNAME_) Obtains error and characteristic information about a file. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FILEINQUIRE
(superseded by FILE_GETINFO_, FILE_GETINFOBYNAME_, FILE_GETINFOLIST_, and FILE_GETINFOLISTBYNAME_) Obtains information about a file. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FILENAME_COMPARE_
Compares two file names to determine if they refer to the same object.
#include <cextdecs(FILENAME_COMPARE_)> short FILENAME_COMPARE_ ( const ,short ,const ,short char *filename1 length1 char *filename2 length2 ); /* /* /* /* i i i i */ */ */ */

return value:
-1 0 >0 = = = The file names do not refer to the same object. The file names refer to the same object. A file-system error prevented evaluation; the returned value is the file-system error number.

Guardian Programming Reference Summary for C 522630-001 5- 38

Functions Summary (D-F)

FILENAME_DECOMPOSE_
Extracts and returns one or more parts of a file name or file-name pattern.
#include <cextdecs(FILENAME_DECOMPOSE_)> short FILENAME_DECOMPOSE_ ( const char *filename ,short length ,char *piece ,short maxlen ,short *piece-length ,short level ,[ short options ] ,[ short subpart ] ); level -1 0 1 2 options Bits 0-12 Bit 13 =1 Reserved (specify 0). Do not return default values; that is, if a requested part is not present in filename but a default exists for it, return a null string instead of the default value. Default values can be returned. Include prefix, that is, the entire portion of filename that precedes the part specified by level. Do not include prefix. Include suffix, that is, the entire portion of filename that follows the part specified by level. Do not include suffix. = = = = Node name Destination name (for example, volume, device or process) First qualifier (for example, subvolume) Second qualifier (file identifier if disk file) /* /* /* /* /* /* /* /* i i o i o i i i */ */ */ */ */ */ */ */

=0 Bit 14 =1 =0 Bit 15 =1 =0 subpart 0 1 2 3 4 = = = = =

Extract all sections occurring before the period (.). Extract processor for an unnamed process. Extract PIN for an unnamed process. Extract sequence number of a process. Extract name (begins with a dollar sign, ends at the first colon or period).

Guardian Programming Reference Summary for C 522630-001 5- 39

Functions Summary (D-F)

FILENAME_EDIT_
Modifies one or more parts of a file name or file-name pattern, changing them to a specified value.
#include <cextdecs(FILENAME_EDIT_)> short FILENAME_EDIT_ ( char *filename ,short maxlen ,short *filename-length ,const char *piece ,short length ,short level ,[ short options ] ,[ short subpart ] ); level -1 0 1 2 options Bits 0-13 Bit 14 Reserved (specify 0). =1 =0 Bit 15 =1 =0 subpart Include prefix, that is, the entire portion of filename that precedes the part specified by level. Do not include prefix. Include suffix, that is, the entire portion of filename that follows the part specified by level. Do not include suffix. = = = = Node name Destination name (for example, volume, device, or process) First qualifier (for example, subvolume) Second qualifier (file identifier if disk file) /* /* /* /* /* /* /* /* i o,i i,o i i i i i */ */ */ */ */ */ */ */

This parameter applies only to process file names.


0 1 = = Replace whole destination, that is, all sections occurring before the period (.). Replace processor, that is, the numeric part designating the processor for an unnamed process.

Guardian Programming Reference Summary for C 522630-001 5- 40

Functions Summary (D-F)

2 3 4

= = =

Replace PIN, that is, the numeric part that gives the process identification number for an unnamed process. Replace sequence number, that is, the numeric part that gives the sequence number of a process. Replace name, that is, the alphanumeric section that begins with a question mark and ends at the first colon or period.

FILENAME_FINDFINISH_
Releases the resources reserved for a search that was previously initiated by a call to FILENAME_FINDSTART_.
#include <cextdecs(FILENAME_FINDFINISH_)> short FILENAME_FINDFINISH_ ( short searchid ); /* i */

FILENAME_FINDNEXT_
Returns the next name in a set of named entities that was defined by a call to FILENAME_FINDSTART_.
#include <cextdecs(FILENAME_FINDNEXT_)> short FILENAME_FINDNEXT_ ( short searchid /* i ,[ char *name ] /* o ,[ short maxlen ] /* i ,[ short *name-length ] /* o ,[ short *entity-info ] /* o ,[ long tag ] ); /* i entity-info [0] [1] [2] Device type Device subtype Object type >0 0 -1 [3] = = = SQL disk file Non-SQL disk file Not a disk file */ */ */ */ */ */

File type:

Guardian Programming Reference Summary for C 522630-001 5- 41

Functions Summary (D-F)

0 1 2 3 -1 [4] >= 0 -1

= = = = = = =

Unstructured disk file Relative disk file Entry-sequenced disk file Key-sequenced disk file Not a disk file Disk file Not a disk file

File code:

FILENAME_FINDSTART_
Sets up a search of named entities.
#include <cextdecs(FILENAME_FINDSTART_)> short FILENAME_FINDSTART_ ( short *searchid ,[ const char *search-pattern ] ,[ short length ] ,[ short resolve-level ] ,[ short device-type ] ,[ short device-subtype ] ,[ short options ] ,[ const char *startname ] ,[ short length ] ); resolve-level -1 0 1 2 = = = = Node name Destination name (for example, device or process) First qualifier (for example, subvolume) Second qualifier (file identifier if disk file) /* /* /* /* /* /* /* /* /* o i i i i i i i i */ */ */ */ */ */ */ */ */

options
Bits 0-8 Bit 9 Bit 10 Bit 11 Bit 12 Reserved (specify 0). The search is to be executed in a nowait manner. The results of the search are returned in system messages sent to $RECEIVE. Device simulation by subtype 30 devices is not to be supported. The search is not to include subprocesses. If an entity is encountered that is offline (that is, the system is not connected or the device is down), an error is to be reported.

Guardian Programming Reference Summary for C 522630-001 5- 42

Functions Summary (D-F)

Bit 13 Bit 14 Bit 15

If device-subtype is supplied, a file name must not match the device subtype value to be returned. If device-type is supplied, a file name must not match the device type value to be returned. If startname is supplied, and if the first name returned would be startname, then that name is to be skipped and the following name should be returned.

FILENAME_MATCH_
Determines whether one or more contiguous sections of a file name match the corresponding sections of a file name pattern.
#include <cextdecs(FILENAME_MATCH_)> short FILENAME_MATCH_ ( const char *filename /* ,short length /* ,const char *pattern /* ,short length /* ,[ short *generic-set ] );/* i i i i o */ */ */ */ */

error
2 1 0 <0 -1 -2 -3 -4 -5 = = = = = = = = = Match; name fits pattern. Partial match; name fits lefthand pattern sections. No match; name does not fit pattern. An error occurred: Missing name parameter. Missing pattern parameter. Length error on name parameter. Length error on pattern parameter. Bounds error on generic-set parameter.

generic-set -1 0 1 = = =; The name falls before the first possible match. The name falls within the set of possible matches. The name falls after the last possible match.

Guardian Programming Reference Summary for C 522630-001 5- 43

Functions Summary (D-F)

FILENAME_RESOLVE_
Converts a partially qualified file name to a fully qualified file name.
#include <cextdecs(FILENAME_RESOLVE_)> short FILENAME_RESOLVE_ ( const char *partialname /* i */ ,short length /* i */ ,char *fullname /* o */ ,short maxlen /* i */ ,short *fullname-length /* o */ ,[ short options ] /* i */ ,[ const char *override-name ]/* i */ ,[ short length ] /* i */ ,[ const char *search ] /* i */ ,[ short length ] /* i */ ,[ const char *defaults ] /* i */ ,[ short length ] ); /* i */

options
Bits 0-7 Bit 8 Reserved (specify 0). If partialname consists of a simple unqualified disk file name, a DEFINE name is generated to use as override-name. The generated name is an equals sign (=) followed by partialname. If search is supplied and a search fails to find an existing file, FILENAME_RESOLVE_ resolves partialname using the first entry in the search DEFINE. If a DEFINE name other than one translated by options. Bit 11 or options. Bit 12 is supplied for partialname, FILENAME_RESOLVE_ returns error 13. If a DEFINE name is supplied for partialname, and if the DEFINE has a file name associated with it, that file name is returned as the result. If a DEFINE name is supplied for partialname, and if the DEFINE contains only a file name (that is, it is a simple MAP DEFINE), then FILENAME_RESOLVE_ returns that file name as the result. If neither this option nor options. Bit 11 is specified, then the DEFINE name is returned as the result. If a logical device number (LDEV) appears as part of partialname, FILENAME_RESOLVE_ translates it to the corresponding symbolic device name. A single name part supplied in partialname is to be treated as a subvolume name or pattern. All alphabetic characters in the resolved file name are to be shifted to upper case.

Bit 9

Bit 10

Bit 11 Bit 12

Bit 13

Bit 14 Bit 15

Guardian Programming Reference Summary for C 522630-001 5- 44

Functions Summary (D-F)

FILENAME_SCAN_
Checks for valid file-name syntax and returns the length in bytes of that part of the input string that constitutes a file name.
#include <cextdecs(FILENAME_SCAN_)> short FILENAME_SCAN_ ( const char *string /* ,short length /* ,[ short *count ] /* ,[ short *kind ] /* ,[ short *entity-level ] /* ,[ short options ] ); /* i i o o o i */ */ */ */ */ */

kind
0 1 = = File name (that is, the name of an entity). File-name pattern. This value can be returned only if options.<15> is set to 1. If the input is a name as well as a file-name pattern (that is, it does not contain an asterisk or question mark), FILENAME_SCAN_ classifies it as a name and not a pattern. DEFINE name.

entity-level -1 0 >0 = = = Node name Name of device or process without qualifiers Name of device or process with entity-level qualifiers

options
Bits 0-13 Bit 14 Bit 15 Reserved (specify 0) Specifies that a subvolume name be accepted as valid input Specifies that a file name pattern be accepted as valid input

FILENAME_TO_OLDFILENAME_
Converts a file name to a C-series internal file name.
#include <cextdecs(FILENAME_TO_OLDFILENAME_)> short FILENAME_TO_OLDFILENAME_ ( const char *filename/* i */ ,short length /* i */ ,short *oldstyle-name ); /* o */

Guardian Programming Reference Summary for C 522630-001 5- 45

Functions Summary (D-F)

FILENAME_TO_PATHNAME_
Converts a Guardian file name or subvolume name to an OSS pathname.
#include <cextdecs(FILENAME_TO_PATHNAME_)> short FILENAME_TO_PATHNAME_ ( const char *filename ,short length ,char *pathname ,short maxlen ,short *pathlen ,short [ options ] ,short [ *index ] ); /* /* /* /* /* /* i i o i o i */ */ */ */ */ */

return value:
0 563 4002 = = = No error. The pathname buffer is too small to contain the resulting name. The filename parameter specifies a Guardian name for an OSS file that either does not exist or has been unlinked but is still open by some process. The corresponding OSS errno value is ENOENT. The fileset that corresponds to the supplied Guardian name for an OSS file is not mounted. The corresponding OSS errno value is ENXIO. The caller does not have search access to one of the directories within all of the resulting pathnames. The corresponding OSS errno value is EACCESS. A parameter has an invalid address. The corresponding OSS errno value is DEFAULT. Either options is specified and options.<14> does not contain all zeros or filename is not a valid file or subvolume name. The corresponding OSS errno value is EINVAL. The root fileset is not mounted. The corresponding OSS errno value is ENOROOT. The resulting pathname is longer than the limit defined in PATH_MAX. (PATH_MAX is a symbolic constant defined in the OSS limitsh header file.) The corresponding OSS errno value is ECWDTOOLONG.

4006 4013

= =

4014 4022

= =

4202 4211

= =

Guardian Programming Reference Summary for C 522630-001 5- 46

Functions Summary (D-F)

FILENAME_TO_PROCESSHANDLE_
Converts a process file name to a process handle.
#include <cextdecs(FILENAME_TO_PROCESSHANDLE_)> short FILENAME_TO_PROCESSHANDLE_ const char *filename ,short length ,short *processhandle ); /* i */ /* i */ /* o */

FILENAME_UNRESOLVE_
Accepts a file name as input, deletes lefthand sections that match the default values, and returns a file name that is semantically equivalent to the input file name.
#include <cextdecs(FILENAME_UNRESOLVE_)> short FILENAME_UNRESOLVE_ ( const char *longname ,short length ,char *shortname ,short maxlen ,short *shortname-length ,[ short level ] ,[ const char *defaults ] ,[ short length ] ); /* /* /* /* /* /* /* /* i i o i o i i i */ */ */ */ */ */ */ */

level
-1 0 1 2 = = = = Node name Destination name (for example, volume, device or process) First qualifier (for example, subvolume) Second qualifier (file identifier if disk file)

FILERECINFO
(superseded by FILE_GETINFO_, FILE_GETINFOBYNAME_, FILE_GETINFOLIST_, and FILE_GETINFOLISTBYNAME_) Obtains the record characteristics of a disk file. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 5- 47

Functions Summary (D-F)

FIXSTRING
Edits a string based on subcommands provided in a template.
#include <cextdecs(FIXSTRING)>

_cc_status FIXSTRING ( char *template


,short template-len ,char *data ,short _near *data-len ,[ short maximum-data-len ] ,[ short _near *modification-status ] );

/* /* /* /* /* /*

i i i,o i,o i o

*/ */ */ */ */ */

_status_lt (<return_value>) _status_eq (<return_value>) _status_gt (<return_value>)

One or more of the required parameters is missing. The operation finished successfully. An insert or replace would have caused the data string to exceed the maximum-datalen.

modification-status 0 1 = = No change was made to data. A replacement, insertion, or deletion was performed on data.

FNAME32COLLAPSE
(obsolete) Converts the 32-character file name used by the Distributed Name Service to external format for display. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FNAME32EXPAND
(superseded by FILENAME_SCAN_ and FILENAME_RESOLVE_) Expands a partial file name from the compacted external form to the 32-character filename used by the Distributed Name Service programmatic interface. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 5- 48

Functions Summary (D-F)

FNAME32TOFNAME
(obsolete) Converts a file name from the 32-character format used by the Distributed Name Service to the Guardian file-name format. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FNAMECOLLAPSE
(superseded by OLDFILENAME_TO_FILENAME_) Converts a file name from internal to external form. The system number of a network file name is converted to the corresponding system name. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FNAMECOMPARE
(superseded by FILENAME_COMPARE_) Compares two file names within a local or network environment to determine whether these file names refer to the same file or device. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FNAMEEXPAND
(superseded by FILENAME_SCAN_ and FILENAME_RESOLVE_) Expands a partial file name from the compacted external form to the standard 12-word internal form. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

FNAMETOFNAME32
(obsolete) Converts a file name from the 12-word Guardian format to the 32-character Distributed Name Service format. This procedure does not have C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 5- 49

Functions Summary (D-F)

FORMATCONVERT[X]
Converts the external format to the internal form required for presentation to the FORMATDATA[X] procedures.
#include <cextdecs(FORMATCONVERT)> short FORMATCONVERT ( char *iformat ,short iformatlen ,char *eformat ,short eformatlen ,short *scales ,short *scale-count ,short conversion ); #include <cextdecs(FORMATCONVERTX)> short FORMATCONVERTX ( char *iformat ,short iformatlen ,const char *eformat ,short eformatlen ,short _near *scales ,short _near *scale-count ,short conversion ); /* /* /* /* /* /* /* o i i i o i,o i */ */ */ */ */ */ */ /* /* /* /* /* /* /* o i i i o i,o i */ */ */ */ */ */ */

status
>0 =0 <0 = = = Successful conversion. The value is the number of bytes in the converted format (iformat). iformatlen was insufficient to hold the entire converted format. Error in the format. The value is the negated byte location in the input string at which the error was detected. The first byte of eformat is numbered 1.

conversion
0 1 2 = = = Check the validity of the format only. Produce an expanded form that has modifiers and decorations. Produce a compact conversion, but ignore modifiers and decorations.

Guardian Programming Reference Summary for C 522630-001 5- 50

Functions Summary (D-F)

FORMATDATA[X]
Converts data-item values between internal and external representations.
#include <cextdecs(FORMATDATA)> short FORMATDATA ( char _near *buffer ,short bufferlen ,short buffer-occurs ,short _near *length ,short _near *iformat ,short _near *variable-list ,short variable-list-len ,short flags ); #include <cextdecs(FORMATDATAX)> short FORMATDATAX ( char *buffer ,short bufferlen ,short buffer-occurs ,short *length ,short *iformat ,short *variable-list ,short variable-list-len ,short flags ); /* /* /* /* /* /* /* /* i,o i i o i i i i */ */ */ */ */ */ */ */ /* /* /* /* /* /* /* /* i,o i i o i i i i */ */ */ */ */ */ */ */

return value:
0 267 268 271 272 273 274 = = = = = = = Successful operation Buffer overflow No buffer EDIT item mismatch Illegal input character Bad format Numeric overflow

flags
Bit 2 = List-directed 0= 1= Bit 3 = 0= 1= Bit 4 = Apply the format-directed operation. Apply the list-directed operation. The iformat array address is G-relative. The iformat array address is P-relative.

P-Relative (iformat array)

Null value passed

Guardian Programming Reference Summary for C 522630-001 5- 51

Functions Summary (D-F)

0= 1= Bit 15 = Input 0= 1=

Each variable-list item is a 4-word group (FORMATDATA) or a 5-word group (FORMATDATAX). Each variable-list item is a 5-word group (FORMATDATA) or a 7-word group (FORMATDATAX). FORMATDATA[X] performs output operations. FORMATDATA[X] performs input operations.

Guardian Programming Reference Summary for C 522630-001 5- 52

Functions Summary (G-N)

This section lists functions in alphabetic order and briefly describes the syntax of each. For additional information about the functions, refer to the Guardian Procedure Calls Reference Manual.

GETPCPBINFO
Provides a process with information from its own (the current) process control block (PCB).
#include <cextdecs(GETCPCBINFO)> void GETCPCBINFO ( short ,short ,short ,short ,short request-id _near *cpcb-info in-length _near *out-length _near *error ); /* /* /* /* /* i o i o o */ */ */ */ */

request-id
0 1 2 3 4 5 6 7 16 = Remote creator flag; returns 1 in cpcb-info if creator was remote. = Logged-on process state; returns 1 in cpcb-info if the process has logged on. = Safeguard-authenticated logon flag; returns 1 in cpcb-info if the process was started after you successfully logged on to a terminal owned by Safeguard. = Safeguard-authenticated logoff state; returns 1 in cpcb-info if the Safeguardauthenticated logon flag is set but the process has logged off. = Inherited-logon flag; returns 1 in cpcb-info if the logon was inherited by the process. = Stop-on-logoff flag; returns 1 in cpcb-info if the process is to be stopped when it requests to be placed in the logged-off state. = Propagate-logon flag; returns 1 in cpcb-info if the processs local descendants are to be created with the inherited-logon flag set. = Propagate-stop-on-logoff flag; returns 1 in cpcb-info if the processs local descendants are to be created with the stop-on-logoff flag set. = Logon flags and states; returns current settings of all the logon flags and state indicators in cpcb-info.

Guardian Programming Reference Summary for C 522630-001 6 -1

Functions Summary (G-N)

GETCRTPID
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the four-word process ID associated with a process CRTPID contains the process name or creation timestamp in words[0:2] and cpu,pin in word[3]. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GETDEVNAME
(superseded by DEVICE_GETINFOBYLDEV_ or FILENAME_FINDNEXT_) Obtains the name associated with a logical device number. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GETINCREMENTEDIT
Returns the record number increment value for an IOEdit file. GETINCREMENTEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(GETINCREMENTEDIT)> long GETINCREMENTEDIT ( short filenum ); /* i */

GETPOOL
(superseded by POOL_CHECK_, POOL_DEFINE_, POOL_GETINFO_, POOL_GETSPACE_, POOL_PUTSPACE_, and POOL_RESIZE_) Obtains a block of memory from a buffer pool. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GETPOSITIONEDIT
Returns the record number of the line in the specified file most recently read or written. GETPOSITIONEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(GETPOSITIONEDIT)> long GETPOSITIONEDIT ( short filenum ); /* i */

Guardian Programming Reference Summary for C 522630-001 6 -2

Functions Summary (G-N)

GETPPDENTRY
(superseded by PROCESS_GETPAIRINFO_) Obtains a description of a named process pair by the process pairs index into the destination control table (DCT). This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GETREMOTECRTPID
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the 4-word process ID associated with a remote process. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GETSYNCINFO
(superseded by FILE_GETSYNCINFO_) Returns a disk files synchronization block so it can be sent to the backup process in a checkpoint message.
#include <cextdecs(GETSYNCINFO)>

_cc_status GETSYNCINFO
( short filenum /* i */ ,[ short _near *sync-block ] /* o */ ,[ short _near *sync-block-size ] ); /* o */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). GETSYNCINFO was successful. The file is not a disk file.

GETSYSTEMNAME
(superseded by NODENUMBER_TO_NODENAME_) Supplies the system name associated with a system number. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

GIVE^BREAK
Returns BREAK to the process that owned BREAK before the last call to TAKE^BREAK. GIVE^BREAK is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
Guardian Programming Reference Summary for C 522630-001 6 -3

Functions Summary (G-N)

#include <cextdecs(GIVE_BREAK)> short GIVE_BREAK ( short { _near *common-fcb } /* i */ { _near *file-fcb } );/* i */

GROUP_GETINFO_
Returns attributes of the specified group.
#include <cextdecs(GROUP_GETINFO_)> short GROUP_GETINFO_ ( [ ,[ ,[ ,[ ,[ ,[ ,[ ,[ char *group-name ] short group-maxlen ] short *group-curlen ] long *groupid ] short *is-auto-delete ] char *descrip ] short descrip-maxlen ] short *descriplen ] ); /* /* /* /* /* /* /* /* i o,i i,o i,o o o i o */ */ */ */ */ */ */ */

returned value:
0 11 22 = = = No error. Record not in use. The specified group name or group ID is undefined. Parameter out of bounds. An input parameter is not within the valid range, or return information does not fit into the length of the space provided, or an output parameter overlays the stack marker that was created by calling this procedure. This procedure was called without specifying a required parameter. Bad parameter value. Either the value specified in group-curlen is greater than the value specified in group-maxlen, the value specified in group-curlen is not within the valid range, or the value specified in groupid is not within the valid range.

29 590

= =

is-auto-delete -1 0 = = The group is deleted when it becomes empty. The group is not deleted when it becomes empty.

GROUP_GETNEXT_
Returns a group name and group ID. On successive calls, all group names and group IDs can be obtained.

Guardian Programming Reference Summary for C 522630-001 6 -4

Functions Summary (G-N)

#include <cextdecs(GROUP_GETNEXT_)> short GROUP_GETNEXT_ ( [ ,[ ,[ ,[ char *group-name ] short group-maxlen ] short *group-curlen ] long *groupid ] ); /* /* /* /* i o,i i,o o */ */ */ */

GROUPIDTOGROUPNAME
(superseded by USER_GETINFO_) Returns the group name associated with an existing group ID from the USERID file.
#include <cextdecs(GROUPIDTOGROUPNAME)>

_cc_status GROUPIDTOGROUPNAME
( short _near *id-name ); /* i,o */

_status_lt (<returned_value>)

Required parameter is missing, a buffer is out of bounds, or an I/O error occurred when accessing the $SYSTEM.SYSTEM.USERID file. The designated group name is returned. The specified group ID is undefined.

_status_eq (<returned_value>) _status_gt (<returned_value>)

GROUPMEMBER_GETNEXT_
Returns a user name or alias associated with a group ID. On successive calls, all user names and aliases associated with a given group ID can be obtained.
#include <cextdecs(GROUPMEMBER_GETNEXT_)> short GROUPMEMBER_GETNEXT_ ( long groupid /* ,char *member-name /* ,short member-maxlen /* ,short *member-curlen );/* i i o,i i,o */ */ */ */

Guardian Programming Reference Summary for C 522630-001 6 -5

Functions Summary (G-N)

returned value:
0 11 22 = = = No error. Record not in file. The specified group has no more members or is undefined. Parameter out of bounds. An input parameter is not within the valid range, or return information does not fit into the length of the space provided, or an output parameter overlays the stack marker that was created by calling this procedure. This procedure was called without specifying all parameters. Bad parameter value. Either the value specified in member-curlen is greater than the value specified in member-maxlen, the value specified in member-curlen is not within the valid range, or the value specified in groupid is not within the valid range.

29 590

= =

GROUPNAMETOGROUPID
(superseded by USER_GETINFO_) Returns the group ID associated with an existing group name from the USERID file.
#include <cextdecs(GROUPNAMETOGROUPID)>

_cc_status GROUPNAMETOGROUPID
( short _near *name-id ); /* i,o */

_status_lt (<returned_value>)

The value of name-id is out of bounds, or an I/O error occurred when the procedure accessed $SYSTEM.SYSTEM.USERID. The designated group ID is returned. The specified group name is undefined.

_status_eq (<returned_value>) _status_gt (<returned_value>)

HALTPOLL
stops continuous polling.
#include <cextdecs(HALTPOLL)>

_cc_status HALTPOLL ( short filenum ); /* i */


An error occurred (call FILEINFO). The HALTPOLL procedure executed successfully.

_status_lt (<returned_value>) _status_eq (<returned_value>)

Guardian Programming Reference Summary for C 522630-001 6 -6

Functions Summary (G-N)

HEADROOM_ENSURE_
Allows you to check that the current stack has enough room for the needs of your process. This procedure can help you, for example, when specifying parameters for the PROCESS_LAUNCH_ procedure.
Note. This procedure can be called only from a TNS/R native process. Its pTAL syntax is declared only in the EXTDECS0 file.

#include <cextdecs(HEADROOM_ENSURE_)>

long HEADROOM_ENSURE_ ( long room ); /* i */ return value:


0D 5D 6D 7D 36D 43D 45D = = = = = = = Either the requested space already exists in the stack space or the stack space was successfully enlarged to make enough room for the request. The request would have exceeded the maximum stack size. The stack pointer is invalid. The stack pointer does not address a main stack or a privileged stack. The system was unable to allocate memory. The system was unable to obtain swap space. The Kernel Managed Swap Facility (KMSF) was unable to obtain swap space.

HEAPSORT
sorts an array of equal-sized elements in place.
#include <cextdecs(HEAPSORT)> short HEAPSORT ( short ,short ,short ,short _near *array /* num-elements /* size-of-element /* (*)()compare-function );/* i,o i i i */ */ */ */

Guardian Programming Reference Summary for C 522630-001 6 -7

Functions Summary (G-N)

HEAPSORTX_
Sorts an array of equal-sized elements in place.
#include <cextdecs(HEAPSORTX_)> short HEAPSORTX_ ( short *array /* ,long num-elements /* ,short size-of-element /* ,short (*)()compare-function );/* i,o i i i */ */ */ */

return value:
0 29 590 632 = = = = Array has been successfully sorted. Required parameter is missing. Invalid parameter supplied. Insufficient stack space for temporary variable.

HIST_FORMAT_
Produces an ASCII text representation of the process state whose context is established by a previous call to the HIST_INIT_ procedure or HIST_GETPRIOR_ procedure. See the HIST_INIT_ procedure for an overview of how HIST_INIT_, HIST_FORMAT_, and HIST_GETPRIOR_ can be used together to perform stack tracing.
#include <histry.h> short HIST_FORMAT_ ( NSK_histWorkspace *workspace /* i,o */ ,char *text /* o */ ,const uint16 limit ); /* i */

return value:
-2 = HIST_BAD_WIDTH The value of the limit parameter is less than the minimum width for output defined by the Hist_MinWidth literal in the HHISTRY header file. HIST_BAD_WORKSPACE The workspace structure has an invalid version identifier. This error can occur if HIST_FORMAT_ is called without first calling the HIST_INIT_ procedure or if the workspace structure has become corrupted. HIST_BAD_FORMAT_CALL Nothing to format. This error can occur if you call HIST_FORMAT_ again after a previous call returned zero, indicating no more text for the current context.
Guardian Programming Reference Summary for C 522630-001 6 -8

-9

-10

Functions Summary (G-N)

HIST_GETPRIOR_
Establishes a previous procedure call as the process context for display by the next HIST_FORMAT_ procedure call. See the HIST_INIT_ procedure for an overview of how HIST_INIT_, HIST_FORMAT_, and HIST_GETPRIOR_ can be used together to perform stack tracing.
#include <histry.h>

short HIST_GETPRIOR_ ( NSK_histWorkspace *workspace ); /* i,o */ return value:


0 -8 -9 = = = HIST_OK The procedure executed successfully. HIST_ERROR The stack tracing mechanism failed. HIST_BAD_WORKSPACE The workspace structure has an invalid version identifier. This error can occur if HIST_GETPRIOR_ is called without first calling the HIST_INIT_ procedure or if the workspace structure has become corrupted.

HIST_INIT_
Initializes a process history display or stack trace. It validates a parameter and establishes the context to display and from which to begin tracing.
#include <histry.h> short HIST_INIT_ ( NSK_histWorkspace *workspace ,const uint32 version ,const uint16 options ,const void *context ); /* /* /* /* i,o i i i */ */ */ */

return value:
0 -3 -4 = = = HIST_OK The procedure terminated normally. HIST_BAD_VERSION An invalid value was specified for the version parameter. HIST_BAD_OPTION An invalid value was specified for the options parameter. An undefined bit was set.
Guardian Programming Reference Summary for C 522630-001 6 -9

Functions Summary (G-N)

-5

HIST_BAD_CONTEXT A null value was specified for the context parameter. The context parameter must contain an address. HIST_NOT_IMPLEMENTED A specified options bit is defined but not implemented. HIST_INIT_ERROR An error occurred during an attempt to initialize the stack trace. HIST_ERROR The stack tracing mechanism failed while attempting to trace back to the calling procedure. HIST_MISSING_HOOK This error is not returned in the D40 release.

-6 -7 -8

= = =

-11

options
Bits 13-15 =0 HO_Init_Here Starts a trace of the current stack with the context of this call to HIST_INIT_. The context parameter is ignored in this case. HO_Init_uContext Uses the uContext structure whose address is passed in the context parameter. A uContext structure is a structure of type UCONTEXT_T that is passed to a signal handler installed by the SIGACTION_INIT_ or SIGACTION_SUPPLANT_ procedure. HIST_INIT_ initializes the trace at the point where the signal was generated. See Protected contexts under Considerations for more information.

=1

Guardian Programming Reference Summary for C 522630-001 6- 10

Functions Summary (G-N)

=2

HO_Init_JmpBuf Uses the context saved in a TNS/R native jump buffer to start tracing at the point of a call to the SETJMP_ or SIGSETJMP_ procedure that filled the jump buffer. The address of the buffer is passed to HIST_INIT_ in the context parameter. HO_Init_31Regs Is reserved for Tandem use. HO_Init_Address Uses a 32-bit TNS/R native address for the context. This address is passed to the HIST_INIT_ procedure in the context parameter. A subsequent call to HIST_FORMAT_ returns context for that location. The address must point to a code location, but that location can contain TNS instructions or RISC instructions. To find out what is at a TNS address, you must first convert the TNS address into a RISC address. See the NonStop Himalaya K10000/K20000 Server Description Manual for details on address translation.

= 3 =4

The displayed context is affected when any of the following bits are set to 1:
Bit 11 HO_NoSuppress Enables the display of transition frames, including the shells by which TNS code calls TNS/R native procedures, the system procedure that calls a signal handler, and some transitions within low-level system software. By default, transition frames are not displayed. HO_ShowProtected Enables the display of protected context when a signal is generated within protected code. If a signal is generated within protected code, such as in a procedure running privileged, the context at that site is preserved in the uContext structure passed to the signal handler, but it is not displayed unless this option is set. HO_OneLine Modifies some formatting options to optimize the display of information in a single output line. It does not, however, ensure that all the information fits in one line.

Bit 10

Bit 7

INCREMENTEDIT
Sets the increment to be added to successive line numbers for lines that will be added to an EDIT file without explicitly specified line numbers. INCREMENTEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.

Guardian Programming Reference Summary for C 522630-001 6- 11

Functions Summary (G-N)

#include <cextdecs(INCREMENTEDIT)> short INCREMENTEDIT ( short filenum /* i */ ,[ long increment ] );/* i */

INITIALIZEEDIT
Allocates the EDIT file segment (EFS) to be used by IOEdit and initializes the data structures that it contains.
#include <cextdecs(INITIALIZEEDIT)> short INITIALIZEEDIT ( ,[ ,[ ,[ nowait-option 0 1 2 = = = Dont use double buffering on any file. Use double buffering on all files that the user opens for nowait I/O before calling OPENEDIT_ (or OPENEDIT). Use double buffering on all files opened for nowait I/O, whether by the user or by OPENEDIT_ (or OPENEDIT). [ short *swapvol ] short maxfiles ] short errorabend ] short nowait-option ] ); /* /* /* /* i i i i */ */ */ */

INITIALIZER
Reads the startup message and, optionally, requests receipt of assign and param messages sent by the Guardian command interpreter. Considerations for C Programmers Do not call INITIALIZER from a Guardian or OSS C program. You can instead obtain the startup information from the C run-time library. Refer to the C/C++ Programmers Guide for information on how to obtain the startup information from a Guardian C program.

INTERPRETINTERVAL
Converts a value representing a number of microseconds into days, hours, minutes, seconds, milliseconds, and microseconds.

Guardian Programming Reference Summary for C 522630-001 6- 12

Functions Summary (G-N)

#include <cextdecs(INTERPRETINTERVAL)> long INTERPRETINTERVAL ( long ,[ short ,[ short ,[ short ,[ short ,[ short long time _near *hours ] _near *minutes ] _near *seconds ] _near *milsecs ] _near *microsecs ] ); /* /* /* /* /* /* i o o o o o */ */ */ */ */ */

INTERPRETJULIANDAYNO
Converts a Julian day number to the Gregorian year, month, and day.
#include <cextdecs(INTERPRETJULIANDAYNO)> void INTERPRETJULIANDAYNO ( long julian-day-num ,short _near *year ,short _near *month ,short _near *day ); /* /* /* /* i o o o */ */ */ */

INTERPRETTIMESTAMP
Converts a 64-bit Julian timestamp into a Gregorian (the common civil calendar) date and time of day.
#include <cextdecs(INTERPRETTIMESTAMP)> long INTERPRETTIMESTAMP( long long julian-timestamp /* i */ ,short _near *date-and-time ); /* o */ date-n-time [0] [1] [2] [3] [4] [5] [6] [7] = = = = = = = = The Gregorian year The Gregorian month The Gregorian day of month The hour of the day The minute of the hour The second of the minute The millisecond of the second The microsecond of the millisecond (yyyy). (1-12). (1-31). (0-23). (0-59). (0-59). (0-999). (0-999).

Guardian Programming Reference Summary for C 522630-001 6- 13

Functions Summary (G-N)

JULIANTIMESTAMP
Returns a four-word, microsecond resolution, Julian-date-based timestamp.
#include <cextdecs(JULIANTIMESTAMP)> long long JULIANTIMESTAMP ( [ ,[ ,[ ,[ short short short short type ] _near *tuid ] _near *error ] node ] ); /* /* /* /* i o o i */ */ */ */

type
0 1 2 3 = = = = Current GMT System-load GMT SYSGEN GMT Microseconds since system coldload

KEYPOSITION[X]
(superseded by FILE_SETKEY_) Positions by primary or alternate key within a structured file.
#include <cextdecs(KEYPOSITION)>

_cc_status KEYPOSITION ( short filenum


,char *key-value ,[ short key-specifier ] ,[ short length-word ] ,[ short positioning-mode ] ); #include <cextdecs(KEYPOSITIONX)>

/* /* /* /* /*

i i i i i

*/ */ */ */ */

_cc_status KEYPOSITIONX ( short filenum

/* ,const char *key-value /* ,[ short key-specifier ] /* ,[ short length-word ] /* ,[ short positioning-mode ] );/*

i i i i i

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

Indicates that an error occurred (call FILE_GETINFO_ or FILEINFO). Indicates that the KEYPOSITION was successful. Indicates that this is not a structured disk file.

Guardian Programming Reference Summary for C 522630-001 6- 14

Functions Summary (G-N)

LABELEDTAPESUPPORT
Provides a way for nonprivileged programs to determine whether tape-label processing is enabled on the system.
#include <cextdecs(LABELEDTAPESUPPORT)> short LABELEDTAPESUPPORT ( [ short sysnum ] ); /* i */

return value:
1 0 <0 = = = Tape-label processing is enabled. Tape-label processing is not enabled. File-system error expressed as a negative value.

LASTADDR
(superseded by ADDRESS_DELIMIT_) Returns the 'G'[0] relative address of the last word in the application processs data area.
#include <cextdecs(LASTADDR)> short LASTADDR ();

LASTADDRX
(superseded by ADDRESS_DELIMIT_) Returns the last extended address available in the specified relative segment.
#include <cextdecs(LASTADDRX)> long LASTADDRX ( [ short seg ] ); /* i */ seg 0 1 2 3 4-1023 = = = = = User data. If privileged, it is system data; if not, it is user data. Current code. User code. Selectable extended data segment.

Guardian Programming Reference Summary for C 522630-001 6- 15

Functions Summary (G-N)

LASTRECEIVE
(superseded by FILE_GETRECEIVEINFO_) Obtains the four-word process ID and the message tag associated with the last message read from the $RECEIVE file. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

LOCATESYSTEM
(superseded by NODENAME_TO_NODENUMBER_) Provides the system number corresponding to a system name and returns the logical device number of the line handler controlling the path to a given system. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

LOCKFILE
Excludes other processes from accessing a file (and any records within that file). This procedure operates only on Guardian objects.
#include <cextdecs(LOCKFILE)>

_cc_status LOCKFILE ( short filenum

/* i */ ,[ long tag ] );/* o */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). LOCKFILE was successful. The file is not a disk file.

LOCKINFO
(superseded by FILE_GETLOCKINFO_) Provides information about locks (held or pending) on a DP2 disk volume. This procedure operates only on Guardian objects. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

LOCKREC
Excludes other processes from accessing a record at the current position. This procedure operates only on Guardian objects.

Guardian Programming Reference Summary for C 522630-001 6- 16

Functions Summary (G-N)

#include <cextdecs(LOCKREC)>

_cc_status LOCKREC ( short filenum

/* i */ ,[ long tag ] );/* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). LOCKREC was successful. The file is not a disk file.

LONGJMP_
Performs a nonlocal goto. It restores the state of the calling process with context saved in a jump buffer by the SETJMP_ procedure. Control returns to the location of the corresponding SETJMP_ procedure call.
#include <setjmp.h> jmp_buf env; void longjmp ( jmp_buf env /* i */ ,int value ) /* i */

LOOKUPPROCESSNAME
(superseded by PROCESS_GETPAIRINFO_) Obtains a description of a named process pair by its name or by its index into the local directory control table. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

MBCS_ANY_KATAKANA_
Checks a string of Tandem Kanji characters for any Katakana characters.
#include <cextdecs(MBCS_ANY_KATAKANA_)> short MBCS_ANY_KATAKANA_ ( char *buffer /* i */ ,short length /* i */ ,[ short charset ] ); /* i */

Guardian Programming Reference Summary for C 522630-001 6- 17

Functions Summary (G-N)

result
0 1 = = Indicates that the buffer string does not contain any Katakana characters or that charset did not specify the Tandem Kanji multibyte character set. Indicates that the Tandem Kanji buffer string contains at least one Katakana character.

MBCS_CHAR_
Indicates whether a string of bytes is part of a Tandem multibyte character set (MBCS).
#include <cextdecs(MBCS_CHAR_)> short MBCS_CHAR_ ( char *testmbcschar /* i */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* i,o */

result
0 = Indicates that charset is not a supported MBCS or that charset is a supported MBCS and testmbcschar does not point to the first byte of a valid character of one of the MBCS character sets listed under charset. Indicates that the character set is a supported MBCS and that testmbcschar points to the first byte of a valid character of charset MBCS. For 2-byte character sets, the returned value is the integer value of the 16 bits that form the multibyte character.

nonzero

charset when result is nonzero:


1 9 10 11 12 = = = = = Tandem Kanji Tandem Hangul Tandem Chinese Big 5 Tandem Chinese PC Tandem KSC5601

MBCS_CHARSIZE_
Returns the display size (in columns) and the storage size (in bytes) of multibyte character set (MBCS) characters from the character set specified by the charset parameter.

Guardian Programming Reference Summary for C 522630-001 6- 18

Functions Summary (G-N)

#include <cextdecs(MBCS_CHARSIZE_)> short MBCS_CHARSIZE_ ( [ short charset ] ); /* i */

result
0 nonzero Indicates that either no MBCS is configured or that the specified MBCS is not supported. Indicates that the result parameter contains the following information: Bits 0-7 Bits 8-15 charset 1 9 10 11 12 = = = = = Tandem Kanji Tandem Hangul Tandem Chinese Big 5 Tandem Chinese PC Tandem KSC5601 Contains the display size (in columns) of the multibyte character identified by the test. Contains the internal size (in bytes) of the multibyte character identified by the test.

MBCS_CHARSTRING_
Tests the contents of a data string for the exclusive use of MBCS characters of known internal character sets.
#include <cextdecs(MBCS_CHARSTRING_)> short MBCS_CHARSTRING_ ( char *testmbcschar /* ,short bytecount /* ,short *index /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i o i o */ */ */ */ */

result
0 = Indicates that the charset parameter contains an unknown MBCS identifier or contains a known MBCS identifier but the test of testmbcsstring for valid characters failed. Indicates that all MBCS characters in the testmbcsstring are valid characters (or blanks) of the specified MBCS.

Guardian Programming Reference Summary for C 522630-001 6- 19

Functions Summary (G-N)

MBCS_CODESETS_SUPPORTED_
Returns a 32-bit integer value. Each bit of the returned value indicates the presence of a particular multibyte character set (MBCS).
#include <cextdecs(MBCS_CODESETS_SUPPORTED_)> long MBCS_CODESETS_SUPPORTED_ ();

result
Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8 Bit 9 Bit 10 Bit 11 Bit 12 = = = = = = = = = = = = Tandem Kanji IBM Kanji IBM Kanji Mixed JEF (Fujitsu) Kanji JEF (Fujitsu) Kanji Mixed reserved JIS Kanji Reserved Tandem Hangul Chinese Big 5 Chinese PC (5550C) Tandem KSC5601 (with KIPS extensions)

MBCS_DEFAULTCHARSET_
Returns the default multibyte character set (MBCS) identification.
#include <cextdecs(MBCS_DEFAULTCHARSET_)> long MBCS_DEFAULTCHARSET_ ();

result
0 1 9 10 11 12 = = = = = = No MBCS configured Tandem Kanji Tandem Hangul Tandem Chinese Big 5 Tandem Chinese PC Tandem KSC5601
Guardian Programming Reference Summary for C 522630-001 6- 20

Functions Summary (G-N)

MBCS_EXTERNAL_TO_TANDEM_
Translates a text string from a specified external format to the Tandem internal text format.
#include <cextdecs(MBCS_EXTERNAL_TO_TANDEM_)> short MBCS_EXTERNAL_TO_TANDEM_ ( [ long *source-string ] /* ,[ long *destination-string ] /* ,short source-length /* ,short *maximum-length /* ,[ short intermediate ] /* ,short external-form /* ,[ short *finished-length ] /* ,[ char *shift-to-MBCS ] /* ,[ char *shift-to-one-byte ] );/* i,o i,o i i,o i i o i i */ */ */ */ */ */ */ */ */

return value:
0 -1 -2 -3 -4 -5 -6 29 = = = = = = = = Successful completion of the translation Translation truncated due to lack of destination buffer space Unknown translation requested Invalid source string length Invalid character in Kanji-only source string Control string parameter too long Translation truncated due to lack of space in screen field Required parameter missing

external-form 0 1 2 3 4 5 6 7 8 = = = = = = = = = IBM Kanji only (without subfield strings) IBM Kanji EBCDIC IBM Kanji/Katakana-EBCDIC JEF (Fujitsu) Kanji only JEF (Fujitsu) Kanji EBCDIC JEF (Fujitsu) Kanji/Katakana-EBCDIC NEC Kanji only (not implemented) NEC Kanji/JIS X0201 (not implemented) JIS X0208 Kanji/JIS X0201 (was C6226/C6220)

Guardian Programming Reference Summary for C 522630-001 6- 21

Functions Summary (G-N)

MBCS_FORMAT_CRT_FIELD
Formats Kanji-only or mixed data types for specific terminal types.
#include <cextdecs(MBCS_FORMAT_CRT_FIELD_)> short MBCS_FORMAT_CRT_FIELD_ ( long *source-string ,long *destination-string ,short source-length ,short maximum-length ,short intermediate ,short terminal-type ,short last-column ,short *max-data-size ,short *screen-start-col ,[ char *shift-to-MBCS ] ,[ char *shift-to-one-byte ] ,[ short startmode ] ); /* /* /* /* /* /* /* /* /* /* /* /* i,o i,o i i i i i i,o i,o i i i */ */ */ */ */ */ */ */ */ */ */ */

return value:
0 -1 -2 -3 -4 -5 -6 29 = = = = = = = = Successful completion of the translation Source string translation incomplete, ran out of destination buffer area or ran out of space in the screen field Unknown terminal type specified Invalid source-string length Invalid character in Kanji-only source string Control string parameter too long Source string translation incomplete, ran out of room in screen field Parameter missing

terminal-type 4 5 = = Fujitsu F-6650 with lowercase alphabet Fujitsu F-6650 with one-byte Katakana

Guardian Programming Reference Summary for C 522630-001 6- 22

Functions Summary (G-N)

MBCS_FORMAT_ITI_BUFFER_
Formats ITI buffers for specific terminal types.
#include <cextdecs(MBCS_FORMAT_ITI_BUFFER_)> short MBCS_FORMAT_ITI_BUFFER_ ( long *source-string ,long *destination-string ,short source-length ,short maximum-length ,short intermediate ,short terminal-type ,short maximum-col-count ,short *finished-length ,short *screen-col-count ,[ char *shift-to-MBCS ] ,[ char *shift-to-one-byte ] ,[ short startmode ] ); return value: 0 -1 -2 -3 -4 -5 29 = = = = = = = Successful completion of the translation Source string translation incomplete, ran out of destination buffer area Unknown terminal type specified Invalid source-string length Invalid character in Kanji-only source string Control string parameter too long Parameter missing /* /* /* /* /* /* /* /* /* /* /* /* i,o i,o i i i i i o o i i i */ */ */ */ */ */ */ */ */ */ */ */

terminal-type 0 1 2 4 5 = = = = = IBM 3274-series IBM Emulation on IBM5550 with one-byte Katakana IBM Emulation on IBM5550 with lowercase alphabet Fujitsu F-6650 with lowercase alphabet Fujitsu F-6650 with one-byte Katakana

Guardian Programming Reference Summary for C 522630-001 6- 23

Functions Summary (G-N)

MBCS_MB_TO_SB_
Converts multibyte characters to the corresponding 1-byte ASCII characters.
#include <cextdecs(MBCS_MB_TO_SB_)> void MBCS_MB_TO_SB_ ( char *mbytestring /* ,short mbytecount /* ,char *sbytestring /* ,short sbytecount /* ,short *rbytecount /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i o i o i o */ */ */ */ */ */ */

charset
1 9 10 11 12 = = = = = Tandem Kanji Tandem Hangul Tandem Chinese Big 5 Tandem Chinese PC Tandem KSC5601

MBCS_REPLACEBLANK_
Replaces nonstandard blanks.
#include <cextdecs(MBCS_REPLACEBLANK_)> void MBCS_REPLACEBLANK_ ( char *bytestring /* ,short bytecount /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i i i,o */ */ */ */

MBCS_SB_TO_MB_
Converts 1-byte ASCII characters to the corresponding multibyte characters.
#include <cextdecs(MBCS_SB_TO_MB_)> void MBCS_SB_TO_MB_ ( char *sbytestring /* ,short sbytecount /* ,char *mbytestring /* ,short mbytecount /* ,short *rbytecount /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i o i o i o */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 6- 24

Functions Summary (G-N)

charset 1 9 10 11 12 = = = = = Tandem Kanji Tandem Hangul Tandem Chinese Big 5 Tandem Chinese PC Tandem KSC5601

MBCS_SHIFTSTRING_
Upshifts or downshifts all alphabetic characters in a multibyte character set (MBCS) string.
#include <cextdecs(MBCS_SHIFTSTRING_)> void MBCS_SHIFTSTRING_ ( char *bytestring /* ,short bytecount /* ,short casebit /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i i i o */ */ */ */ */

MBCS_TANDEM_TO_EXTERNAL_
Translates a text string from Tandem internal format to a specified external text format.
#include <cextdecs(MBCS_TANDEM_TO_EXTERNAL_)> short MBCS_TANDEM_TO_EXTERNAL_ ( [ long *source-string ] /* ,[ long *destination-string ] /* ,short source-length /* ,short *maximum-length /* ,[ short intermediate ] /* ,short external-form /* ,[ short *finished-length ] /* ,[ char *shift-to-MBCS ] /* ,[ char *shift-to-one-byte ] );/* i,o i,o i i,o i i o i i */ */ */ */ */ */ */ */ */

return value:
0 -1 -2 -3 = = = = Successful completion of the translation Translation truncated due to lack of destination buffer space Unknown translation requested Invalid source-string length
Guardian Programming Reference Summary for C 522630-001 6- 25

Functions Summary (G-N)

-4 -5 -6 29

= = = =

Invalid character in Kanji-only source string Control string parameter too long Translation truncated due to lack of space in screen field Required parameter missing

external-form 0 1 2 3 4 5 6 7 8 = = = = = = = = = IBM Kanji only (without subfield strings) IBM Kanji EBCDIC IBM Kanji/Katakana-EBCDIC JEF (Fujitsu) Kanji only JEF (Fujitsu) Kanji EBCDIC JEF (Fujitsu) Kanji/Katakana-EBCDIC NEC Kanji only (not implemented) NEC Kanji/JIS X0201 (not implemented) JIS X0208 Kanji/JIS X0201 (was C6226/C6220)

MBCS_TESTBYTE_
Returns the identification of a specified byte contained within a text string of mixed data.
#include <cextdecs(MBCS_TESTBYTE_)> short MBCS_TESTBYTE_ ( char *buffer /* ,short bytecount /* ,short *testindex /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i i,o i o */ */ */ */ */

result
0 1 2 3 = = = = 1-byte character First byte of a multibyte character Intermediate byte of a multibyte character Last byte of a multibyte character

Guardian Programming Reference Summary for C 522630-001 6- 26

Functions Summary (G-N)

MBCS_TRIMFRAGMENT_
Detects and trims trailing multibyte character fragments from text strings.
#include <cextdecs(MBCS_TRIMFRAGMENT_)> void MBCS_TRIMFRAGMENT_ ( char *bytestring /* ,short *bytecount /* ,[ short charset ] /* ,[ short *charinfo ] );/* i i,o i o */ */ */ */

MESSAGESTATUS
Determines if a particular message received through READUPDATE has been canceled.
#include <cextdecs(MESSAGESTATUS)> short MESSAGESTATUS ( [ short message-tag ] ); /* i */ status 1 0 -1 = = = The message has been canceled. The message has not been canceled. No pending message is associated with the given tag.

MESSAGESYSTEMINFO
Measures the number of XLBs used by a process, so it can warn when a limit is nearly reached.
#include <cextdecs(MESSAGESYSTEMINFO)> short MESSAGESYSTEMINFO ( short itemcode /* i */ ,short *value );/* o */

return value:
0 2 21 22 29 = = = = = Successful, no error Bad itemcode Bad value Bounds error Missing parameter

Guardian Programming Reference Summary for C 522630-001 6- 27

Functions Summary (G-N)

value
0 1 4 5 = = = = The current limit on the number of messages to this process, as set by CONTROLMESSAGESYSTEM The current limit on the number of messages from this process, as set by CONTROLMESSAGESYSTEM The number of outstanding (non-LCB) messages to this process The number of outstanding (non-LCB) messages from this process

MOM
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Provides a process with the process ID of its creator. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

MONITORCPUS
Notifies the application process when a designated processor module fails or is returned to an operable state.
#include <cextdecs(MONITORCPUS)> void MONITORCPUS ( short cpu-mask ); /* i */

MONITORNET
Enables or disables the receipt of system messages concerning the status of processors in remote systems.
#include <cextdecs(MONITORNET)> void MONITORNET ( short enable ); /* i */

enable
0 1 = = Disable the receipt of messages. Enable the receipt of messages.

Guardian Programming Reference Summary for C 522630-001 6- 28

Functions Summary (G-N)

MONITORNEW
Enables or disables the receipt of the SETTIME and Power On messages.
#include <cextdecs(MONITORNEW)> void MONITORNEW ( short enable ); /* i */

enable
0 1 = = Disable the receipt of messages. Enable the receipt of messages.

MOVEX
Moves data between extended data segments without the need for absolute addressing; it serves both privileged and nonprivileged users.
#include <cextdecs(MOVEX)> short MOVEX ( [ short source-seg-id ] /* i */ ,char *source /* i */ ,[ short dest-seg-id ] /* i */ ,char *dest /* i */ ,long byte-count ); /* i */

_status_eq (<returned_value>) _status_gt (<returned_value>)

The specified data was moved; error contains 0. An error occurred; error contains the error value.

return value:
0 2 22 24 29 = = = = = Successful call; the specified data was moved. Either source-seg-id or dest-seg-id specified a nonexistent extended data segment, or the destination data segment has read-only access. One of the parameters specifies an address that is out of bounds. Either source-seg-id or dest-seg-id specified a privileged segment ID (greater than 2047), but the caller was not privileged. A required parameter is not supplied.

Guardian Programming Reference Summary for C 522630-001 6- 29

Functions Summary (G-N)

MYGMOM
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Gives a process that is a member of a batch job the process-ID of its job ancestor (GMOM). This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

MYPID
(superseded by PROCESSHANDLE_GETMINE_ and PROCESSHANDLE_DECOMPOSE_ ) Gives a process its own CPU and PIN number. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

MYPROCESSTIME
Returns the process execution time of the calling process.
#include <cextdecs(MYPROCESSTIME)> long long MYPROCESSTIME ();

MYSYSTEMNUMBER
(superseded by NODENAME_TO_NODENUMBER_ or PROCESSHANDLE_GETMINE_ and PROCESSHANDLE_DECOMPOSE_) gives a process its own system number. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

MYTERM
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Gives a process the file name of its home terminal. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 6- 30

Functions Summary (G-N)

NEWPROCESS
(superseded by PROCESS_CREATE_ and PROCESS_LAUNCH_) Creates a new Guardian process. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

NEWPROCESSNOWAIT
(superseded by PROCESS_CREATE_and PROCESS_LAUNCH_) Creates a new Guardian process using the nowait option. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

NEXTFILENAME
(superseded by FILENAME_FINDNEXT_) Obtains the name of the next disk file on a designated volume. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

NO^ERROR
Is called internally by sequential I/O (SIO) procedures. NO^ERROR implements error handling and retries within the SIO procedure environment. If the file was opened by OPEN^FILE, then file-system procedures can call NO^ERROR directly.
#include <cextdecs(NO_ERROR)> short NO_ERROR ( short ,short ,short ,short state _near *file-fcb _near *good-error-list retryable ); /* i */ /* i */ /* i */

_status_eq (<returned_value>) no-retry 0 <>0 = = The operation should be retried.

The operation is successful.

The operation should not be retried.

Guardian Programming Reference Summary for C 522630-001 6- 31

Functions Summary (G-N)

state
0= NO^ERROR first checks the error value in the FCB. If the FCB error is 0, NO^ERROR calls FILEINFO for the file.

NODE_GETCOLDLOADINFO_
Retrieves the name of the OSIMAGE file from which the specified node was cold loaded.
#include <cextdecs(NODE_GETCOLDLOADINFO_)> short NODE_GETCOLDLOADINFO_ ( char *filename ,short maxlen ,short *filename-length ,[ const char *nodename ] ,[ short length ] ); /* /* /* /* /* o i o i i */ */ */ */ */

returned value:
0 1 2 3 4 5 = = = = = = File name successfully retrieved. Reserved. Parameter error. Bounds error. Unable to communicate with node. The nodename parameter designates a C-series system.

NODENAME_TO_NODENUMBER_
Converts a node name (system name) to the corresponding node number (system number).
#include <cextdecs(NODENAME_TO_NODENUMBER_)> short NODENAME_TO_NODENUMBER_ ( [ const char *nodename ]/* i */ ,[ short length ] /* i */ ,long *nodenumber ); /* o */

Guardian Programming Reference Summary for C 522630-001 6- 32

Functions Summary (G-N)

NODENUMBER_TO_NODENAME_
Converts a node number (system number) to the corresponding node name (system name).
#include <cextdecs(NODENUMBER_TO_NODENAME_)> short NODENUMBER_TO_NODENAME_ ( [ long nodenumber ] /* i */ ,char *nodename /* o */ ,short maxlen /* i */ ,short *length ); /* o */

NUMBEREDIT
Renumbers the lines of an EDIT file that are in a specified range. NUMBEREDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(NUMBEREDIT)> short NUMBEREDIT ( short filenum /* ,long first /* ,long last /* ,[ long start ] /* ,[ long increment ] );/* i i i i i */ */ */ */ */

return value:
-6 -10 = = Exhausted valid line numbers. Unable to complete renumbering; file is unchanged.

NUMIN
Converts ASCII characters that represent a number into the signed integer value for that number.
#include <cextdecs(NUMIN)> short NUMIN ( char *ascii-num ,short _near *signed-result ,short base ,short _near *status ); /* /* /* /* i o i o */ */ */ */

Guardian Programming Reference Summary for C 522630-001 6- 33

Functions Summary (G-N)

1 0 -1

= = =

Nonexistent number Valid conversion Illegal integer or illegal syntax

NUMOUT
Converts unsigned integer values to their ASCII equivalents, right-justified in an array. Any preceding blanks are filled with zeroes.
#include <cextdecs(NUMOUT)> short NUMOUT ( char *ascii-result ,short unsigned-integer ,short base ,short width ); /* /* /* /* o i i i */ */ */ */

Guardian Programming Reference Summary for C 522630-001 6- 34

Functions Summary (O-Q)

This section lists functions in alphabetic order and briefly describes the syntax of each. For additional information about the functions, refer to the Guardian Procedure Calls Reference Manual.

OBJFILE_GETINFOLIST_
Obtains information about the object file or user library file of the calling process.
#include <cextdecs(OBJFILE_GETINFOLIST_)> short OBJFILE_GETINFOLIST_ ( short *ret-attr-list ,short ret-attr-count ,short *ret-values-list ,short ret-values-maxlen ,short *ret-values-len ,[ short lib-info ] ,[ short *error-detail ] ,[ const char *srl-filename ] ,[ short srl-filename-len ] ); return value 0 1 = = Information is returned successfully. File-system error; error-detail contains the error number. Error 563 (buffer too small) is returned if ret-values-list is too small to contain all of the requested information. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Invalid attribute code specified; error-detail contains the attribute code that is unknown to OBJFILE_GETINFOLIST_. The process does not have a user library. /* /* /* /* /* /* /* /* /* i i o i o i o i i */ */ */ */ */ */ */ */ */

2 3 4 5

= = = =

error-detail Attribute Code Attribute Description 1 2 3 Binder timestamp Minimum tos version Inspect length

Value Representation short (3 TNS words) short long

Guardian Programming Reference Summary for C 522630-001 7 -1

Functions Summary (O-Q)

Attribute Code Attribute Description 4 5 6 7 8 9 10 11 12 13 Binder length Inspect on High PIN High requesters Run named PFS size Target processor Accelerator timestamp Compilation mode (accelerated or not accelerated) Run mode (will or will not run accelerated)

Value Representation long short short short short long short short (4 TNS words) short short

OLDFILENAME_TO_FILENAME_
Converts a C-series internal file name to a D-series file name.
#include <cextdecs(OLDFILENAME_TO_FILENAME_)> short OLDFILENAME_TO_FILENAME_ ( short *oldfilename /* ,char *filename /* ,short maxlen /* ,short *filename-length );/* i o i o */ */ */ */

OLDSYSMSG_TO_NEWSYSMSG_
Converts a C-series system message to its D-series equivalent.
#include <cextdecs(OLDSYSMSG_TO_NEWSYSMSG_)> short OLDSYSMSG_TO_NEWSYSMSG_ ( char *oldmsg /* ,short length /* ,char *newmsg /* ,short maxlen /* ,short *newmsg-length /* ,[ short *error-detail ] );/* i i o i o o */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7 -2

Functions Summary (O-Q)

returned value:
0 1 2 3 4 = = = = = Message successfully converted. File-system error; error-detail contains the file-system error number. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. The supplied system message is not supported by this procedure; no conversion was performed.

OPEN
(superseded by FILE_OPEN_) Establishes a communication path between an application process and a file. OPEN returns a file number to the application process. This procedure operates only on Guardian objects. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

OPEN^FILE
Allows access to a file.
#include <cextdecs(OPEN_FILE)> short OPEN_FILE ( short _near *common-fcb /* ,short _near *file-fcb /* ,[ short _near *block-buffer ] /* ,[ short block-bufferlen ] /* ,[ long flags ] /* ,[ long flags-mask ] /* ,[ short max-recordlen ] /* ,[ short prompt-char ] /* ,[ short _near *error-file-fcb ] );/* i i i i i i i i i */ */ */ */ */ */ */ */ */

flags
Note. Combine selected values using signed addition, because bit 0 is not used.

ABORT^OPENERR ABORT^XFERERR AUTO^CREATE AUTO^TOF

%1D %2D %10D %100D

Guardian Programming Reference Summary for C 522630-001 7 -3

Functions Summary (O-Q)

BLOCKED CRLF^BREAK LEVEL3^SPOOL^ENABLE MUSTBENEW NOWAIT OLD^RECEIVE PRINT^ERR^MSG PURGE^DATA READ^TRIM VAR^FORMAT WRITE^FOLD WRITE^PAD WRITE^TRIM

%400D %40000D %200000D %20D %200D %100000D %4D %40D %2000D %1000D %10000D %20000D %4000D

OPENEDIT
(superseded by OPENEDIT_) Allocates and initializes data blocks in the EDIT file segment (EFS) so that the specified file can be accessed later by the IOEdit procedures. It optionally creates and opens the specified file through the file system. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

OPENEDIT_
Allocates and initializes data blocks in the EDIT file segment (EFS) so that the specified file can be accessed later by the IOEdit procedures. It optionally creates and opens the specified file through the file system.
#include <cextdecs(OPENEDIT_)> short OPENEDIT_ ( const char *file-name /* ,short length /* ,short *filenum /* ,[ short access ] /* ,[ short exclusion ] /* ,[ short nowait ] /* ,[ short sync-depth ] /* ,[ short write-thru ] );/* i i i,o i i i i i */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7 -4

Functions Summary (O-Q)

return value -1 -2 -3 -4 -5 11 14 16 = = = = = = = = Page-count value is inconsistent. Page-table tags are out of order. Page-table tag is outside legal range. Page-table block number is outside of file. Page-table has duplicate block numbers. File does not exist; indicates that the file does not exist and that the flags parameter indicates read-only access to the file. Device does not exist; indicates that the device-name part of the file name designates a device that either does not exist or is not a disk device. File has not been opened, wrong file type; indicates that the file is not an EDIT file (that is, the file type is not unstructured or the file code is not 101 or 102). Unable to obtain buffer space; indicates that the files directory does not fit into IOEdits extended data segment and OPENEDIT is unable to enlarge the segment. Unable to obtain memory space for control block; indicates that the number of IOEdit files already open is equal to the maximum number specified or assumed when INITIALIZEEDIT was called. File is bad; indicates that the file exists and has the correct file type and file code for an EDIT file, but the data in the file has an incorrect format and OPENEDIT is unable to repair it.

31

34

59

OPENER_LOST_
Examines a system message and searches an open table to determine if an opener has been lost.
#include <cextdecs(OPENER_LOST_)> short OPENER_LOST_ ( char *message ,short length ,short *table ,short *index ,short number-of-entries ,short entry-size ); /* /* /* /* /* /* i i i i,o i i */ */ */ */ */ */

status
0 1 2 = = = Search completed; no lost openers (reserved) Parameter error

Guardian Programming Reference Summary for C 522630-001 7 -5

Functions Summary (O-Q)

3 4 5 6 7

= = = = =

Bounds error Backup opener lost Primary opener lost; backup promoted to primary Openers lost; table entry now free Message is not a relevant status-change message

message:length -2 -8 -100 -110 = = = = Local processor failure Network status change Remote processor failure Connection to remote system lost

OPENINFO
(superseded by FILE_GETOPENINFO_) Obtains information about one open of one disk file, of all the files on a disk device, or of certain nondisk devices. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

OSS_PID_NULL_
Returns a null OSS process ID.
#include <cextdecs(OSS_PID_NULL_)> long OSS_PID_NULL_ ( void );

PACKEDIT
Converts a line image from unpacked format into EDIT packed line format. PACKEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(PACKEDIT)> void PACKEDIT ( char *unpacked-line /* ,short unpacked-length /* ,char *packed-line /* ,short packed-limit /* ,short *packed-length /* ,[ short full-length ] );/* i i o i o i */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7 -6

Functions Summary (O-Q)

PATHNAME_TO_FILENAME_
Converts an OSS pathname to a Guardian file name.
#include <cextdecs(PATHNAME_TO_FILENAME_)> short PATHNAME_TO_FILENAME_ ( const char *path ,char *filename ,short maxlen ,short *length ,[ short *infoflags ] ); /* /* /* /* /* i o i o o */ */ */ */ */

returned value:
0 563 4002 4006 = = = = No error. The buffer pointed to by filename is too small. No such pathname exists. The corresponding OSS errno value is ENOENT. The prefix within pathname refers to an OSS fileset other than the root fileset that is not mounted. The corresponding OSS errno value is ENXIO. Search permission is denied on a component of the pathname prefix. The corresponding OSS errno value is EACCESS. A specified parameter has an invalid address. The corresponding OSS errno value is EFAULT. A prefix within pathname refers to a file other than a directory. The corresponding OSS errno value is ENOTDIR. The value of pathname is invalid. The corresponding OSS errno value is EINVAL. The pathname or a component of the pathname is longer than PATH_MAX characters. (PATH_MAX is a symbolic constant defined in the OSS limits header file.) The corresponding OSS errno value is ENAMETOOLONG. The root fileset is not mounted. The corresponding OSS errno value is ENOROOT. OSS is not installed or is not initialized. The corresponding OSS errno value is EOSSNOTRUNNING.

4013 4014 4020 4022 4131

= = = = =

4202 4203

= =

Guardian Programming Reference Summary for C 522630-001 7 -7

Functions Summary (O-Q)

POOL_CHECK_
Checks the internal pool data structures and returns error information.
#include <cextdecs(POOL_CHECK_)> short POOL_CHECK_ ( short *pool /* i */ ,[ long *corruption-address ] /* o */ ,[ long *block ] /* o */ ,[ long *block-size ] /* o */ ,[ short *tag-size ] ); /* o */

error
0 2 3 9 11 12 = = = = = = No error. Required parameter missing. The pool parameter must be specified. Bounds error. A parameter on the parameter list has a bounds error. Corrupt pool header. Corrupt allocated blocks. Data is probably written beyond the allocated block. Corrupt free list blocks. Data is probably written into a returned block.

POOL_DEFINE_
Designates a portion of a user's stack or an extended data segment for use as a pool.
#include <cextdecs(POOL_DEFINE_)> short POOL_DEFINE_ ( short *pool /* ,long pool-size /* ,[ short alignment ] /* ,[ short priv-only ] );/* i i i i */ */ */ */

returned value:
0 2 3 = = = No error. Required parameter missing. The pool and pool-size parameters must be specified. Bounds error. The pool parameter is in a writeback-inhibit segment, or pool-size is larger than the space available, or a nonprivileged caller specified a nonzero value for priv-only.

Guardian Programming Reference Summary for C 522630-001 7 -8

Functions Summary (O-Q)

4 5 6

= = =

Invalid size. The pool-size parameter is too small to allocate the minimum size pool including the pool header. Alignment error on pool. The pool parameter is not in alignment with the selected alignment. Invalid alignment. The value of alignment is not 0, 4, 8, or 16.

POOL_GETINFO_
Returns information about the specified pool.
#include <cextdecs(POOL_GETINFO_)> short POOL_GETINFO_ ( short *pool ,[ short *error-detail ] /* i */ ,[ long *avail-pool-size ] /* o */ ,[ long *curalloc ] /* o */ ,[ long *maxalloc ] /* o */ ,[ long *fail-block-size ] /* o */ ,[ short *curfrag ] /* o */ ,[ short *maxfrag ] /* o */ ,[ short *alignment ] /* o */ ,[ short *tag-size] ); /* o */

return value:
0 2 = = No error. Required parameter missing. The error-detail parameter contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error. The error-detail parameter contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Corrupt pool header.

3 9

= =

POOL_GETSPACE_
Obtains a block of memory from a buffer pool.
#include <cextdecs(POOL_GETSPACE_)> long POOL_GETSPACE_ ( short *pool /* i */ ,long block-size /* i */ ,short *error ); /* o */

Guardian Programming Reference Summary for C 522630-001 7 -9

Functions Summary (O-Q)

error
0 2 4 9 10 = = = = = No error. Required parameter missing. Invalid block size. The value of block-size is not within the valid range. Corrupt pool header. Unable to allocate space.

POOL_PUTSPACE_
Returns a block of memory to a buffer pool.
#include <cextdecs(POOL_PUTSPACE_)> short POOL_PUTSPACE_ ( short *pool /* i */ ,short *block );/* i */

returned value:
0 2 3 9 11 = = = = = No error. Required parameter missing. Bounds error. The value of block is not within the pool boundaries. Corrupt pool header. Corrupt allocated block. Data is probably written beyond the allocated block or the block has already been returned.

POOL_RESIZE_
Returns a block of memory to a buffer pool.
#include <cextdecs(POOL_RESIZE_)> short POOL_RESIZE_ ( short *pool /* i */ ,long new-pool-size );/* i */

returned value:
0 2 3 = = = No error. Required parameter missing. Bounds error. The pool parameter is in a writeback-inhibit segment, or new-pool-size is larger than the available space.

Guardian Programming Reference Summary for C 522630-001 7- 10

Functions Summary (O-Q)

4 9 11 12 13

= = = = =

Invalid size. The new-pool-size parameter is too small to allocate the minimum size pool, including the pool header. Corrupt pool header. Corrupt allocated blocks. Data is probably written beyond the allocated block. Corrupt free list blocks. Data is probably written into a returned block. Unable to shrink pool.

POSITION
(superseded by FILE_SETPOSITION_) Positions by primary key within relative and entry-sequenced files. For unstructured files, it specifies a new current position. Use KEYPOSITION with key-sequenced files.
#include <cextdecs(POSITION)>

_cc_status POSITION ( short filenum

/* i */ ,long record-specifier );/* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). POSITION was successful. No operation; filenum does not designate a disk file.

POSITIONEDIT
Sets the next record number to a specified value for a specified file. POSITIONEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(POSITIONEDIT)> short POSITIONEDIT ( short filenum /* i */ ,long record-number );/* i */

PRIORITY
(superseded by PROCESS_SETINFO_, PROCESS_GETINFO_, and PROCESS_GETINFOLIST_) Enables a process to examine or change its initial priority and current priority. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.
Guardian Programming Reference Summary for C 522630-001 7- 11

Functions Summary (O-Q)

PROCESS_ACTIVATE_
Returns a suspended process or process pair to the ready state.
#include <cextdecs(PROCESS_ACTIVATE_)> short PROCESS_ACTIVATE_ ( short *processhandle /* i */ ,[ short specifier ] );/* i */

returned value:
0 11 48 201 = = = = Process activated. Process does not exist. Security violation. Unable to communicate with the processor of the process.

specifier
0 1 = = Activate the specified process. Activate both members if the specified process is part of a named process pair; otherwise, activate the specified process.

Guardian Programming Reference Summary for C 522630-001 7- 12

Functions Summary (O-Q)

PROCESS_CREATE_
(superseded by PROCESS_LAUNCH_) Creates a new Guardian process and, optionally, assigns a symbolic process name to it.
#include <cextdecs(PROCESS_CREATE_)> short PROCESS_CREATE_ ( [ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ name-option 0 1 2 3 4 = = = = = Process is unnamed. Process is named; name is supplied in name. Process is named; system must generate a name. Process is callers backup; use callers name. Process is named; system must generate a name. const char *program-file ] /* short length ] /* const char *library-file ] /* short length ] /* const char *swap-file ] /* short length ] /* const char *ext-swap-file ]/* short length ] /* short priority ] /* short processor ] /* short *processhandle ] /* short *error-detail ] /* short name-option ] /* const char *name ] /* short length ] /* char *process-descr ] /* short maxlen ] /* short *process-descr-len ] /* long nowait-tag ] /* const char *hometerm ] /* short length ] /* short memory-pages ] /* short jobid ] /* short create-options ] /* const char *defines ] /* short length ] /* short debug-options ] /* long pfs-size ] ); /* i i i i i i i i i i o o i i i o i o i i i i i i i i i i */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7- 13

Functions Summary (O-Q)

create-options Bit 0-8 Bit 9 0 1 Reserved (specify 0) If the caller is named, the process deletion message, if any, will go only to the current instance of the calling process. If the caller is named, the process deletion message, if any, will go to whatever process has the calling processs name (regardless of sequence number) at that time. Force new process into a low PIN if the calling process has the inherited force-low attribute set. Ignore the value of the callers inherited force-low attribute. Propagate the DEFINEs in the callers context only. Propagate DEFINES in defines only. Propagate both sets of defines; in case of name conflicts, use the ones in defines. Use callers DEFINE mode. Use value in bit 14. DEFINEs disabled (ignored if bit 13 is 0). DEFINEs enabled (ignored if bit 13 is 0). Can be assigned any PIN. Requires low PIN (in range 0 through 254).

Bit 10

0 1

Bits 11-12

0 1 2

Bit 13 Bit 14 Bit 15

0 1 0 1 0 1

debug-options Bit 0-11 Bit 12 1 0 Bit 13 Bit 14 1 0 1 0 Bit 15 1 0 Reserved (specify 0) Enter Debug/Inspect at the first executable instruction of the programs MAIN procedure. Begin normal program execution. If the process traps, create a saveabend file. If the process traps, do not create a saveabend file. Use debugger specified in bit 15 and saveabend option specified in bit 13 regardless of program-file flag setting. Use standard rules for debugger selection. Use Inspect. Use Debug.

PROCESS_DEBUG_
Invokes the debug facility for the calling process or another process.

Guardian Programming Reference Summary for C 522630-001 7- 14

Functions Summary (O-Q)

#include <cextdecs(PROCESS_DEBUG_)> short PROCESS_DEBUG_ ( [ ,[ ,[ ,[ short const short short *processhandle ] /* i char *terminal-name ] /* i length ] /* i now ] ); /* i */ */ */ */

return value:
0 11 48 201 = = = = Debug request accepted. If the process to be debugged is not the calling process, the request might have been queued. Process does not exist. Security violation. Unable to communicate with the processor of the process.

PROCESS_GETINFO_
Obtains a limited set of information about a specified process.
#include <cextdecs(PROCESS_GETINFO_)> short PROCESS_GETINFO_ ( [ short *processhandle ] /* i,o ,[ char *proc-fname ] /* o ,[ short maxlen ] /* i ,[ short *proc-fname-len ] /* i ,[ short *priority ] /* o ,[ short *moms-processhandle ] /* o ,[ char *hometerm ] /* o ,[ short maxlen ] /* i ,[ short *hometerm-len ] /* o ,[ long long *process-time ] /* o ,[ short *creator-access-id ] /* o ,[ short *process-access-id ] /* o ,[ short *gmoms-processhandle ] /* o ,[ short *jobid ] /* o ,[ char *program-file ] /* o ,[ short maxlen ] /* i ,[ short *program-len ] /* o ,[ char *swap-file ] /* o ,[ short maxlen ] /* i ,[ short *swap-len ] /* o ,[ short *error-detail ] /* o ,[ short *proc-type ] /* o ,[ long *oss-pid ] ); /* o */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7- 15

Functions Summary (O-Q)

returned value:
0 1 2 3 4 5 6 = = = = = = = Information is returned for the specified process. File-system error; error-detail contains the error number. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Specified process does not exist. Unable to communicate with processor. Unable to communicate with system.

proc-type Bits 0-14 Bit 15 reserved =1 =0 Process is a Guardian process. Process is an OSS process.

PROCESS_GETINFOLIST_
Obtains detailed information about a specified process or about a set of processes that meet specified criteria.
#include <cextdecs(PROCESS_GETINFOLIST_)> short PROCESS_GETINFOLIST_ ( [ short cpu ] /* i */ ,[ short *pin ] /* i,o */ ,[ char *nodename ] /* i */ ,[ short length ] /* i */ ,[ short *processhandle ] /* i */ ,short *ret-attr-list /* i */ ,short ret-attr-count /* i */ ,short *ret-values-list /* o */ ,short ret-values-maxlen /* i */ ,short *ret-values-len /* o */ ,[ short *error-detail ] /* o */ ,[ short srch-option ] /* i */ ,[ short *srch-attr-list ] /* i */ ,[ short srch-attr-count ] /* i */ ,[ short *srch-values-list ] /* i */ ,[ short srch-values-len ] /* i */ ,[ long oss-pid ] ); /* i */

Guardian Programming Reference Summary for C 522630-001 7- 16

Functions Summary (O-Q)

returned value:
0 = Information is returned for the specified process or processes; errordetail contains the number of processes for which information has been returned (might be more than one process if in search mode). File-system error; error-detail contains the error number. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of of the first parameter found to be in error, where 1 designates the first parameter on the left. Specified process does not exist or does not meet search criteria; information returned is for a process (or processes) with a higher PIN; error-detail contains the number of processes for which information has been returned (might be more than one process if in search mode). Unable to communicate with cpu; cpu might not exist. Unable to communicate with nodename. No more matches exist; error-detail contains the number of processes for which information has been returned (might be 0). Reserved. Invalid search attribute code; error-detail contains the code in question (not an index into a list). Invalid search value; error-detail contains the associated attribute code (not an index into a list). Invalid return attribute code; error-detail contains the code in question (not an index into a list). Invalid srch-option.

1 2 3 4

= = = =

5 6 7 8 9 10 11 12

= = = = = = = =

srch-option 0 1 2 3 = = = = Return information for only the process specified by [nodename,] cpu,pin or by processhandle. Start a search at [nodename,] cpu,pin and return information for the first matching process. Start a search at [nodename,] cpu,pin and return information for as many matching processes as will fit in ret-values-list. Return information for only the OSS process specified by [nodename,] osspid.

Note. Attributes marked by an asterisk (*) correspond to individual parameters returned by PROCESS_GETINFO_.

Guardian Programming Reference Summary for C 522630-001 7- 17

Functions Summary (O-Q)

Attribute Code * 1 * 2 3 * 4 * 5 * 6 * 7 8 9 12 13 14 15-29 * 30 31 32 33 * 34 35 36 37 38 * 39 * 40 41 42 43 44 45 46 47 48 creator access ID process access ID maximum priority (search only) program file home terminal gmom's process handle jobid process subtype minimum priority (search only) earliest creation time (search only) latest creation time (search only) lowered priority (reserved for future use) process time wait state process state library file swap file context changes DEFINE mode licenses PIN file name mom's process handle process file security current priority initial priority remote creator logged-on state extended data segment swap file primary process handle

Value Representation short short short short bytelength, char short bytelength, char short (10 TNS words) short short short long long long long none (as a search attribute) short (as a return attribute) long long short short short bytelength, char short bytelength, char short short short short short bytelength, char short (10 TNS words) short short short short short short bytelength, char short short (10 TNS words)

Guardian Programming Reference Summary for C 522630-001 7- 18

Functions Summary (O-Q)

Attribute Code 49 50 51 53 54 55 56 57 58 59 62 65 66 67 68 69 70 71 72 73 80 81 82 83 84 * 90 91 92 93 94 95 96 qualifier info available Safeguard-authenticated logon force low creation timestamp current pages messages sent messages received receive queue length receive queue maximum length page faults named moms file name gmoms file name Safeguard-authenticated logoff state inherited logon stop on logoff propagate logon propagate stop-on-logoff logon flags and states applicable attributes effective group ID saved set-group-ID login name group list saved set-user-ID OSS process ID (OSS process only) OSS command (OSS process only) OSS arguments (OSS process only) OSS program pathname (OSS process only) OSS parent process ID (OSS process only) OSS elapsed time (OSS process only) OSS processor time (OSS process only)

Value Representation short short short long long long long long short short long short short bytelength, char short bytelength, char short short short short short short short long long short bytelength, char <= 32 chars short n, long [n] long long short bytelength, char <= 80 chars short bytelength, char <= 80 chars short bytelength, char <= 1024 chars long long long long long

Guardian Programming Reference Summary for C 522630-001 7- 19

Functions Summary (O-Q)

Attribute Code 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 OSS start time (OSS process only) OSS group leader process ID (OSS process only) OSS process status (OSS process only) process file segment (PFS) size server class name origin of main stack current main stack size maximum main stack size origin of the privileged stack current privileged stack size maximum privileged stack size start of global data size of global data start of native heap area current size of native heap area maximum size of native heap area guaranteed swap space TNS/R native shared run-time library: buffer size required for attribute 116 TNS/R native shared run-time library file-name information (in a variablesized array) TNS/R native shared run-time library: buffer size required for attribute 118 TNS/R native shared run-time library name information (in a variable-sized array). process is TNS/R native

Value Representation long long long long long short bytelength, char long long long long long long long long long long long long short short number of file names, short flags short file-name length, char file name short short number of file names, short flags short name length, char name short

117 118

119

Guardian Programming Reference Summary for C 522630-001 7- 20

Functions Summary (O-Q)

PROCESS_GETPAIRINFO_
Obtains basic information about a named process or process pair.
#include <cextdecs(PROCESS_GETPAIRINFO_)> short PROCESS_GETPAIRINFO_ ([ short *processhandle ]/* i */ ,[ char *pair ] /* i */ ,[ short maxlen ] /* o,i*/ ,[ short *pair-length ] /* o */ ,[ short *primary-processhandle ] /* o */ ,[ short *backup-processhandle ] /* o */ ,[ long *search-index ] /* i,o */ ,[ short *ancst-processhandle ] /* o */ ,[ const char *search-nodename ] /* i */ ,[ short length ] /* i */ ,[ short options ] ); /* i */

returned value:
0 1 2 3 4 5 6 7 8 9 10 11 12 = = = = = = = = = = = = = Information is returned for a process pair (not the calling process). Reserved. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the leftmost parameter. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the leftmost parameter. Information is returned for a single named process (can be the calling process). Information is returned for a process pair where the caller is the current primary. Information is returned for a process pair where the caller is the current backup. No information is returned; process is unnamed (can be the calling process). No information is returned; search is complete. Specified process does not exist. Unable to communicate with the node where the process resides. Process is an I/O process, but the option to allow I/O processes was not selected. The option to allow I/O processes was selected, but the process is an I/O process running on a C-series system.

Guardian Programming Reference Summary for C 522630-001 7- 21

Functions Summary (O-Q)

options
Bits 0-14 Bit 15 1 Reserved (specify 0) Return information only for named processes. Also return information for I/O processes (that is, processes controlling devices or volumes).

PROCESS_LAUNCH_
Creates a new process and, optionally, assigns a number of process attributes.
#include <cextdecs(PROCESS_LAUNCH_)> short PROCESS_LAUNCH_ ( void *param-list ,[ short *error-detail ] ,[ void *output-list ] ,[ short maxlen ] ,[ short *output-list-len ); /* /* /* /* /* i o o i o */ */ */ */ */

PROCESS_SETINFO_
Alters a single nonstring attribute of a specified process and optionally returns the prior value of the attribute.
#include <cextdecs(PROCESS_SETINFO_)> short PROCESS_SETINFO_ ( [ short *processhandle ] ,[ short specifier ] ,short set-attr-code ,[ short *set-value ] ,[ short set-value-len ] ,[ short *old-value ] ,[ short old-value-maxlen ] ,[ short *old-value-len ] ); /* /* /* /* /* /* /* /* i i i i i o i o */ */ */ */ */ */ */ */

specifier
0 1 = = Act upon the specified process only. Act upon both members if processhandle specifies a member of a named process pair.

Note. Attributes marked with an asterisk (*) can be altered only when the caller is the target process.

Guardian Programming Reference Summary for C 522630-001 7- 22

Functions Summary (O-Q)

Attribute Code 40 * 41 42 * 45 * 47 * 49 * 50 * 69 * 70 * 71 mom's process handle process file security priority logged-on state primary qualifier info available Safeguard-authenticated logon stop on logoff propagate logon propagate stop-on-logoff

Value Representation short (10 TNS words) short short short short short short short short short

PROCESS_SETSTRINGINFO_
Alters a single string-form attribute of a specified process, and optionally returns the prior value of the attribute.
#include <cextdecs(PROCESS_SETSTRINGINFO_)> short PROCESS_SETSTRINGINFO_ ([ short *processhandle ]/* ,[ short specifier ] /* ,short set-attr-code /* ,const char *set-value /* ,short length /* ,[ char *old-value ] /* ,[ short maxlen ] /* ,[ short *old-value-len ] ); /* i i i i i o i o */ */ */ */ */ */ */ */

specifier
0 1 = = Act upon the specified process only. Act upon both members if processhandle specifies a member of a named process pair.

Guardian Programming Reference Summary for C 522630-001 7- 23

Functions Summary (O-Q)

PROCESS_SPAWN_
Creates a new Open System Services (OSS) process and, optionally, assigns a number of process attributes. You can use this procedure to create only OSS processes, although you can call it from either a Guardian process or an OSS process. To create a Guardian process, call the PROCESS_CREATE_ procedure. For more information about the PROCESS_SPAWN function, refer to the Open System Services System Calls Reference Manual.
#include <cextdecs(PROCESS_SPAWN_)> short PROCESS_SPAWN_ ( [ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ ,[ char void char char void long void void long char *oss-program-file ] *fdinfo ] *argv ] *envp ] *inheritance ] inheritance-length ] *process-extension ] *process-results ] nowait-tag ] *path ] ); /* /* /* /* /* /* /* /* /* /* i i i i i i i i,o i i */ */ */ */ */ */ */ */ */ */

PROCESS_STOP_
Deletes a process or a process pair and sends a process deletion system message to the mom of the process and to any other process that is entitled to receive the message.
#include <cextdecs(PROCESS_STOP_)> short PROCESS_STOP_ ( [ ,[ ,[ ,[ ,[ ,[ ,[ ,[ short short short short short short const short *processhandle ] specifier ] options ] completion-code ] termination-info ] *spi-ssid ] char *text ] length ] ); /* /* /* /* /* /* /* /* i i i i i i i i */ */ */ */ */ */ */ */

specifier
0 1 2 = = = Stop the specified process only. Stop both members if the specified process is part of a named process pair; otherwise, stop the specified process. Stop the callers opposite member, but not the caller, if it is part of a named process pair. The processhandle parameter is ignored.

Guardian Programming Reference Summary for C 522630-001 7- 24

Functions Summary (O-Q)

options
Bits 0-14 Bit 15 1 Reserved (specify 0) Normal termination (STOP) Abnormal termination (ABEND)

PROCESS_SUSPEND_
Places a process or process pair into the suspended state.
#include <cextdecs(PROCESS_SUSPEND_)> short PROCESS_SUSPEND_ ( short *processhandle /* i */ ,[ short specifier ] );/* i */

returned value:
0 11 48 201 = = = = Process has been successfully suspended. Process does not exist. A security violation has occurred. Unable to communicate with processor where the process is running.

specifier
0 1 = = Suspend the specified process only. Suspend both members if the specified process is part of a named process pair.

PROCESSACCESSID
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the process access ID (PAID) of the calling process. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

PROCESSFILESECURITY
(superseded by PROCESS_SETINFO_, PROCESS_GETINFO_, or PROCESS_GETINFOLIST_) Examines or sets the file security for the current process. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 7- 25

Functions Summary (O-Q)

PROCESSHANDLE_COMPARE_
Compares two process handles and reports whether they are identical, represent different processes of the same process pair, or are different.
#include <cextdecs(PROCESSHANDLE_COMPARE_)> short PROCESSHANDLE_COMPARE_ (short *processhandle-1 /* i */ ,short *processhandle-2 );/* i */

status
0 1 2 = = = Process handles are unrelated. Process handles are not identical but designate a process pair. Process handles are identical.

PROCESSHANDLE_DECOMPOSE_
Returns one or more parts of a process handle.
#include <cextdecs(PROCESSHANDLE_DECOMPOSE_)> short PROCESSHANDLE_DECOMPOSE_ ( short *processhandle ,[ short *cpu ] ,[ short *pin ] ,[ long *nodenumber ] ,[ char *nodename ] ,[ short maxlen ] ,[ short *nodename-length ] ,[ char *procname ] ,[ short maxlen ] ,[ short *procname-length ] ,[ long long *sequence-number ] ); /* /* /* /* /* /* /* /* /* /* /* i o o o o i o o i o o */ */ */ */ */ */ */ */ */ */ */

PROCESSHANDLE_GETMINE_
Obtains the callers process handle.
#include <cextdecs(PROCESSHANDLE_GETMINE_)> short PROCESSHANDLE_GETMINE_ (short *processhandle ); /* o */

Guardian Programming Reference Summary for C 522630-001 7- 26

Functions Summary (O-Q)

return value:
0 3 = = Information returned successfully. Parameter address out of bounds.

PROCESSHANDLE_NULLIT_
Initializes a process handle to a null value.
#include <cextdecs(PROCESSHANDLE_NULLIT_)> short PROCESSHANDLE_NULLIT_ ( short *processhandle ); /* o */

return value:
0 22 29 = = = Operation was successful. Parameter is out of bounds. Parameter is missing.

PROCESSHANDLE_TO_CRTPID_
Converts a process handle to the corresponding process ID (CRTPID).
#include <cextdecs(PROCESSHANDLE_TO_CRTPID_)> short PROCESSHANDLE_TO_CRTPID_ ( short *processhandle ,short *process-id ,[ short pair-flag ] , long node-number ] ); /* /* /* /* i o i i */ */ */ */

PROCESSHANDLE_TO_FILENAME_
Converts a process handle to a process file name.
#include <cextdecs(PROCESSHANDLE_TO_FILENAME_)> short PROCESSHANDLE_TO_FILENAME_ ( short *processhandle ,char *filename ,short maxlen ,short *filename-length ,[ short options ] ); /* /* /* /* /* i o i o i */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 7- 27

Functions Summary (O-Q)

options
Bits 0-14 Bit 15 Not currently used (specify 0). For named processes: if set, specifies that the sequence number not be included in filename for a named process.

PROCESSHANDLE_TO_STRING_
Converts a process handle to the equivalent process string.
#include <cextdecs(PROCESSHANDLE_TO_STRING_)> short PROCESSHANDLE_TO_STRING_( short *processhandle ,char *process-string ,short maxlen ,short *process-string-length ,[ char *nodename ] ,[ short length ] ,[ short named-form ] ); named-form 0 1 2 = = = Return process name if possible; if it is unavailable, return cpu,pin form. Return process name; if it is unavailable, report the error. Return cpu,pin form in all cases. /* /* /* /* /* /* /* i o i o i i i */ */ */ */ */ */ */

PROCESSINFO
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains process status information. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 7- 28

Functions Summary (O-Q)

PROCESSNAME_CREATE_
Returns a unique process name that is suitable for passing to the PROCESS_CREATE_ procedure.
#include <cextdecs(PROCESSNAME_CREATE_)> short PROCESSNAME_CREATE_ ( char *name /* o ,short maxlen /* i ,short *namelen /* o ,[ short name-type ] /* i ,[ const char *nodename ] /* i ,[ short length ] /* i ,[ short options ] ); /* i */ */ */ */ */ */ */

returned value:
0 44 201 590 = = = = Process name is returned successfully. No names of the specified type are available. Unable to communicate with the specified node. Parameter or bounds error.

name-type 0 1 = = 4-character name 5-character name (returns a 4-character name if nodename refers to a C-series system)

options
Bits 0-14 Bit 15 Reserved; must be 0. 0= 1= Include node name in the returned process name. Return the process name in local form.

Guardian Programming Reference Summary for C 522630-001 7- 29

Functions Summary (O-Q)

PROCESSOR_GETINFOLIST_
Obtains configuration information and statistics about a processor.
#include <cextdecs(PROCESSOR_GETINFOLIST_)> short PROCESSOR_GETINFOLIST_ ([const char *nodename ] ,[ short length ] ,[ short cpu ] ,short *ret-attr-list ,short ret-attr-count ,short *ret-values-list ,short ret-values-maxlen ,short *ret-values-len ,[ short *error-detail ] ); /* /* /* /* /* /* /* /* /* i i i o i i i o o */ */ */ */ */ */ */ */ */

return value:
0 1 = = Information is returned for the specified process. File-system error; error-detail contains the error number. Error 563 is returned if the ret-values-list buffer is too small to contain all of the requested information. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Reserved. Unable to communicate with cpu. The cpu parameter might not exist. An invalid return attribute code was supplied. The specified node is running a C-series version of the operating system; PROCESSOR_GETINFOLIST_ cannot obtain information from a C-series system.

2 3 4 5 7 8

= = = = = =

error-detail Code 2 3 4 5 6 7 8 Attribute processor type software version page size memory size first virtual page swappable pages free pages Value Representation short short long long long long long

Guardian Programming Reference Summary for C 522630-001 7- 30

Functions Summary (O-Q)

Code 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 35 36 37 38 39 40 41 42 43 44 45 46 47

Attribute current locked memory maximum locked memory high locked memory page faults scans per memory manager call memory clock cycles memory pressure memory queue length local time offset elapsed time busy time idle time interrupt time processor queue length dispatches PCBs in low PINs PCBs in high PINs time list elements process time-list elements breakpoints send busy T16 interrupt count disk cache hits disk I/Os processor queue state memory queue state sequenced sends unsequenced sends CME events pages created interpreter busy interpreter transitions transactions processor model

Value Representation long long long long long long short short long long long long long long long long long long short long short number of elements, short ARRAY short number of elements, short ARRAY short number of elements, long ARRAY short number of elements, long ARRAY short long long short number of elements, long ARRAY long long long long short, short, long long short, short, long long long long long long long long long long short

Guardian Programming Reference Summary for C 522630-001 7- 31

Functions Summary (O-Q)

Code 48 49 56 57 58 59 60

Attribute processor name processor full name base time memory-management attributes segments in use maximum segments used the update part of the release ID (the two digits that follow the period) for Compaq internal use only availability of IEEE floating point on the current system

Value Representation short bytelength, char short bytelength, char long long long long long short

61 62

short

Note. Calls to this procedure are identical in their format and values to calls to CPU_GETINFOLIST_.

PROCESSOR_GETNAME_
Returns a processors type as a character string.
#include <cextdecs(PROCESSOR_GETNAME_)> short PROCESSOR_GETNAME_ ( short cpu-number ,char *name ,short maxlen ,short *namelen ,[ short *cpu-type-out ] ,[ const char *node-name ] ,[ short length ] ,[ long node-number ] ,[ short cpu-type-in ] ,[ short expand-name ] ,[ short *cpu-model-out ] ,[ short cpu-model-in ] ); /* /* /* /* /* /* /* /* /* /* /* /* i o i o o i i i i i o i */ */ */ */ */ */ */ */ */ */ */ */

returned value:
22 29 201 590 = = = = Parameter or buffer out of bounds Missing parameter Unable to communicate over this path Parameter value bad or inconsistent

Guardian Programming Reference Summary for C 522630-001 7- 32

Functions Summary (O-Q)

name:maxlen processor type 0 1 2 3 4 5 6 7 8 9 NonStop 1+ (no longer supported) NonStop II (no longer supported) TXP (no longer supported) VLX (no longer supported) CLX Cyclone NSR-L NSR-N, NSR-P, or NSR-K NSR-W NSR-G or NSR-T

PROCESSORSTATUS
Obtains the number and the status of the processor modules in a system.
#include <cextdecs(PROCESSORSTATUS)> long PROCESSORSTATUS ();

PROCESSORTYPE
Returns the processor type of a specified system and processor.
#include <cextdecs(PROCESSORTYPE)> short PROCESSORTYPE ();

type
-2 -1 0 1 2 3 4 = = = = = = = This feature is not supported for the system named in sysid. Unable to communicate with processor (either it does not exist or the network is down). Tandem NonStop 1+ processor (no longer supported). Tandem NonStop II processor (no longer supported). Tandem NonStop TXP processor (no longer supported). Tandem NonStop VLX processor (no longer supported). Tandem NonStop CLX processor.
Guardian Programming Reference Summary for C 522630-001 7- 33

Functions Summary (O-Q)

5 6 7 8 9

= = = = =

Tandem NonStop Cyclone processor. Tandem NonStop NSR-L processor. Tandem NonStop NSR-N, NSR-P, or NSR-K processor. Tandem NonStop NSR-W processor. Tandem NonStop NSR-G or NSR-T processor.

PROCESSSTRING_SCAN_
Scans an input string for a process string and returns the corresponding process handle or a single component of the process string converted to internal form.
#include <cextdecs(PROCESSSTRING_SCAN_)> short PROCESSSTRING_SCAN_ ( char *string /* i */ ,short length /* i */ ,[ short *length-used ] /* o */ ,[ short *processhandle ] /* o */ ,[ short *stringtype ] /* o */ ,[ char *name ] /* o */ ,[ short maxlen ] /* i */ ,[ short *namelen ] /* o */ ,[ short *cpu ] /* o */ ,[ short *pin ] ); /* o */

stringtype
0 1 2 3 = = = = Asterisk form (that is, *) Single processor form (for example, 2) Processor, PIN form (for example, 2,137) Name form (for example, $PSRV)

options
Bits 0-14 Bit 15 =1 =0 Reserved (specify 0). Device names (up to eight characters) are to be accepted in the input string. Device names are not to be accepted in the input string.

PROCESSTIME
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Returns the process execution time of any process in the network.

Guardian Programming Reference Summary for C 522630-001 7- 34

Functions Summary (O-Q)

This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 7- 35

Functions Summary (O-Q)

PROGRAMFILENAME
(superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the name of the calling processs program file. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

PURGE
(superseded by FILE_PURGE_) Deletes a disk file that is not open. This procedure operates only on Guardian objects. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

PUTPOOL
(superseded by POOL_CHECK_, POOL_DEFINE_, POOL_GETINFO_, POOL_GETSPACE_, POOL_PUTSPACE_, and POOL_RESIZE_) Returns a block of memory to a buffer pool.
#include <cextdecs(PUTPOOL)>

_cc_status PUTPOOL( short *pool-head

/* i,o */ ,char *pool-block );/* i */

_status_lt (<returned_value>) _status_eq (<returned_value>)

The data structures are invalid, or poolblock is not a block in the buffer pool. The operation is successful.

Guardian Programming Reference Summary for C 522630-001 7- 36

Functions Summary (R-Z)

This section lists functions in alphabetic order and briefly describes the syntax of each. For additional information about the functions, refer to the Guardian Procedure Calls Reference Manual.

RAISE
Note. This procedure can be called only from TNS/R native processes.

RAISE_ is the pTAL procedure name for the C raise() function. The C raise() function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and other procedure considerations, see the raise(3) function reference page either online or in the Open System Services Library Calls Reference Manual.

READ[X]
Returns data from an open file to the application processs data area.
#include <cextdecs(READ)>

_cc_status READ ( short filenum


,short _near *buffer ,short read-count ,[ short *count-read ] ,[ long tag ] ); #include <cextdecs(READX)>

/* /* /* /* /*

i o i o i

*/ */ */ */ */

_cc_status READX ( short filenum

/* ,char *buffer /* ,short read-count /* ,[ short _near *count-read ] /* ,[ long tag ] ); /*

i o i o i

*/ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8 -1

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_lt (<returned_value>)

An error occurred (call FILEINFO). Also returned following a successful read with an insertion-ordered alternate key path if the alternate key value of the current record is equal to the alternate key value in the following record along that path. A call to FILE_GETINFO_ or FILEINFO shows that error 551 occurred; this error is advisory only and does not indicate an unsuccessful read operation. The READ[X] is successful. For disk and nondisk devices, the end of file (EOF) is encountered (no more records in this subset); for the $RECEIVE file, a system message is received (call FILEINFO).

_status_eq (<returned_value>) _status_gt (<returned_value>)

READ^FILE
Reads a file sequentially. READ^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(READ_FILE )> short READ_FILE ( short _near *file-fcb ,short _near *buffer ,[ short _near *count-returned ] ,[ short prompt-count ] ,[ short max-read-count ] ,[ short nowait ] ); /* /* /* /* /* /* i o o i i i */ */ */ */ */ */

return value:
0 1 6 111 = No error. = End of file. = System message (only if user requested system messages through SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGESMANY). = Operation aborted because of BREAK (if BREAK is enabled). If nowait is not zero, and if abort-on-error is in effect, the only possible value for error is 0.

Guardian Programming Reference Summary for C 522630-001 8 -2

Functions Summary (R-Z)

READEDIT
Reads one line from a specified EDIT file and returns it to the caller in unpacked format. READEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(READEDIT)> short READEDIT ( short filenum ,[ long *record-number ] ,char *unpacked-line ,short unpacked-limit ,short *unpacked-length ,[ reserved parameter ] ,short prompt-count ,[ short spacefill ] ,[ short full-length ] ); /* /* /* /* /* i i,o o i o */ */ */ */ */ */ */ */

/* i /* i /* i

READEDITP
Reads one line from a specified EDIT file and returns it to the caller in EDIT packed line format. READEDITP is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(READEDITP)> short READEDITP ( short filenum ,[ long *record-number ] ,char *packed-line ,short packed-limit ,short *packed-length ); /* /* /* /* /* i i,o o i o */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8 -3

Functions Summary (R-Z)

READLOCK[X]
Sequentially locks and reads records in a disk file, exactly like the combination of LOCKREC and READ[X]. This procedure operates only on Guardian objects.
#include <cextdecs(READLOCK)>

_cc_status READLOCK ( short filenum


,short _near *buffer ,short read-count ,[ short *count-read ] ,[ long tag ] ); #include <cextdecs(READLOCKX)>

/* /* /* /* /*

i o i o i

*/ */ */ */ */

_cc_status READLOCKX ( short filenum

/* ,char *buffer /* ,short read-count /* ,[ short _near *count-read ] /* ,[ long tag ] ); /*

i o i o i

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The READLOCK[X] is successful. End of file (EOF). There are no more records in this subset.

READUPDATE[X]
Reads data from a disk or process file in anticipation of a subsequent write to the file.
#include <cextdecs(READUPDATE)>

_cc_status READUPDATE ( short filenum


,short _near *buffer ,short read-count ,[ short _near *count-read ] ,[ long tag ] ); #include <cextdecs(READUPDATEX)>

/* /* /* /* /*

i o i o i

*/ */ */ */ */

_cc_status READUPDATEX ( short filenum

/* ,char *buffer /* ,short read-count /* ,[ short _near *count-read ] /* ,[ long tag ] ); /*

i o i o i

*/ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8 -4

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The READUPDATE[X] is successful. A system message is received through $RECEIVE.

READUPDATELOCK[X}
Locks, then reads the record from the current position in the file in the same manner as the combination of LOCKREC and READUPDATE[X]. This procedure operates only on Guardian objects.
#include <cextdecs(READUPDATELOCK)>

_cc_status READUPDATELOCK ( short filenum


,short _near *buffer ,short read-count ,[ short *count-read ] ,[ long tag ] ); #include <cextdecs(READUPDATELOCKX)>

/* /* /* /* /*

i o i o i

*/ */ */ */ */

_cc_status READUPDATELOCKX ( short filenum


,char *buffer ,short read-count ,[ short *count-read ] ,[ long tag ] );

/* /* /* /* /*

i o i o i

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>)

An error occurred (call FILEINFO). The READUPDATELOCK[X] is successful.

RECEIVEINFO
(superseded by FILE_GETRECEIVEINFO_) Obtains the four-word process ID, message tag, error recovery (sync ID), and request-related (file number, read count, and I/O type) information associated with the last message read from the $RECEIVE file. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 8 -5

Functions Summary (R-Z)

REFPARAM_BOUNDSCHECK_
Checks the validity of parameter addresses passed to the procedure that calls it. Bounds checking performed by the system is enough for most applications. This procedure, however, provides additional checks for those few applications that might need it. Primarily, REFPARAM_BOUNDSCHECK_ verifies that a specified memory area is valid for a specified type of access (read only or read/write). Optionally, it also verifies that the specified memory area does not overlap the part of the process stack occupied by the calling procedure and any of the procedures it calls.
Note. This procedure is declared only in the EXTDECS0 file.

#include <cextdecs(REFPARAM_BOUNDSCHECK_)> short REFPARAM_BOUNDSCHECK_ ( void _far *start-address/* ,long area-len /* ,void _far *framestart /* ,short flags ) /* i i i i */ */ */ */

return value:
0 = No error. The procedure successfully executed; the specified memory area is in bounds. See Considerations for a discussion of what it means to be in bounds. The specified memory area is out of bounds. Accessing the area might cause an addressing trap or system-generated nondeferrable signal. The address is in a read-only area and the check was made for read/write access. The effect of attempting to write to the area depends on whether your process is a TNS/R native process or a TNS process: for a TNS/R native process, the system might deliver a nondeferrable signal to the process; for a TNS process, the write operation might not take effect. The address area is in bounds in an extensible segment, but disk space for the extensible segment could not be allocated. If you try to write to this area, the effect depends on whether your process is a TNS process or a TNS/R native process: a TNS process might terminate with a no memory available trap (trap 12); a TNS/R native process might receive a SIGNOMEM signal. The start-address parameter points to a location on the TOSSTACK but the calling procedure is not executing on the TOSSTACK. This error can occur only on a TNS processor. An absolute address was supplied in start-address for a TNS/R native process and flags.<14> was not set to allow this.

1 2

= =

Guardian Programming Reference Summary for C 522630-001 8 -6

Functions Summary (R-Z)

flags
Bits 0-13 Bit 14 Must be zero. =0 =1 Specifies that absolute addressing is not allowed for TNS/R native processes. Allows absolute addressing even if REFPARAM_BOUNDSCHECK_ is called from a TNS/R native process. No checking is performed and REFPARAM_BOUNDSCHECK_ returns without error. Checks the area for read/write access. Checks the area for read-only access.

Bit 15

=0 =1

REFRESH
(superseded by DISK_REFRESH_) Writes control information to the associated physical disk volumes. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

REMOTEPROCESSORSTATUS
Supplies the status of processor modules in a particular system in a network.
#include <cextdecs(REMOTEPROCESSORSTATUS)> long REMOTEPROCESSORSTATUS ( short sysnum ); /* i */

REMOTETOSVERSION
Provides an identifying letter and number indicating which version of the Guardian operating system is running on a remote system.
#include <cextdecs(REMOTETOSVERSION)> short REMOTETOSVERSION ( [ short sysid ] ); /* i */ tos-version Bits 0-7 The uppercase ASCII letter that indicates system level: A B C D TOS 1.0 1.1 1.1 and Expand

Guardian Programming Reference Summary for C 522630-001 8 -7

Functions Summary (R-Z)

Bits 0-7

The uppercase ASCII letter that indicates system level: E K L M N P Q 1.1 and Expand and the TMF subsystem Ann releases Bnn releases Cnn releases Dnn releases Fnn releases Gnn releases

Bits 8-15

The revision number of the system in binary format

RENAME
(superseded by FILE_RENAME_) Changes the name of a disk file that is open. If the file is temporary, assigning a name makes the file permanent. This procedure operates only on Guardian objects. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

REPLY[X]
Sends a reply to a message received earlier in a corresponding call to READUPDATE[X] on the $RECEIVE file.
#include <cextdecs(REPLY)>

_cc_status REPLY ( [ short _near *buffer ]


,[ ,[ ,[ ,[ short short short short write-count ] *count-written ] message-tag ] error-return ] );

/* /* /* /* /*

i i o i i

*/ */ */ */ */

#include <cextdecs(REPLYX)>

_cc_status REPLYX ( [ const char *buffer ]


,[ ,[ ,[ ,[ short short short short

/* i write-count ] /* i _near *count-written ] /* o message-tag ] /* i error-return ] ); /* i

*/ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8 -8

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>) error-return File System Error 0 1-9 10-32767

An error occurred (call FILE_GETINFO_ or FILEINFO). The REPLY[X] is successful. A warning occurred (call FILE_GETINFO_ or FILEINFO).

Condition Code Setting CCE (no error) CCG (warning) CCL (error)

REPOSITION
(superseded by FILE_RESTOREPOSITION_) Positions a disk file to a saved position. (The positioning information was saved by a call to the SAVEPOSITION procedure.)
#include <cextdecs(REPOSITION)>

_cc_status REPOSITION ( short filenum

/* i */ ,short _near *positioning-block ); /* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILE_GETINFO_ or FILEINFO). REPOSITION is successful. The file is not a disk file.

RESETSYNC
Is used by the backup process of a process pair after a failure of the primary process. RESETSYNC resynchronizes any open files whose file sychronization blocks are not checkpointed after the most recent stack checkpoint, and clears a process pairs file synchronization block.
#include <cextdecs(RESETSYNC)>

_cc_status RESETSYNC ( short filenum ); /* i */

Guardian Programming Reference Summary for C 522630-001 8 -9

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). RESETSYNC is successful. The file is not a disk file.

RESIZEPOOL
(superseded by POOL_CHECK_, POOL_DEFINE_, POOL_GETINFO_, POOL_GETSPACE_, POOL_PUTSPACE_, and POOL_RESIZE_) Changes the size of a pool that was initialized by the DEFINEPOOL procedure.
#include <cextdecs(RESIZEPOOL)> short RESIZEPOOL ( short *pool-head /* i,o */ ,long new-pool-size ); /* i */

_status_eq (<returned_value>) _status_gt (<returned_value>)

The pool was resized successfully; error contains 0. An error occurred; error contains the error value.

returned value:
0 12 21 22 29 59 = = = = = = Successful call; the size of the specified pool had been changed to newpool-size. The call would shrink the pool too much, leaving less area than that reserved by GETPOOL; the reserved blocks must be returned by a PUTPOOL. An invalid new-pool-size was specified. One of the parameters specifies an address that is out of bounds. A required parameter was not supplied. The pool is invalid and cannot be resized.

RESIZESEGMENT
Alters the size of an existing extended data segment (such as a segment created by ALLOCATESEGMENT), allowing nonprivileged users to conserve processor address space.
#include <cextdecs(RESIZESEGMENT)> short RESIZESEGMENT ( short segment-id /* i */ ,long new-segment-size ); /* i */

Guardian Programming Reference Summary for C 522630-001 8- 10

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

indicates resource allocation failure. indicates that the segment was resized successfully; error contains 0. indicates that an error occurred; error contains the error value (the specified extended segment was unaffected).

returned value:
-2 -1 0 2 12 21 24 29 43 45 = = = = = = = = = = Unable to allocate segment space. Unable to allocate page table space. Successful call; the size of the specified extended segment has been changed to new-segment-size. The seg-id parameter specified a nonexistent extended segment or the extended segment is of a type that may not be resized (see Considerations). The extended segment is a shared segment and cannot be reduced or the segment is currently being resized. An invalid new-segment-size was specified. The seg-id parameter specified a privileged segment ID (greater than 2047) and the caller was not privileged. A required parameter was not supplied. Disk space could not be allocated to accommodate the new-segment-size specified. The existing permanent swap file for the extended segment is not large enough to back the requested new-segment-size.

SAVEPOSITION
(superseded by FILE_SAVEPOSITION_) Saves a disk files current file-positioning information. The information is returned to the file system in a call to REPOSITION.
#include <cextdecs(SAVEPOSITION)>

_cc_status SAVEPOSITION ( short filenum

/* i */ ,short _near *positioning-block /* o */ ,[ short _near *positioning-blksize ] ); /* o */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). SAVEPOSITION is successful. The file is not a disk file.

Guardian Programming Reference Summary for C 522630-001 8- 11

Functions Summary (R-Z)

SEGMENT_ALLOCATE_
Allocates an extended data segment for use by the calling process.
#include <cextdecs(SEGMENT_ALLOCATE_)> short SEGMENT_ALLOCATE_ ( short segment-id /* ,[ long segment-size ] /* ,[ char *filename ] /* ,[ short length ] /* ,[ short *error-detail ] /* ,[ short pin ] /* ,[ short segment-type ] /* ,[ long *base-address ] /* ,[ long max-size ] /* ,[ short alloc-options ] );/* i i i i o i i o i i */ */ */ */ */ */ */ */ */ */

return value:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 = = = = = = = = = = = = = = = = No error. File-system error related to the creation or open of filename;.errordetail contains the file-system error number. Parameter error; error-detail contains the number of the first parameter found to be in error where 1 designates the first parameter on the left. Bounds error; error-detail contains the number of the first parameter found to be in error where 1 designates the first parameter on the left. Invalid segment-id. Invalid segment-size. Unable to allocate segment space. Unable to allocate segment page table space. Security violation when attempting to share segment. The pin parameter does not exist. The pin parameter does not have the segment allocated. Caller is trying to share segment with self. Requested shared segment is incompatible. The segment-id parameter is already allocated by this process. Unable to allocate process segment table (PST); error-detail contains the file-system error number. Part or all of the requested address range has already been allocated.

Guardian Programming Reference Summary for C 522630-001 8- 12

Functions Summary (R-Z)

alloc-options Bits 0-13 Bit 14 Reserved (specify 0) =0 =1 Bit 15 =0 =1 Allocate a selectable segment. Allocate a flat segment. If not running on a system that supports flat segments allocate a selectable segment. Return the base-address in the base address parameter. Allocate a flat segment starting at the address specified in the base-address parameter. Bit <14> must also be set to 1. If not running on a system that supports flat segments allocate a selectable segment starting at the base address %000000D (%H00080000).

SEGMENT_ALLOCATE_CHKPT_
Is called by a primary process to allocate an extended data segment for use by its backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

SEGMENT_DEALLOCATE_
Deallocates an extended data segment.
#include <cextdecs(SEGMENT_DEALLOCATE_)> short SEGMENT_DEALLOCATE_ ( short segment-id /* i */ ,[ short flags ] /* i */ ,[ short *error-detail ] ); /* o */

return value:
0 1 2 3 4 = = = = = Segment successfully deallocated. Segment deallocated, but an I/O error occurred when writing to the segment's permanent swap file; error-detail contains the file-system error number. Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. Bounds error. Segment not deallocated; error-detail contains the reason for failure.

Guardian Programming Reference Summary for C 522630-001 8- 13

Functions Summary (R-Z)

flags
Bits 0-14 Bit 15 Reserved (specify 0) =1 =0 Dirty pages in memory are not to be written to the swap file. Dirty pages in memory are to be written to the swap file.

SEGMENT_DEALLOCATE_CHKPT_
Is called by a primary process to deallocate an extended data segment in its backup process. This passive backup procedure is not supported in C programs. For a comparison of active backup and passive backup, refer to the Guardian Programmers Guide.

SEGMENT_GETBACKUPINFO_
Retrieves information about an extended segment that is allocated by the backup process in a named process pair. (No C programming information given) return value:
0 1 2 3 4 5 6 = No error. = Error occurred when attempting to obtain filename; error-detail contains the file-system error number. = Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. = Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. = The value of segment-id is out of range. = The value of segment-id is in range but not allocated by caller. = Information not obtained; error-detail contains the reason for failure. input output output:input output output output

segment-id segment-size filename:maxlen filename-len error-detail base-address

Guardian Programming Reference Summary for C 522630-001 8- 14

Functions Summary (R-Z)

SEGMENT_GETINFO_
Retrieves information about a currently allocated extended segment.
#include <cextdecs(SEGMENT_GETINFO_)> short SEGMENT_GETINFO_ ( short segment-id /* ,[ long *segment-size ] /* ,[ char *filename ] /* ,[ short maxlen ] /* ,[ short *filename-len ] /* ,[ short *error-detail ] /* ,[ long *base-address ] /* ,[ short *usage-flags ] );/* i o o i o o o o */ */ */ */ */ */ */ */

return value:
0 1 2 3 4 5 = No error. = Error occurred when attempting to obtain filename; error-detail contains the file-system error number. = Parameter error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. = Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. = The value of segment-id is out of range. = The value of segment-id is in range but not allocated by caller.

usage-flags

The bits, when set to 1, indicate the following:


Bits 0-8 Bit 9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 (Bits are reserved; 0 is returned) Segment is a flat segment. Segment is a resident cache segment. Segment is a shared segment. Segment is the currently in-use segment for the process. Segment is writeback-inhibit. Changes made to the segment are not written to the swap files. Segment is extensible. Segment is resident.

Guardian Programming Reference Summary for C 522630-001 8- 15

Functions Summary (R-Z)

SEGMENT_USE_
Selects a particular extended data segment to be currently addressable by the calling process.
#include <cextdecs(SEGMENT_USE_)> short SEGMENT_USE_ ( short new-segment-id /* i ,[ short *old-segment-id ] /* i ,[ long *base-address ] /* o ,[ short *error-detail ] );/* o */ */ */ */

return value:
0 3 4 5 = = = = No error. Bounds error; error-detail contains the number of the first parameter found to be in error, where 1 designates the first parameter on the left. The new-segment-id parameter is not allocated. The value of new-segment-id is out of range.

SEGMENTSIZE
(superseded by SEGMENT_GETBACKUPINFO_ and SEGMENT_GETINFO_) Returns the size of the specified segment in bytes. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

SENDBREAKMESSAGE
(superseded by BREAKMESSAGE_SEND_) Allows user processes to send BREAK messages to other processes. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 8- 16

Functions Summary (R-Z)

SET^FILE
Alters file characteristics and checks the old value of those characteristics it is changing. SET^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE. Native C:
Native C: #include <cextdecs(SET_FILE)> short SET_FILE ( short { *common-fcb } { *file-fcb } ,short operation ,[ short new-value ] ,[ short *old-value ] ,[ short setaddr-value ] ); C: #include <cextdecs(SET_FILE)> short SET_FILE ( short { *common-fcb } { *file-fcb } ,short operation ,[ short new-value ] ,[ short *old-value ] ); /* /* /* /* /* i i i i o */ */ */ */ */ /* /* /* /* /* /* i i i i o i */ */ */ */ */ */

SETJMP_
Saves process context in a jump buffer. This context is used when a nonlocal goto is performed by a corresponding call to the LONGJMP_ procedure.
#include <setjmp.h> jmp_buf env; int setjmp ( jmp_buf env ); /* o */

return value
0D <>0D = = Indicates that the SETJMP_ procedure was called directly. Indicates that the SETJMP_ procedure is returning as a result of a call to the LONGJMP_ procedure. The returned value is specified by LONGJMP_.

Guardian Programming Reference Summary for C 522630-001 8- 17

Functions Summary (R-Z)

SETLOOPTIMER
Aborts the caller if the caller begins looping (malfunctioning), and permits the caller to calculate the amount of processor time it has used.
#include <cextdecs(SETLOOPTIMER)>

_cc_status SETLOOPTIMER ( short new-time-limit

/* i */ ,[ short _near *old-time-limit ] );/* o */

_status_lt (<returned_value>)

The new-time-limit parameter is omitted or is specified as a negative value. The state of process loop timing and the setting of the processs loop timer are unchanged. The new-time-limit value is set into the processs loop timer and that loop timing is enabled.

_status_eq (<returned_value>)

SETMODE
Sets device-dependent functions.
#include <cextdecs(SETMODE)>

_cc_status SETMODE ( short filenum

/* ,short function /* ,[ short param1 /* ,[ short param2 /* ,[ short _near *last-params );/*

i i i i o

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The SETMODE is successful. The SETMODE function is not allowed for this device type.

Guardian Programming Reference Summary for C 522630-001 8- 18

Functions Summary (R-Z)

SETMODENOWAIT
Sets device-dependent functions with the nowait option on nowait files.
#include <cextdecs(SETMODENOWAIT)>

_cc_status SETMODENOWAIT ( short filenum

/* ,short function /* ,[ short param1 ] /* ,[ short param2 ] /* ,[ short _near *last-params ] /* ,[ long tag ] ); /*

i i i i o i

*/ */ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The SETMODENOWAIT is successful. The SETMODENOWAIT function is not allowed for this device type.

SETMYTERM
(superseded by PROCESS_SETINFO_) Permits a process to change the terminal it uses as its home terminal. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

SETPARAM
Sets and fetches various values such as the station characteristics of network addresses.
#include <cextdecs(SETPARAM)>

_cc_status SETPARAM ( short filenum

/* i */ ,short function /* i */ ,[ short _near *param-array ] /* i */ ,[ short param-count ] /* i */ ,[ short _near *last-param-array ] /* o */ ,[ short _near *last-param-count ] /* o */ ,[ short last-param-max ] /* i */ ,[ long nowait-tag ] ); /* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The SETPARAM is successful. The SETPARAM function is not allowed for this device type.

Guardian Programming Reference Summary for C 522630-001 8- 19

Functions Summary (R-Z)

function 1 2 3 4 5 6 7 8 9 20 21 22 153 = = = = = = = = = = = = = Set or fetch a remote data terminal equipment address. Set or fetch the clear cause or diagnostic bytes. Set or fetch parameters for BREAK handling. Set or fetch the reset cause or diagnostic bytes. Fetch the restart cause or diagnostic bytes. Set or fetch the 6520 and 6530 block-mode, terminal-error counters. Set or override the closed users group (CUG) number to be used in the next call-request packet. Set or fetch the protocol ID field in the outgoing call-request packet. Fetch the reason why circuit disconnected, and learn the current link status. Reset and retrieve the called data-terminal equipment (DTE) address buffer. Provide a count of the number of 64-byte segments that can be sent and received by a subdevice. Access the Level 4 ITI-protocol, block-mode timer. Fetch the 4-byte SNA sense code and the 4-byte exception response identification number (use only when SNAX exception response mode is enabled).

SETSTOP
Indicates how a process may be stopped.
#include <cextdecs(SETSTOP)> short SETSTOP ( short stop-mode ); /* i */ stop-mode 0 1 = = Stoppable by any process. Stoppable only by the super ID (255,255), a process whose process access ID equals this processs creator access ID (CAID) or the CAID group manager, or a process whose process access ID equals this processs process access ID (PAID) or the PAID group manager. Unstoppable by any other process; this mode is available to privileged users only.

Guardian Programming Reference Summary for C 522630-001 8- 20

Functions Summary (R-Z)

SETSYNCINFO
(superseded by FILE_SETSYNCINFO_) Is used by the backup process of a process pair to pass the process pairs latest synchronization block to the file system.
#include <cextdecs(SETSYNCINFO)>

_cc_status SETSYNCINFO ( short filenum

/* i */ ,short _near *sync-block );/* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). SETSYNCINFO is successful. The file is not a disk file.

SETSYSTEMCLOCK
Changes the system clock if you are a super-group user (255, n).
#include <cextdecs(SETSYSTEMCLOCK)>

_cc_status SETSYSTEMCLOCK ( long long julian-gmt /* i */


,short mode ,short tuid ); /* i */ /* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

Insufficient capability SETSYSTEMCLOCK was successful. There is a mismatch with tuid; retry after redetermining the relative error.

mode
0 1 2 3 = = = = Absolute GMT, the source is operator input. Absolute GMT, the source is the hardware clock. Relative GMT, the source is operator input. Relative GMT, the source is the hardware clock.

Guardian Programming Reference Summary for C 522630-001 8- 21

Functions Summary (R-Z)

SHIFTSTRING
(superseded by STRING_UPSHIFT_) Puts all the alphabetic characters in a string in lowercase or uppercase. Nonalphabetic characters remain unchanged. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

SIGACTION_
Note. This procedure can be called only from TNS/R native processes.

SIGACTION_ is the pTAL procedure name for the C sigaction() function. The C sigaction() function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the sigaction(2) function reference page either online or in the Open System Services System Calls Reference Manual.

SIGACTION_INIT_
Establishes the callers initial state of signal handling if default handling is not desired.
Note. This procedure can be called only from TNS/R native processes.

#include <tdmsig.h> long SIGACTION_INIT_ ( void (* handler) ( int signum ,siginfo_t * ,void * ) ); /* i */

return value:
0D -1D = = Indicates a successful outcome. Indicates an error. The reason for the error is given in the errno variable. Use the ERRNO_GET_ procedure to obtain the value of errno in a pTAL program.

Guardian Programming Reference Summary for C 522630-001 8- 22

Functions Summary (R-Z)

SIGACTION_RESTORE_
Note. This procedure can be called only from TNS/R native processes.

Restores the signal-handling state saved by a previous call to the SIGACTION_SUPPLANT_ procedure. SIGACTION_SUPPLANT_ allows a subsystem (such as a shared run-time library) to take over signal handling temporarily. SIGACTION_RESTORE_ restores the signal-handling state of the process before the subsystem exits.
#include <tdmsig.h> int SIGACTION_RESTORE_ ( sig_save_template *signal-buffer ); /* i */

returned value:
0D -1D = = Indicates a successful outcome. Indicates an error. The reason for the error is given in the errno variable: FE_EFAULT The address in signal-buffer is invalid. FE_EINVAL The content of the signal-buffer contains invalid data or SIGACTION_SUPPLANT_ was not called.

SIGACTION_SUPPLANT_
Note. This procedure can be called only from TNS/R native processes.

Allows a subsystem (such as a shared run-time library) to take over signal handling temporarily. Before exiting, the same subsystem calls SIGACTION_RESTORE_ to restore the signal-handling state established by the process before entering the subsystem.
#include <tdmsig.h> int SIGACTION_SUPPLANT_ ( void (* handler) ( int signum ,siginfo_t * ,void * ) ,sig_save_template *signal-buffer ,short length ); /* i */

/* o */ /* i */

Guardian Programming Reference Summary for C 522630-001 8- 23

Functions Summary (R-Z)

returned value:
0D -1D = = Indicates a successful outcome. Indicates an error. The reason for the error is given in the errno variable: FE_EFAULT The address in signal-buffer is out of bounds. FE_EINVAL SIG_IGN or SIG_ERR is passed to the handler. FE_ERANGE length is less than the minimum required. Use the ERRNO_GET_ procedure to obtain the value of errno in a Guardian process.

SIGADDSET_ SIGDELSET_ SIGEMPTYSET_ SIGFILLSET_ SIGISMEMBER_


These procedure names are the pTAL names for the corresponding C functions:
Procedure Name SIGADDSET_ SIGDELSET_ SIGEMPTYSET_ SIGFILLSET_ SIGISMEMBER_ Corresponding C Function sigaddset() sigdelset() sigemptyset() sigfillset() sigismember()

These functions comply with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the corresponding sigaddset(3), sigdelset(3), sigemptyset(3), sigfillset(3), and sigismember(3) function reference pages either online or in the Open System Services Library Calls Reference Manual.
Note. These procedures can be called only from TNS/R native processes.

Guardian Programming Reference Summary for C 522630-001 8- 24

Functions Summary (R-Z)

SIGJMP_MASKSET_
Saves a signal mask in a jump buffer that has already been initialized by the SIGSETJMP_ procedure. Thus, you can avoid the overhead of saving the signal mask when you call SIGSETJMP_ and instead apply the mask at a later time before performing a nonlocal goto with the SIGLONGJMP_ procedure. This technique saves setting the signal mask in applications that have many calls to SIGSETJMP_ and few calls to SIGLONGJMP_.
Note. This procedure can be called only from TNS/R native processes.

#include <tdmsig.h> long sigjmp_maskset ( jmp_buf *env /* i,o */ ,sigset_t *signal-mask );/* i */

returned value:
0D -1D = = Indicates a successful outcome. Indicates an error. The reason for the error is given in the errno variable: FE_EINVAL The jump buffer has not been initialized. Use the ERRNO_GET_ procedure to obtain the value of errno in a Guardian process.

SIGLONGJMP_
Performs a nonlocal goto. It restores the state of the calling process using context saved in a jump buffer by the SIGSETJMP_ procedure. Control returns to the location of the corresponding SIGSETJMP_ procedure call. The signal mask is also restored if it was saved; all other signal-handling specifications remain unchanged.
Note. This procedure can be called only from TNS/R native processes.

#include <setjmp.h> void siglongjmp ( sigjmp_buf env ,int value ); /* i */ /* i */

Guardian Programming Reference Summary for C 522630-001 8- 25

Functions Summary (R-Z)

SIGNAL_
SIGNAL_ is the pTAL procedure name for the C signal()function. The C signal()function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the signal(3) function reference page either online or in the Open System Services Library Calls Reference Manual.
Note. This procedure can be called only from TNS/R native processes.

SIGNALPROCESSTIMEOUT
Sets a timer based on process execution time. When the time expires, the calling process receives a system message on $RECEIVE.
#include <cextdecs(SIGNALPROCESSTIMEOUT)>

_cc_status SIGNALPROCESSTIMEOUT ( long timeout-value /* i */


,[ short param1 ] ,[ long param2 ] ,[ short _near *tag ] ); /* i */ /* i */ /* o */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

SIGNALPROCESSTIMEOUT cannot allocate a time list element (TLE). SIGNALPROCESSTIMEOUT is successful. The given timeout value is illegal, or there is a bounds error on tag.

SIGNALTIMEOUT
Sets a timer to a given number of units of elapsed time.
#include <cextdecs(SIGNALTIMEOUT)>

_cc_status SIGNALTIMEOUT ( long time-out-value

/* ,[ short param1 ] /* ,[ long param2 ] /* ,[ short _near *tag ] );/*

i i i o

*/ */ */ */

Guardian Programming Reference Summary for C 522630-001 8- 26

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

SIGNALTIMEOUT cannot allocate a time-list element (TLE). SIGNALTIMEOUT completed successfully. The given timeout value is illegal.

SIGPENDING_
SIGPENDING_ is the pTAL procedure name for the C sigpending()function. The C sigpending()function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the sigpending(2)function reference page either online or in the Open System Services System Calls Reference Manual.
Note. This procedure can be called only from TNS/R native processes.

SIGPROCMASK_
SIGPROCMASK_ is the pTAL procedure name for the C sigprocmask()function. The C sigprocmask()function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the sigprocmask(2)function reference page either online or in the Open System Services System Calls Reference Manual.
Note. This procedure can be called only from TNS/R native processes.

SIGSETJMP_
Saves process context in a jump buffer. This context is used when a nonlocal goto is performed by a corresponding call to the SIGLONGJMP_ procedure. Optionally, this procedure also saves the current signal mask.
Note. This procedure can be called only from TNS/R native processes.

#include <setjmp.h> sigjmp_buf env; long sigsetjmp ( sigjmp_buf *env ,int mask ); /* o */ /* i */

Guardian Programming Reference Summary for C 522630-001 8- 27

Functions Summary (R-Z)

returned value:
0D <>0D = =

Indicates that the SIGSETJMP_ procedure was called directly. Indicates that SIGSETJMP_ is returning as a result of a call to the SIGLONGJMP_ procedure. The returned value is specified by SIGLONGJMP_.

mask
0D <>0D = =

Specifies that the current signal mask is not to be saved. Specifies that the current signal mask is to be saved. This mask is reinstated by a corresponding call to the SIGLONGJMP_ procedure.

SIGSUSPEND_
SIGSUSPEND_ is the pTAL procedure name for the C sigsuspend() function. The C sigsuspend() function complies with the POSIX.1 standard. See the $SYSTEM.SYSTEM.HSIGNAL header file for the pTAL prototype definitions. For a discussion of each parameter and procedure considerations, see the sigsuspend(2) function reference page either online or in the Open System Services System Calls Reference Manual.
Note. This procedure can be called only from TNS/R native processes.

STEPMOM
(superseded by PROCESS_SETINFO_) Allows a process to receive process STOP or ABEND messages for a process it did not create. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

STOP
(superseded by PROCESS_STOP_) Deletes a process or a process pair and signals that the deletion was caused by a normal condition (a STOP system message is sent to the deleted processs creator). This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

Guardian Programming Reference Summary for C 522630-001 8- 28

Functions Summary (R-Z)

STRING_UPSHIFT_
Changes all the alphabetic characters in a string to uppercase.
#include <cextdecs(STRING_UPSHIFT_)> short STRING_UPSHIFT_ ( char *in-string ,short length ,char *out-string ,short maxlen ); /* /* /* /* i i o i */ */ */ */

return value:
0 1 2 3 4 = = = = = Operation successful Reserved Parameter error Bounds error String too large to fit in out-string

SUSPENDPROCESS
(superseded by PROCESS_SUSPEND_) Puts a process or process pair into the suspended state. This procedure does not have a C syntax, because it is superseded and should not be used for new development. This procedure is supported only for compatibility with previous software.

SYSTEMENYRYPOINT_RISC_
The SYSTEMENTRYPOINT_RISC_ procedure, which is defined only for TNS/R processes, returns either the 32-bit RISC address of the named entry point or, if not found, the value zero.
Note. pTAL syntax for this procedure is declared only in the EXTDECS0 file.

#include <cextdecs(SYSTEMENTRYPOINT_RISC_)> long SYSTEMENTRYPOINT_RISC_ ( char *name /* i */ ,short len );/* i */

Guardian Programming Reference Summary for C 522630-001 8- 29

Functions Summary (R-Z)

SYSTEMENTRYPOINTLABEL
Returns either the procedure label of the named entry point or a zero if no label is found.
#include <cextdecs(SYSTEMENTRYPOINTLABEL)> short SYSTEMENTRYPOINTLABEL ( char *name /* i */ ,short len ); /* i */

TAKE^BREAK
Enables BREAK monitoring for a file. TAKE^BREAK is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(TAKE_BREAK)> short TAKE_BREAK ( short _near *file-fcb ); /* i */

TEXTTOSSID
Scans a character string, expecting to find the external representation of a subsystem ID starting in the first byte (no leading spaces accepted). It returns the internal representation of the subsystem ID it finds.
#include <cextdecs(TEXTTOSSID)> short TEXTTOSSID ( char *chars ,short *ssid ,[ long *status ] ); /* i */ /* o */ /* o */

TIME
Provides the current date and time in integer form.
#include <cextdecs(TIME)> void TIME ( short _near *date-and-time ); date-and-time [0] [1] [2] [3] = = = = year month day hour (yyyy) (1-12) (1-31) (0-23) /* o */

Guardian Programming Reference Summary for C 522630-001 8- 30

Functions Summary (R-Z)

[4] [5] [6]

= = =

minute second 0.01 sec

(0-59) (0-59) (0-99)

TIMESTAMP
Provides the internal form of the processor interval clock where the application is running.
#include <cextdecs(TIMESTAMP)> void TIMESTAMP ( short _near *interval-clock ); /* o */

TOSVERSION
Provides an identifying letter and number indicating which version of the Guardian operating system is running.
#include <cextdecs(TOSVERSION)> short TOSVERSION ();

version
Bits 0-7 An uppercase ASCII letter indicating the system level: A B C D E K L M N P Q Bits 8-15 TOS 1.0 1.1 1.1 + Expand 1.1 + Expand + the TMF subsystem Ann releases Bnn releases Cnn releases Dnn releases Fnn releases Gnn releases

The revision number of the system in binary format

Guardian Programming Reference Summary for C 522630-001 8- 31

Functions Summary (R-Z)

UNLOCKFILE
Unlocks a disk file and any records in the file that are currently locked by the caller.
#include <cextdecs(UNLOCKFILE)>

_cc_status UNLOCKFILE ( short filenum /* i */


,long tag ); /* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). UNLOCKFILE was successful. The file is not a disk file.

UNLOCKREC
Unlocks a record currently locked by the caller.
#include <cextdecs(UNLOCKREC)>

_cc_status UNLOCKREC ( short filenum /* i */


,long tag ); /* i */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (call FILEINFO). The UNLOCKREC is successful. The file is not a disk file.

UNPACKEDIT
Converts a line image from EDIT packed line format into unpacked format. UNPACKEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(UNPACKEDIT)> void UNPACKEDIT ( const char *packed-line ,short packed-length ,char *unpacked-line ,short unpacked-limit ,short *unpacked-length ,[ short spacefill ] ,[ short full-length ] ); /* /* /* /* /* /* /* i i o i o i i */ */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8- 32

Functions Summary (R-Z)

USER_AUTHENTICATE_
Verifies that a user exists and optionally logs on the user. This procedure should be called in a dialog mode to allow a dialog between the security mechanism and the user.
#include <cextdecs(USER_AUTHENTICATE_)> short USER_AUTHENTICATE_ ( char *inputtext /* ,short inputtext-len /* ,[ short options ] /* ,[ long *dialog-id ] /* ,[ short *status ] /* ,[ short *status-flags ] /* ,[ char *displaytext ] /* ,[ short displaytext-maxlen ] /* ,[ short *displaytext-len ] /* ,[ short cmon-timeout ] /* ,[ char *termname ] /* ,[ short termname-len ] /* ,[ char *volsubvol ] /* ,[ short volsubvol-maxlen ] /* ,[ short *volsubvol-len ] /* ,[ char *initdir ] /* ,[ short initdir-maxlen ] /* ,[ short *initdir-len ] /* ,[ char *initprog ] /* ,[ short initprog-maxlen ] /* ,[ short *initprog-len ] /* ,[ short *initprog-type ] /* ,[ long *last-logon-time ] /* ,[ long *time-password-expires ] );/* i i i i o o o i o i i i o i o o i o o i o o o o */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

return value:
0 13 22 = = = No error. Invalid termname parameter. Parameter out of bounds. An input parameter is not within the valid range, or return information does not fit into the length of the space provided, or an output parameter overlays the stack marker that was created by calling this procedure. Missing parameter. Either this procedure is called without specifying inputtext:inputtext-len, or a parameter required by another parameter is not specified. Security violation. The user specified in inputtext:inputtext-len is undefined, or an error occurred during a dialog with Safeguard.

29

48

Guardian Programming Reference Summary for C 522630-001 8- 33

Functions Summary (R-Z)

70

Continue dialog. See the status parameter for detailed information on how to set the inputttext parameter in the next call to USER_AUTHENTICATE_. Invalid dialog-id parameter, invalid protocol, or dialog has exceeded two minutes. The text to be returned in the displaytext parameter is longer than the length specified by the displaytext-maxlen parameter.

160 563

= =

options
Bits 0-7 Bit 8 Bit 9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 status Reserved (specify 0). Echo is disabled by the caller (with a SETMODE 20) for password input. Send $CMON the Prelogon^msg message (-59). Send $CMON the Logon^msg message (-50). Do not allow the super ID (255,255) to log on. Do not allow a logon with a Guardian user ID. Require blind logon. Do not log on if $CMON has an error or timeout. Log on and update the process's attributes to reflect the user's attributes.

Values returned for error = 0:


status 0 8 Description No status. Password is valid but it is about to expire. Caller should return caution message.

Values returned for error = 48:


status 1 2 3 5 6 10 13 Description User does not exist or password is incorrect. Cannot authenticate with Guardian user ID because options bit 12 is set to 1. $CMON rejected logon. Authentication record frozen. Authentication record expired. Password expired: User cannot log on. Password change request: New password is too short. New password is rejected.

Guardian Programming Reference Summary for C 522630-001 8- 34

Functions Summary (R-Z)

14 15 16 17 18 19 20 21

Password change request: New password is too long. New password is rejected. Password change request: New password does not conform to password history (password cannot be reused). New password is rejected. Password change request: New password does not conform to password quality. New password is rejected. Password change request: New password contains blank characters. New password is rejected. Password change request: New password is not verified. The first new password provided is not the same as the second new password provided. Password change request: Change cannot be made during the allowed time period. Password change request is rejected. Password change request: Change is denied due to a system error. Retry later. Cannot authenticate the super ID because options bit 11 is set to 1.

Values returned for error = 70:


status 4 9 11 Description Caller should set inputtext to a password in the next call to USER_AUTHENTICATE_ to either log on or begin a password change. Caller should set inputtext to a password in the next call to USER_AUTHENTICATE_ to change the password. Caller must set inputtext to a password in the next call to USER_AUTHENTICATE_ to change the password, because the password has expired but the grace period is in effect. If the password is not changed, the user is not authenticated or logged on. Caller should set inputtext to a new password in the next call to USER_AUTHENTICATE_ to verify the new password.

12 status-flags Bits 0-14 Bit 15

Reserved. Caller should disable echo (with a SETMODE 20) for password input before the next call during this dialog with USER_AUTHENTICATE_.

Guardian Programming Reference Summary for C 522630-001 8- 35

Functions Summary (R-Z)

USER_GETINFO_
Returns the default attributes of the specified user. The user can be identified by user name; by Guardian user ID; or, if Safeguard is running, by alias.
#include <cextdecs(USER_GETINFO_)> short USER_GETINFO_ ( [ char *user-name ] /* ,[ short user-maxlen ] /* ,[ short *user-curlen ] /* ,[ long *user-id ] /* ,[ short *is-alias ] /* ,[ short *group-count ] /* ,[ long *group-list ] /* ,[ long *primary-group ] /* ,[ char *volsubvol ] /* ,[ short volsubvol-maxlen ] /* ,[ short *volsubvol-len ] /* ,[ char *initdir ] /* ,[ short initdir-maxlen ] /* ,[ short *initdir-len ] /* ,[ char *initprog ] /* ,[ short initprog-maxlen ] /* ,[ short *initprog-len ] /* ,[ short *default-security ] );/* i o:i i,o i,o o o o o o i o o i o o i o o */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */

error
0 11 22 No error. Default user information is returned as requested. Record not in use. The specified group name or group ID is undefined. Parameter out of bounds. An input parameter is not within the valid range, or return information does not fit into the length of the space provided, or an output parameter overlays the stack marker that was created by calling this procedure. Missing parameter. This procedure was called without specifying a required parameter. Bad parameter value. The value specified in user-curlen is greater than the value specified in user-maxlen, or the value specified in user-curlen is not within the valid range, or the value specified in user-id is not within the valid range.

29 590

default-security Bit 0-3 Bits 4-6 reserved read

Guardian Programming Reference Summary for C 522630-001 8- 36

Functions Summary (R-Z)

Bits 7-9 Bits 10-12 Bits 13-15

write execute purge

where the legitimate fields are encoded with numbers that represent the following information:
0 1 2 3 4 5 6 7 A G O not used N C U (any network user) (any network group/community user) (only the network owner) (only the local super ID) (any local user) (any local group member) (only the local owner)

USER_GETNEXT_
Returns the next user name or alias in the order in which it is stored by the security mechanism in effect. On successive calls, all user names and aliases can be obtained.
#include <cextdecs(USER_GETNEXT_)> short USER_GETNEXT_ ( [ ,[ ,[ ,[ char *user-name ] short user-maxlen ] short *user-curlen ] short *is-alias ] ); /* /* /* /* i o:i i,o i,o */ */ */ */

error
0 11 22 No error. Record not in use. The specified user name is undefined. Parameter out of bounds. An input parameter is not within the valid range, or return information does not fit into the length of the space provided, or an output parameter overlays the stack marker that was created by calling this procedure. Missing parameter. This procedure was called without specifying all the parameters. Bad parameter value. Either the value specified in user-curlen is greater than the value specified in user-maxlen or the value specified in usercurlen is not within the valid range.

29 590

Guardian Programming Reference Summary for C 522630-001 8- 37

Functions Summary (R-Z)

USERDEFAULTS
(superseded by USER_GETINFO_) Returns the default attributes of the specified user. USERDEFAULTS does not return condition codes when called from a C program.

USERIDTOUSERNAME
(superseded by USER_GETINFO_) Returns the user name, from $SYSTEM.SYSTEM.USERID, that is associated with a designated user ID.
#include <cextdecs(USERIDTOUSERNAME)>

_cc_status USERIDTOUSERNAME
( short _near *id-name ); /* i,o */

_status_lt (<returned_value>)

The value of id-name is out of bounds, or an I/O error occurred in the $SYSTEM.SYSTEM.USERID file. The designated user name returned. The specified user ID is undefined.

_status_eq (<returned_value>) _status_gt (<returned_value>)

USERNAMETOUSERID
(superseded by USER_GETINFO_) Returns the user ID, from $SYSTEM.SYSTEM.USERID, that is associated with a designated user name.
#include <cextdecs(USERNAMETOUSERID)>

_cc_status USERNAMETOUSERID
( short _near *name-id ); /* i,o */

_status_lt (<returned_value>)

The value of name-id is out of bounds, or an I/O error occurred in the $SYSTEM.SYSTEM.USERID file. The designated user ID returned. The specified user name is undefined.

_status_eq (<returned_value>) _status_gt (<returned_value>)

Guardian Programming Reference Summary for C 522630-001 8- 38

Functions Summary (R-Z)

USESEGMENT
(superseded by SEGMENT_USE_) Makes a particular extended data segment currently addressable by the calling process. You cannot call USESEGMENT directly from a C program, because it returns a value and also sets the condition-code register. To access this procedure, you must write a jacket procedure in TAL that is directly callable by your C program. For information on how to do this, see the discussion of procedures that return a value and a condition code in the C/C++ Programmers Guide. Note that the SEGMENT_USE_ procedure, which should be used in new development, does not require a jacket procedure in TAL to be called from a C program.

VERIFY USER
(superseded by USER_AUTHENTICATE_ and USER_GETINFO_) Controls logons, verifies that a user exists, and returns user-defaults information.
#include <cextdecs(VERIFYUSER)>

_cc_status VERIFYUSER ( short _near *user-name-or-id /* i */


,[ short logon ] ,[ short _near *default ] ,short default-len ); /* i */ /* o */ /* i */

_status_lt (<returned_value>)

A buffer is out of bounds, or an I/O error occurred on the user ID file ($SYSTEM.SYSTEM.USERID). Indicates a successful verification or logon, or both. There is no such user, or the password is invalid.

_status_eq (<returned_value>) _status_gt (<returned_value>)

logon
0 <> 0 Verify the user but do not log on. Verify the user and log on.

default
[0:3] [4:7] [8] [9:12] Group name, blank-filled User name, blank-filled Bits 0-7 Bits 8-15 Group ID User ID

Default volume, blank-filled

Guardian Programming Reference Summary for C 522630-001 8- 39

Functions Summary (R-Z)

[13:16] [17] Bits 0-15

Default subvolume, blank-filled Default file security, as follows: Bits 0-3 Bits 4-6 Bits 7-9 Bits 10-12 Bits 13-15 Unused Read Write Execute Purge

0 1 2 3 4 5 6 7

A (any local user) G (any local group member) O (only the local owner) Not used N (any network user) C (any network group/community user) U (only the network owner) - (only the local super ID (255, 255))

WAIT^FILE
Waits or checks for the completion of an outstanding I/O operation. WAIT^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(WAIT_FILE)> short WAIT_FILE ( short _near *file-fcb /* i */ ,[ short _near *count-read ] /* o */ ,[ long time-limit ] ); /* i */

error
0 1 6 40 111 532 No error. End of file. System message (only if user requested system messages through SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGESMANY). Operation timed out (only if time-limit is supplied and is not -1D). Operation aborts because of BREAK (if BREAK is enabled). Operation restarted.

Guardian Programming Reference Summary for C 522630-001 8- 40

Functions Summary (R-Z)

time-limit <> 0D 0D 0D 1D Wait for completion. Check for completion. (and error = 40) No completion. Willing to wait forever.

WRITE[X]
Writes data from an array in the application program to an open file.
#include <cextdecs(WRITE)>

_cc_status WRITE ( short filenum


,short _near *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] ); #include <cextdecs(WRITEX)>

/* /* /* /* /*

i i i o i

*/ */ */ */ */

_cc_status WRITEX ( short filenum


,const char *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] );

/* /* /* /* /*

i i i o i

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>)

An error occurred (call FILEINFO). The WRITE[X] is successful.

WRITE^FILE
Writes a file sequentially. The file must be open and have write or read/write access. WRITE^FILE is a sequential I/O (SIO) procedure and can be used only with files that have been opened by OPEN^FILE.
#include <cextdecs(WRITE_FILE)> short WRITE_FILE ( short _near *file-fcb /* ,short _near *buffer /* ,short write-count /* ,[ short reply-error-code ] /* ,[ short forms-control-code ] /* ,[ short nowait ] ); /* i i i i i i */ */ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8- 41

Functions Summary (R-Z)

WRITEEDIT
Accepts a line in unpacked format, converts it into EDIT packed line format, and writes it to the specified file. WRITEEDIT is an IOEdit procedure and can be used only with files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(WRITEEDIT)> short WRITEEDIT ( short filenum /* ,[ long record-number ] /* ,char *unpacked-line /* ,short unpacked-length /* ,[ short full-length ] /* ,[ long *new-record-number ] );/* i i i i i o */ */ */ */ */ */

error
10 21 45 File already includes a line with the specified record number. Specified record is too long to fit into EDIT packed line format. (The maximum is 255 bytes of packed text.) All of the files possible extents are allocated and full. You can use EXTENDEDIT to increase the files extent size and call WRITEEDIT again.

record-number
>= 0 -1 -2 -3 Specifies 1000 times the EDIT line number of the line to be written. Specifies that the line is written at the beginning of the file. Specifies that the line is written at the end of the file. Specifies that the line is written to the line represented by the files current record number.

WRITEEDITP
Accepts a line in EDIT packed line format and writes it to the specified file. WRITEEDITP is an IOEdit procedure and can be used onlywith files that have been opened by OPENEDIT or OPENEDIT_.
#include <cextdecs(WRITEEDITP)> short WRITEEDITP ( short filenum ,[ long record-number ] ,const char *packed-line ,short packed-length ); /* /* /* /* i i i i */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8- 42

Functions Summary (R-Z)

error
10 45 File already includes a line with the specified record number. All of the files possible extents are allocated and full. You can use EXTENDEDIT to increase the files extent size and call WRITEEDIT again.

record-number
>= 0 -1 -2 -3 Specifies 1000 times the EDIT line number of the line to be written. Specifies that the line is written at the beginning of the file. Specifies that the line is written at the end of the file. Specifies that the line is written to the line represented by the files current record number.

WRITEREAD[X]
Writes data to a file from an array in the application process, then waits for data to be transferred back from the file.
#include <cextdecs(WRITEREAD)>

_cc_status WRITEREAD ( short filenum


,short _near *buffer ,short write-count ,short read-count ,[ short *count-read ] ,[ long tag ] ); #include <cextdecs(WRITEREADX)>

/* /* /* /* /* /*

i i,o i i i i

*/ */ */ */ */ */

_cc_status WRITEREADX ( short filenum


,char *buffer ,short write-count ,short read-count ,[ short *count-read ] ,[ long tag ] );

/* /* /* /* /* /*

i i,o i i o i

*/ */ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>) _status_gt (<returned_value>)

An error occurred (Call FILEINFO). The WRITEREAD[X] is successful. CTRL-Y is pressed on the terminal.

Guardian Programming Reference Summary for C 522630-001 8- 43

Functions Summary (R-Z)

WRITEUPDATE[X]
Transfers data from an array in the application program to a file.
#include <cextdecs(WRITEUPDATE)>

_cc_status WRITEUPDATE ( short filenum


,short _near *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] ); #include <cextdecs(WRITEUPDATEX)>

/* /* /* /* /*

i i i o i

*/ */ */ */ */

_cc_status WRITEUPDATEX ( short filenum


,const char *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] );

/* /* /* /* /*

i i i o i

*/ */ */ */ */

_status_lt (<returned_value>) _status_eq (<returned_value>)

An error occurred (call FILEINFO). WRITEUPDATE[X] was successful.

WRITEUPDATEUNLOCK[X]
Performs random processing of records in a disk file. This procedure operates only on Guardian objects.
#include <cextdecs(WRITEUPDATEUNLOCK)>

_cc_status WRITEUPDATEUNLOCK ( short filenum


,short _near *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] ); #include <cextdecs(WRITEUPDATEUNLOCKX)>

/* /* /* /* /*

i i i o i

*/ */ */ */ */

_cc_status WRITEUPDATEUNLOCKX ( short filenum


,const char *buffer ,short write-count ,[ short *count-written ] ,[ long tag ] );

/* /* /* /* /*

i i i o i

*/ */ */ */ */

Guardian Programming Reference Summary for C 522630-001 8- 44

Functions Summary (R-Z)

_status_lt (<returned_value>) _status_eq (<returned_value>)

An error occurred (call FILEINFO). WRITEUPDATEUNLOCK[X] was successful.

XBNDSTEST
(superseded by REFPARAM_BOUNDSCHECK_) Checks stack limits and/or parameter addresses.
#include <cextdecs(XBNDSTEST)> short XBNDSTEST ( char *param /* ,short bytelen /* ,short flags /* ,long long constants );/* i i i i */ */ */ */

status
1 0 -1 -2 -3 -4 In bounds, but in a read-only segment or (on TNS/R systems only) in the system library. In bounds and writeable. Out of bounds or illegal address. Incorrectly aligned on word boundary. Undefined flag value. In bounds, but in an extensible extended data segment that cannot be extended (usually due to lack of additional disk space for the swap file).

flags
Bits 0-12 Bit 13 Bit 14 Bit 15 Must be zero. Use the extended-address limits from constants. The parameter must be word-aligned. Skip the bounds test and return 0.

Guardian Programming Reference Summary for C 522630-001 8- 45

Functions Summary (R-Z)

XSTACKTEST
(superseded by HEADROOM_ENSURE_) Checks stack limits, ensures that adequate stack space is available, and returns a set of constants to be used with the XBNDSTEST procedure.
#include <cextdecs(XSTACKTEST)> short XSTACKTEST ( short _near *firstparam ,short stackwords ,short flags ,long long *constants ); /* /* /* /* i i i o */ */ */ */

status
0 2 21 22 632 Adequate stack space available. Undefined flags value. The value of stackwords is less than 1. Bounds error on firstparm or constants. Insufficient stack space available.

flags
Bits 0-13 Bit 14 Bit 15 Must be zero. Allow parameters that use privileged addresses. Skip the stack test and return 0.

Guardian Programming Reference Summary for C 522630-001 8- 46

CONTROL Operations

For additional information about the CONTROL procedure call, refer to the Guardian Procedure Calls Reference Manual. Table 9-1. CONTROL Operation 1
Description Terminal or Line Printer Forms Control Line Printer Subtype 0,2, or 3 Description of <param> 0 115 1679 0 115 1679 Line Printer 1 or 5 0 1 2 3 4 5 6 7 8 9 10 11 16-31 Line Printer 7 0 1 2 3 4 5 6 7 8 form feed (send %014) vertical tab (send %013) skip <param> - 16 lines form feed (send %014) single space (send %6412) skip <param> - 16 lines skip to VFU channel 0 (top of form) skip to VFU channel 1 (bottom of form) skip to VFU channel 2 (single space, top-of form eject) skip to VFU channel 3 (next odd-numbered line) skip to VFU channel skip to VFU channel 5 (next one-half page) skip to VFU channel 6 (next one-fourth page) skip to VFU channel 7 (next one-sixth page) skip to VFU channel 8 (user-defined) skip to VFU channel 9 (user-defined) skip to VFU channel 10 (user-defined) skip to VFU channel 11 (user-defined) 1631skip <param> - 16 lines select VFC channel 1 (top of form) select VFC channel 2 (bottom of form) select VFC channel 3 (single space) select VFC channel 4 (skip to next double space line) select VFC channel 5 (skip to next triple space line) select VFC channel 6 (skip to next half page) select VFC channel 7 (skip to next one-fourth page) select VFC channel 8 (skip to next one-sixth page) select VFC channel 9 (bottom of form)

6 or 32

Guardian Programming Reference Summary for C 522630-001 9 -1

CONTROL Operations

Table 9-1. CONTROL Operation 1


Description Line Printer Subtype 7 Description of <param> 9 10 11 16-31 Line Printer (default DAVFU) 4 0 select VFC channel 10 (bottom of form - 1) select VFC channel 11 (top of form - 1) select VFC channel 12 (top of form) skip <param> - 16 lines skip to VFU channel 0 (top of form/line 1)

1 2 3 4 5 6 7 8 9 10 11 16-31

skip to VFU channel 1 (bottom of form/line 60) skip to VFU channel 2 (single space/line 1-60, top-ofform eject skip to VFU channel 3 (next odd-numbered line) skip to VFU channel 6 (next third line: 1,4,7,10, and so forth) skip to VFU channel 5 (next one-half page) skip to VFU channel 6 (next one-fourth page) skip to VFU channel 7 (next one-sixth page) skip to VFU channel 8 (line 1) skip to VFU channel 9 (line 1) skip to VFU channel 10 (line 1) skip to VFU channel 11(bottom of paper/line 63) skip <param> - 16 lines

Guardian Programming Reference Summary for C 522630-001 9 -2

CONTROL Operations

Table 9-2. CONTROL Operations 2 - 27


Operation 2 Description Write end of file on unstructured disk or magnetic tape. (If disk, write access is required.) A write end of file (EOF) to an unstructured disk file sets EOF to point to the relative byte address indicated by the next-record pointer and writes the new EOF setting in the file label on disk. If this new EOF setting is out of bounds, EOF is set to the last possible position. Magnetic tape, rewind and unload, do not wait for completion. Magnetic tape, take off line, do not wait for completion (treated as operation 3 for 5106 TriDensity Tape Drive). Not supported for 5130, 5160, 5170, and 5180 tape drives. Magnetic tape, rewind, leave on line, do not wait for completion. Magnetic tape, rewind, leave on line, wait for completion. Magnetic tape, space forward files. Magnetic tape, space backward files. Magnetic tape, space forward records. Magnetic tape, space backward records. Terminal or serial-connected line printer, wait for modem connect. Terminal or serial-connected line printer, disconnect the modem (that is, hang up). Issue an SNA CHASE request. SNAX exception response mode must be enabled to use operation 13. Terminal or serial-connected line printer, enable connection and initiate call to remote DTE in X.25 network. Disk, purge data. (Write access is required.) Description of <param> None

3 4

None None

5 6 7 8 9 10 11 12 13

None None number of files {0:255} number of files {0:255} number of records {0:255} number of records {0:255} None None None

17

None

20

None

Guardian Programming Reference Summary for C 522630-001 9 -3

CONTROL Operations

Table 9-2. CONTROL Operations 2 - 27


Operation 21 Description Disk, allocate or deallocate extents. (Write access is required.) Description of <param> 0: deallocate all extents past the end-of-file extent 1: <maximumextents> number of extents to allocate for a nonpartitional file (for DP2 disk files only) 1:16* number of partitions number of extents to allocate for a partitioned file None None

22 24

Cancel an AM3270 I/O operation. Magnetic tape, force end-of-volume (EOV). Next volume in set is requested and current volume is unloaded. Valid only for ANSI or IBM label tape. Requests immediate completion of all outstanding I/O requests without loss of data by the recipient of the CONTROL 26 request. Wait for DP2 disk file write.

26

None

27

This operation finishes when a WRITE, WRITEUPDATE, or WRITEUPDATEUNLOCK occurs on a DP2 disk file designated by <filenum>. Not valid for partitioned files. Do not assume that the file contains any new data when a call to CONTROL 27 finishes; assume only that it is time to check the file for new data. CONTROL 27 also finishes when a WRITE or WRITEUPDATE occurs as part of a logical undo of a transaction by the backout process or when a volume goes down. If SETMODE 146 was specified, each write completes only one CONTROL 27; otherwise, each write completes all pending CONTROL 27 operations. To ensure that no updates are missed, you should issue a nowait CONTROL 27 call on one open to a file, then read data from the file on another open, and finally wait for the CONTROL operation to finish. If CONTROL 27 were executed after reading, a write by another process could occur between the read and the CONTROL operations. The file open that is used for the CONTROL operation should have a <syncdepth> of 0. Path errors and network errors might indicate successful completion. Refer to the discussion of CONTROL operation 27 in the Guardian Programmers Guide.

Guardian Programming Reference Summary for C 522630-001 9 -4

10 SET^FILE Operations
For additional information about the SET^FILE procedure call, refer to the Guardian Procedure Calls Reference Manual. SET^FILE Operations That Set Values
new-value Parameter Entered (Optional) newblocklen old-value Parameter Entered (Optional) blocklen <operation> Parameter (Required) ASSIGN^ BLOCK BUFLEN or ASSIGN^ BLOCK LENGTH ASSIGN^ FILECODE ASSIGN^ OPENACCESS Description of Operation Requested Specifies the block length, in bytes, for the file. State of File Closed

Specifies the file code for the file. Specifies the open access for the file. The following literals are provided for openaccess: READWRITE^ACCESS(0) READ^ACCESS (1) WRITE^ACCESS (2) Even if WRITE^ACCESS is specified, SIO actually opens the file with READWRITE^ACCESS to facilitate interactive I/O. Specifies the open exclusion for the file. The following literals are provided for openexclusion: SHARE(0) EXCLUSIVE (1) PROTECTED(3) Specifies the primary extent size (in units of 2048-byte blocks) for the file.

new-filecode new-openaccess

file-code openaccess

Closed Closed

ASSIGN^ OPEN EXCLUSION

new-openexclusion

openexclusion

Closed

ASSIGN^ PRIEXT or ASSIGN^ PRIMARY EXTENTSIZE

new-priext-size

pri-extsize

Closed

Guardian Programming Reference Summary for C 522630-001 10- 1

SET^FILE Operations

<operation> Parameter (Required) ASSIGN^ RECORDLEN or ASSIGN^ RECORD LENGTH ASSIGN^ SECEXT or ASSIGN^ SECONDARY EXTENTSIZE INIT^FILEFCB

Description of Operation Requested Specifies the logical record length (in bytes) for the file. ASSIGN^RECORDLENGTH gives the default read or write count. For default values, refer to the Guardian Programmers Guide. Specifies the secondary extent size (in units of 2048-byte blocks) for the file.

new-value Parameter Entered (Optional) newrecordlen

old-value Parameter Entered (Optional) recordlen

State of File Closed

new-secext-size

sec-extsize

Closed

Specifies that the file FCB be initialized. This operation is not used when the INITIALIZER procedure is called to initialize the FCBs. It is valid only for C-series FCBs. For example: CALL SET^FILE (common^fcb,INIT^ FILEFCB); CALL SET^FILE (in^file,INIT^FILEFCB); Specifies that the file FCB be initialized. This operation is not used when the INITIALIZER procedure is called to initialize the FCB. It is valid only for D-series FCBs. For example: CALL SET^FILE (common^fcb, INIT^FILEFCB^D00); CALL SET^FILE (in^file, INIT^FILEFCB^D00); Sets or clears abort-on-transfer error for the file. If on, and a fatal error occurs during a datatransfer operation (such as a call to any SIO procedure except OPEN^FILE), all files are closed and the process abnormally ends. If off, the file system or SIO procedure error number returns to the caller.

must be omitted

must be omitted

Closed

INIT^FILEFCB ^ D00

must be omitted

must be omitted

Closed

SET^ABORT^ XFERERR

new-state

state

Open

Guardian Programming Reference Summary for C 522630-001 10- 2

SET^FILE Operations

<operation> Parameter (Required) SET^ BREAKHIT

Description of Operation Requested Sets or clears break hit for the file. This is used only if the user is handling BREAK independently of the SIO procedures, or if the user has requested BREAK system messages through SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGES MANY. Sets or clears the checksum word in the FCB. This is useful after modifying an FCB directly (that is, without using the SIO procedures). Sets the physical I/O count, in bytes, transferred for the file. This is used only if nowait I/O is in effect and the user is making the call to AWAITIO for the file. This is the counttransferred parameter value returned from AWAITIO. Sets or clears carriage return/line feed (CR/LF) on BREAK for the file. If on, a CR/LF is executed on the terminal when the BREAK key is pressed. Specifies that the following READ^FILE is to begin at the position set in the sequential block buffer (second through fourth words). For example: CALL SET^FILE(EDIT^FCB, SET^EDITREAD^ REPOSITION); See discussion of the SET^EDITREAD^ REPOSITION operation in the Guardian Programmers Guide.

new-value Parameter Entered (Optional) new-state

old-value Parameter Entered (Optional) state

State of File

SET^ CHECKSUM

newchecksumword

fcb-checksumword

SET^ COUNTXFER RED

new-count

count

Open

SET^CRLF^ BREAK

new-state

state

Open

SET^ EDITREAD^ REPOSITION

must be omitted

must be omitted

Open

Guardian Programming Reference Summary for C 522630-001 10- 3

SET^FILE Operations

<operation> Parameter (Required) SET^ERROR

Description of Operation Requested Sets file-system error code value for the file. This is used only if nowait I/O is in effect and the user makes the call to AWAITIO for the file. This is the error parameter value returned from FILEINFO. Sets or clears physical I/O outstanding for the file specified by file-fcb. This is used only if nowait I/O is in effect and the user makes the call to AWAITIO for the file. Sets or clears print error message for the file. If on and a fatal error occurs, an error message is displayed on the error file. This is the home terminal unless otherwise specified. Sets interactive prompt for the file. See the OPEN^FILE procedure. Sets return end of file (EOF) on process close for $RECEIVE file. This causes an EOF indication to be returned from READ^FILE when the receive open count goes from 1 to 0. The setting for return EOF has no meaning if the user is monitoring open and close messages. If the file is opened with readonly access, the setting defaults to on for return EOF. Sets receive open count for the $RECEIVE file. This operation is intended to clear the count of openers when an open already accepted by the SIO procedures is subsequently rejected by the user. See SET^ RCVUSEROPENREPLY.

new-value Parameter Entered (Optional) new-error

old-value Parameter Entered (Optional) error

State of File Open

SET^ PHYSIOOUT

new-state

state

Open

SET^PRINT^ ERR^MSG

new-state

state

Open

SET^PROMPT

newpromptchar new-state

promptchar state

Open

SET^RCVEOF

Open

SET^RCV OPENCNT

newreceiveopencount

receiveopencount

Open

Guardian Programming Reference Summary for C 522630-001 10- 4

SET^FILE Operations

<operation> Parameter (Required) SET^ RCVUSER OPENREPLY

Description of Operation Requested Sets user-will-reply for the $RECEIVE file. This is used if the SIO procedures are to maintain the opener's directory, thereby limiting opens to a single process or a process pair but keeping the option to reject opens. If state is 1, an error of 6 returns from a call to READ^FILE when an open message is received and is the only current open by a process or a process pair. If an open is attempted by a process and an open is currently in effect, the open attempt is rejected by the SIO procedures; no return is made from READ^FILE because of the rejected open attempt. If state is 0, a return from READ^FILE is made only when data is received. Note: If open message = 1 is specified to SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGES MANY, the setting of SET^RCVUSEROPENREPLY has no meaning. An error of 6 returns from READ^FILE if an open message is accepted by the SIO procedures. Sets or clears read-trailingblank-trim for the file. If on, the count-read parameter does not account for trailing blanks.

new-value Parameter Entered (Optional) new-state

old-value Parameter Entered (Optional) state

State of File Open

SET^READ^ TRIM

new-state

state

Open

Guardian Programming Reference Summary for C 522630-001 10- 5

SET^FILE Operations

<operation> Parameter (Required) SET^SYSTEM MESSAGES

Description of Operation Requested Sets system message reception for the $RECEIVE file. Setting a bit in the sys-msg-mask indicates that the corresponding message is to pass back to the user. Default action is for the SIO procedures to handle all system messages. sys-msg-mask[0] Bit 0 =BREAK message Bit 1 =unused Bit 2 =CPU down message Bit 3 =CPU up message Bit 4 =unused Bit 5 =process deletion message if D-series format; STOP message if C-series format Bit 6 =unused if D-series format; ABEND message if Cseries format Bit 7 =unused Bit 8 =unused if D-series format; MONITORNET message if C-series format BIt 9 =unused Bit 10 =open message Bit 11 =close message Bit 12 =CONTROL message Bit 13 =SETMODE message Bit 14 =RESETSYNC message Bit 15 =unused

new-value Parameter Entered (Optional) new-sysmsg-mask

old-value Parameter Entered (Optional) sys-msgmask

State of File Open

Guardian Programming Reference Summary for C 522630-001 10- 6

SET^FILE Operations

<operation> Parameter (Required) SET^SYSTEM MESSAGES (continued)

Description of Operation Requested The user replies to the system messages designated by this operation by using WRITE^FILE. If no WRITE^FILE is encountered before the next READ^FILE, a reply-error-code = 0 is made automatically. Note that this operation cannot set some of the newer system messages; for these, use SET^SYSTEMMESSAGESM ANY. Sets or clears the traceback feature. When traceback is active, the SIO facility appends the caller's P-relative address to all error messages. Sets user flag for the file. The user flag is a one-word value in the FCB that the user can manipulate to maintain information about the file. Sets or clears write-fold for the file. If on, write^file operations exceeding the record length cause multiple logical records to be written. If off, write^file operations exceeding the record length are truncated to recordlength bytes; no error message or warning is given. Sets or clears write-blank-pad for the file. If on, write^file operations of less than recordlength bytes, including the last record if WRITE^FOLD is in effect, are padded with trailing blanks to fill out the logical record. Sets or clears write-trailingblank-trim for the file. If on, trailing blanks are trimmed from the output record before being written to the line.

new-value Parameter Entered (Optional) new-sysmsg-mask

old-value Parameter Entered (Optional) sys-msgmask

State of File Open

SET^TRACE BACK

new-state

old-state

SET^ USERFLAG

new-userflag

userflag-infcb

Open

SET^ WRITE^ FOLD

new-state

state

SET^ WRITE^ PAD

new-state

state

Open

SET^ WRITE^ TRIM

new-state

state

Open

Guardian Programming Reference Summary for C 522630-001 10- 7

SET^FILE Operations

SET^FILE Operations That Set Addresses


<new-value> Parameter Entered (Optional) @filename <old-value> Parameter Entered (Optional) filename FOR 12 (2byte) words

<operation> Parameter (Required) ASSIGN^ FILENAME

Description of Operation Requested Specifies the physical name of the file to be opened. For example: CALL SET^FILE (in^file, ASSIGN^FILENAME,@in^ filename); Specifies the logical name of the file to be opened. The logical-filename must be encoded as follows: Byte NumberContents [0] len [1] through [7] logicalfilename len is the length of the logical file name {0:7}. Specifies a duplicate file for the file. This is a file where data read from file-fcb is printed. The default action is no duplicate file. For example: CALL SET^FILE(in^file,SET^DUP FILE, @out^file); Sets error reporting file for all files. Defaults to home terminal. If the error reporting file is not open when needed by the SIO procedures, it is opened for the duration of the message printing and then closed.

State of File Closed

ASSIGN^ LOGICAL FILENAME

@logicalfilename

@logicalfilename FOR 4 (2byte) words

Closed

SET^DUPFILE

@new-dupfile-fcb

@dupfile-fcb

Open

SET^ ERRORFILE

@newerrorfile-fcb

@errorfile-fcb

Guardian Programming Reference Summary for C 522630-001 10- 8

SET^FILE Operations

<operation> Parameter (Required) SET^ OPENERS PHANDLE

Description of Operation Requested Sets the allowable openers processhandle for $RECEIVE file. This is used to restrict the openers of this process to a specified process. A typical example is using the SIO procedures to read the startup message. This operation is valid only for D-series FCBs. Note: If open message = 1 is specified to SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGES MANY, the setting of SET^OPENERSPHANDLE has no meaning. Sets the allowable openers process-id for $RECEIVE file. This is used to restrict the openers of this process to a specified process. A typical example is using the SIO procedures to read the startup message. This is valid only for C-series FCBs. Note: If open message = 1 is specified to SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGES MANY, the setting of SET^OPENERSPID has no meaning.

<new-value> Parameter Entered (Optional) @openersprocess handle

<old-value> Parameter Entered (Optional) @openersprocess handle FOR 10 words

State of File Open

SET^OPENERS PID

@openerspid

openerspid FOR 4 words

Open

Guardian Programming Reference Summary for C 522630-001 10- 9

SET^FILE Operations

<operation> Parameter (Required) SET^SYSTEM MESSAGES MANY

Description of Operation Requested Sets system message reception for the $RECEIVE file. sys-msg-maskwords is a four-word mask. Setting a bit in sys-msgmask-words indicates that the corresponding message is to pass back to the user. Default action is for the SIO procedures to handle all system messages. sys-msg-mask-words[0] Bits 0-1 = unused Bit 2 = CPU down message Bit 3 = CPU up message Bit 4 = unused Bit 5 = process deletion message if D-series format Bit 6 = unused if D-series format Bit 7 = unused Bit 8 = unused if D-series format; MONITORNET message if C-series format Bit 9 = job creation Bit 10 = SETTIME message Bit 11 = power on message Bit 12 = NEWPROCESSNOWAIT message Bits 13-15 = unused

<new-value> Parameter Entered (Optional) @new-sysmsg-maskword

<old-value> Parameter Entered (Optional) sys-msgmaskwords

State of File Open

SET^SYSTEM MESSAGES MANY (continued: word 0)

Guardian Programming Reference Summary for C 522630-001 10 -10

SET^FILE Operations

<operation> Parameter (Required) SET^SYSTEM MESSAGES MANY (continued: word 1)

Description of Operation Requested sys-msg-mask-words[1] Bits 0-3 = unused Bit 4 = BREAK message Bit 5 = unused Bit 6 = time signal message (NonStop II systems only) BIt 7 = memory lock completion message (NonStop II systems only) Bit 8 = memory lock failure message (NonStop II systems only) Bits 9-13 = unused BIt 14 = open message Bit 15 = close message sys-msg-mask-words[2] Bit 0 = CONTROL message Bit 1 = SETMODE message Bit 2 = RESETSYNC message BIt 3 = CONTROLBUF message Bits 4-7 = unused Bit 8 = device-type inquiry if D-series format Bits 9-15 = unused

<new-value> Parameter Entered (Optional) @new-sysmsg-maskword

<old-value> Parameter Entered (Optional) sys-msgmaskwords

State of File Open

SET^SYSTEM MESSAGES MANY (continued: word 2)

Guardian Programming Reference Summary for C 522630-001 10 -11

SET^FILE Operations

<operation> Parameter (Required) SET^SYSTEM MESSAGES MANY (continued: word 3)

Description of Operation Requested sys-msg-mask-words[3] Bit 0 = nowait PROCESS_CREATE_ completion Bit 1 = subordinate name inquiry Bit 2 = nowait get info by name completion Bit 3 = nowait FILENAME_FINDNEXT_ completion Bit 4 = loss of communication with node Bit 5 = establishment of communication with node Bit 6 = remote CPU down Bit 7 = remote CPU up Bits 8-15 = unused

<new-value> Parameter Entered (Optional) @new-sysmsg-maskword

<old-value> Parameter Entered (Optional) sys-msgmaskwords

State of File Open

Guardian Programming Reference Summary for C 522630-001 10 -12

11 SETMODE Operations
For additional information about the SETMODE procedure call, refer to the Guardian Procedure Calls Reference Manual.
<function> 1 Parameters and Effect Disk: Set file security param1 Bit 0 = 1 for program files only, sets accessor's ID to program file's ID when program file is run (PROGID option). Bit 1 = 1 sets CLEARONPURGE option on. This means all data in the file is physically erased from the disk (set to zeros) when the file is purged. If this option is not on, the disk space is only logically deallocated on a purge; the data is not destroyed, and another user might be able to examine the "purged" data when the space is reallocated to another file. Bits 4-6 = ID allowed for reading Bits 7-9 = ID allowed for writing Bits 10-12 = ID allowed for execution Bits 13-15 = ID allowed for purging For each of the fields from bits 4-6 through bits 13-15, the value can be any one of the following: 0 = member local ID 1 = member of owner's group (local) 2 = owner (local) 4 = any network user (local or remote) 5 = member of owner's community 6 = local or remote user having same ID as owner 7 = local super ID only Refer to the Guardian Programmers Guide or the File Utility Program (FUP) Reference Manual for an explanation of local and remote users, communities, and related topics. Theparam2 parameter is not used with function 1. If this SETMODE function is used on a file that is protected by a Safeguard disk-file authorization record, and if the user is not logged on as the super ID (255, 255) on the system where the file is located, error 199 is returned. This function operates only on Guardian objects. If an OSS file is specified, file-system error 2 occurs. 2 Disk: Set file owner ID param1 Bits 0-7 = group ID Bits 8-15 = member ID Theparam2 parameter is not used with function 2. If this SETMODE function is used on a file that is protected by a Safeguard disk-file authorization record, and if the user is not logged on as the super ID (255, 255) on the system where the file is located, error 199 is returned.
Guardian Programming Reference Summary for C 522630-001 11- 1

SETMODE Operations

<function> 3

Parameters and Effect Disk: Set write verification param1 bit 15 = 0 verified writes off (default). = 1 verified writes on. Theparam2 parameter is used with DP2 disk files only. param2 = 0 change the open option setting of the verify writes option (default). = 1 change the file label default value of the verify writes option. Disk: Set lock mode param1 = 0 normal mode (default): request is suspended when a read or lock is attempted and an established record lock or file lock is encountered. = 1 reject mode: request is rejected with file-system error 73 when a read or lock is attempted and an established record lock or file lock is encountered. No data is returned for the rejected request. = 2 read-through/normal mode: READ or READUPDATE ignores record locks and file locks; encountering a lock does not delay or prevent reading of a record. The locking response of LOCKFILE, LOCKREC, READLOCK, and READUPDATELOCK is the same as in normal mode (mode 0). = 3 read-through/reject mode: READ or READUPDATE ignores record locks and file locks; encountering a lock does not delay or prevent reading of a record. The locking response of LOCKFILE, LOCKREC, READLOCK, and READUPDATELOCK is the same as in reject mode (mode 1). = 6 read-warn/normal mode: READ or READUPDATE returns data without regard to record and file locks; however, encountering a lock causes warning code 9 to be returned with the data. The locking response of LOCKFILE, LOCKREC, READLOCK, and READUPDATELOCK is the same as in normal mode (mode 0). = 7 read-warn/reject mode: READ or READUPDATE returns data without regard to record and file locks; however, encountering a lock causes warning code 9 to be returned with the data. The locking response of LOCKFILE, LOCKREC, READLOCK, and READUPDATELOCK is the same as in reject mode (mode 1). Theparam2 parameter must be 0, if supplied.

Guardian Programming Reference Summary for C 522630-001 11- 2

SETMODE Operations

<function> 5

Parameters and Effect Line printer: Set system automatic perforation skip mode (assumes standard VFU function in channel 2) param1 bit 15 = 0 off, 66 lines per page = 1 on, 60 lines per page (default) For the 5530 line printer: param1 = 0 disable automatic perforation skip. = 1 enable automatic perforation skip (default). Theparam2 parameter is not used with function 5. Terminal: Set system auto line feed after receipt of carriage return line termination (default mode is configured) param1 bit 15 = 0 LFTERM line feed from terminal or network (default) = 1 LFSYS system provides line feed after line termination by carriage return Theparam2 parameter sets the number of retries of I/O operations. Terminal: Set system auto line feed after receipt of carriage return line termination (default mode is configured) param1 bit 15 = 0 LFTERM line feed from terminal or network (default) = 1 LFSYS system provides line feed after line termination by carriage return Terminal: Set system transfer mode (default mode is configured) param1 bit 15 = 0 conversational mode = 1 page mode Theparam2 parameter sets the number of retries of I/O operations Note: Theparam2 parameter is used only with 6530 terminals. Terminal: Set interrupt characters param1 Bits 0-7 = character 1 Bits 8-15 = character 2 param2 Bits 0-7 = character 3 Bits 8-15 = character 4 (Default for conversational mode is backspace, line cancel, end of file, and line termination. Default for page mode is page termination.) See discussion of interrupt characters in the Guardian Programmers Guide.

Guardian Programming Reference Summary for C 522630-001 11- 3

SETMODE Operations

<function> 10

Parameters and Effect Terminal: Set parity checking by system (default is configured) param1 bit 15 = 0 no checking = 1 checking Theparam2 parameter is not used with function 10. Terminal: Set break ownership param1 = 0 means BREAK disabled (default setting). = any positive value means enable BREAK. Terminal access mode after BREAK is typed: param2 = 0 normal mode (any type file access is permitted) = 1 BREAK mode (only BREAK-type file access is permitted) Refer to the discussion of Communicating With Terminals in the Guardian Programmers Guide. Terminal: Set terminal access mode param1 bit 15 = 0 normal mode (any type file access is permitted) = 1 BREAK mode (only BREAK-type file access is permitted) File access type: param2 bit 15 = 0 normal access to terminal = 1 BREAK access to terminal Refer to the discussion of Communicating With Terminals in the Guardian Programmers Guide.

11

12

13

Terminal: Set system read termination on ETX character (default is configured) param1 = 0 no termination on ETX = 1 termination on first character after ETX = 3 termination on second character after ETX Theparam2 parameter is used, with ATP6100 only, to specify the value of the ETX character. No changes occur to the read termination on ETX as specified by param1 if you do not specify an ETX character or if you set param2 to 0 (setting the ETX character to 0 is not allowed). Terminal: Set system read terminal on interrupt characters (default is configured) param1 bit 15 = 0 no termination on interrupt characters (that is, transparency mode) = 1 termination on any interrupt character Theparam2 parameter is not used with function 14. Terminal: Set retry parameters Terminal: Set line parameters
Guardian Programming Reference Summary for C 522630-001 11- 4

14

15 16

SETMODE Operations

<function> 17 18 19 20

Parameters and Effect Terminal: Set maximum frame size and secondary addresses Terminal: Set statistics threshold, flag fill, and window size Terminal: Set transaction parameters and set extended control field size Terminal: Set system echo mode (default is configured) param1 bit 15 = 0 system does not echo characters as read = 1 system echoes characters as read Theparam2 parameter is not used with function 20.

SETMODEs 15, 16, 17, 18 and 19 are described in the EnvoyACP/XF Reference Manual.

Guardian Programming Reference Summary for C 522630-001 11- 5

SETMODE Operations

22

Line printer (subtype 3, 4, 6, and 32) or terminal: Set baud rate param1 = 0 baud rate = 50 1 baud rate = 75 2 baud rate = 110 3 baud rate = 134.5 4 baud rate = 150 5 baud rate = 300 6 baud rate = 600 7 baud rate = 1200 8 baud rate = 1800 9 baud rate = 2000 10 baud rate = 2400 11 baud rate = 3600 12 baud rate = 4800 13 baud rate = 7200 14 baud rate = 9600 15 baud rate = 19200 16 baud rate = 200 17 baud rate = 38400 (5577 printer only) Theparam2 parameter is not used with function 22 except when specifying split baud rates with the LIU-4 controller (see below).
Note:

The 5520 line printer supports only the 110, 150, 300, 600, 1200, 2400, 4800, and 9600 baud rates. The 5530 line printer supports only the 75,150, 300, 600, 1200, 2400, 4800, and 9600 baud rates. If no baud rate is specified at SYSGEN, then 9600 baud is used. The default rate is what was specified at SYSGEN. The asynchronous controller supports only the 150, 300, 600, 1200, and 1800 baud rates. An ATP6100 line configured on an LIU-4 controller allows an application to set different transmission (TX) and receiving (RX) baud rates with function 22. You have the option of setting split rates by specifying the TX rate in param1 and the RX rate in param2. You can set nonsplit rates by the normal method (that is, by specifying values for param1 as listed at the beginning of the description of function 22. The LIU-4 does not support 3600 or 38400 baud rates.)

Guardian Programming Reference Summary for C 522630-001 11- 6

SETMODE Operations

22, continued

You can specify split baud rates with the LIU-4 controller as follows. Note that the values for param1 all have bit 0 set to 1: param1 = 128 TX baud rate = 50 129 TX baud rate = 75 130 TX baud rate = 110 131 TX baud rate = 134.5 132 TX baud rate = 150 133 TX baud rate = 300 134 TX baud rate = 600 135 TX baud rate = 1200 136 TX baud rate = 1800 137 TX baud rate = 2000 138 TX baud rate = 2400 140 TX baud rate = 4800 141 TX baud rate = 7200 142 TX baud rate = 9600 143 TX baud rate = 19200 144 TX baud rate = 200 param2 = 0 RX baud rate = 50 1 RX baud rate = 75 2 RX baud rate = 110 3 RX baud rate = 134.5 4 RX baud rate = 150 5 RX baud rate = 300 6 RX baud rate = 600 7 RX baud rate = 1200 8 RX baud rate = 1800 9 RX baud rate = 2000 10 RX baud rate = 2400 12 RX baud rate = 4800 13 RX baud rate = 7200 14 RX baud rate = 9600 15 RX baud rate = 19200 16 RX baud rate = 200 If you specify split baud rates with the LIU-4 controller, the last-params parameter returns the following values: last-params[0] bits 0-7 param1 value (TX) bits 8-15 param2 value (RX) last-params[1]undefined

23

Terminal: Set character size param1 = 0 character size = 5 bits 1 character size = 6 bits 2 character size = 7 bits 3 character size = 8 bits Theparam2 parameter is not used with function 23.
Guardian Programming Reference Summary for C 522630-001 11- 7

SETMODE Operations

24

Terminal: Set parity generation by system param1 = 0 parity = odd 1 parity = even 2 parity = none Theparam2 parameter is not used with function 24. Line printer (subtype 3): Set form length param1 = length of form in lines Theparam2 parameter is not used with function 25. Line printer (subtype 3): Set or clear vertical tabs param1 = 0 is (line#-1) of where tab is to be set. = -1 clear all tabs (except line 1). Note: A vertical tab stop always exists at line 1 (top of form). Theparam2 parameter is not used with function 26. Line printer or terminal: Set system spacing mode param1 bit 15 = 0 postspace (default setting) = 1 prespace Theparam2 parameter is not used with function 27. Line printer or terminal: Reset to configured values param1 = 0 (default) resets printer to its configured values = 1 resets only soft parameters = 2 resets only hard parameters Theparam2 parameter is not used with function 28. For the 5530 line printer, SETMODE 28 resets all the SETMODE parameters back to their SYSGEN values and also reinitializes the printer.
Note:

25

26

27

28

SETMODE 29 (set auto answer or control answer mode) is the only SETMODE function not affected by a SETMODE 28.

Guardian Programming Reference Summary for C 522630-001 11- 8

SETMODE Operations

29

Line printer (subtype 3, 4, 6, or 32): Set automatic answer mode or control answer mode. param1 bit 15 = 0 CTRLANSWER = 1 AUTOANSWER (default) The default mode is what was specified at SYSGEN; if no mode is specified at SYSGEN, then AUTOANSWER is used. Theparam2 parameter is not used with function 29. Note: SETMODE function 29 remains in effect even after the file is closed. SETMODE 29 is the only SETMODE function not affected by a SETMODE 28. SETMODE 29 is not reset at the beginning of each new job. Therefore, you should always issue a SETMODE 29 at the beginning of your job to ensure that you are in the desired mode (rather than in the mode left by the previous job). Allow nowait I/O operations to finish in any order. param1 = 0 complete operations in the order they were originally requested (default). = 1 complete operations in any order, except that if more than one operation is ready to finish at the time of the AWAITIO[X] call, then complete them in the order they were requested. = 3 complete operations in any order (that is, in the order chosen by the system). Theparam2 parameter is not used with function 30 and should be zero if supplied. Set packet mode param1 bit 0 = 0 ignore param2. = 1 param2 specifies leading packet size. param2 = 0 use default packet size for transmission (default). > 0 is size of first outgoing packet in each WRITE or WRITEREAD request. It must be smaller than the configured packet size. Set X.25 call setup parameters param1 bit 0 = 0 do not accept charge. = 1 accept charge. bit 1 = 0 do not request charge. = 1 request charge. bit 2 = 0 is normal outgoing call. = 1 is priority outgoing call. bits 8-15 = port number (0-99)

30

31

32

Guardian Programming Reference Summary for C 522630-001 11- 9

SETMODE Operations

33

To determine the actual value for port number, refer to specifications on your own network. Seven-track tape drive: Set conversion mode param1 = 0 ASCIIBCD (even parity) (default) = 1 BINARY3TO4 (odd parity) = 2 BINARY2TO3 (odd parity) = 3 BINARY1TO1 (odd parity) Allow requests to be queued on $RECEIVE based on process priority param1 bit 15 = 0 use first-in-first-out (FIFO) ordering (default). = 1 use process priority ordering. Theparam2 parameter is not used with function 36. Line printer (subtype 1, 4, 5, or 6): Get device status Theparam1 parameter is not used with function 37. Theparam2 parameter is not used with function 37. last-params = status of device. Status values are: last-params for printer (subtype 1 or 5) (only last-params[0] is used) All other bits are undefined. bit 5 = DOV, data overrun 0 = no overrun 1 = overrun occurred bit 7 = CLO, connector loop open 0 = not open 1 = open (device unplugged) bit 8 = CID, cable identification 0 = old cable 1 = new cable bit 10 = PMO, paper motion 0 = not moving 1 = paper moving bit 11 = BOF, bottom of form 0 = not at bottom 1 = at bottom bit 12 = TOF, top of form 0 = not at top 1 = at top bit 13 = DPE, device parity error 0 = parity OK 1 = parity error bit 14 = NOL, not on line 0 = on line 1 = not on line bit 15 = NRY, not ready 0 = ready 1 = not ready
Note:

36

37

Ownership, Interrupt Pending, Controller Busy, and Channel Parity errors are not returned in last-params; your application program "sees" them as normal file errors. Also, CID must be checked when PMO, BOF, and TOF are tested, because the old cable version does not return any of these states.
Guardian Programming Reference Summary for C 522630-001 11 -10

SETMODE Operations

37, continued

last-params for printer (subtype 4) last-params [0] = primary status returned from printer: bits 9-11 = full status field 0 = partial status 1 = full status 2 = full status / VFU fault 3 = reserved for future use 4 = full status / data parity error 5 = full status / buffer overflow 6 = full status / bail open 7 = full status / auxiliary status available bit 12 = buffer full 0 = not full 1 = full bit 13 = paper out 0 = OK 1 = paper out bit 14 = device power on 0 = OK 1 = POWER ON error bit 15 = device not ready 0 = ready 1 = not ready All other bits are undefined. last-params [1] =auxiliary status word if last-params [0] bits 9-11 = 7; auxiliary status word is as follows: bits 9-13 = auxiliary status 0= no errors this field 1= no shuttle motion 2= character generator absent 3= VFU channel error 4-31= reserved for future use bits 14-15 =always 3 All other bits are undefined. last-params for printer (subtype 6) last-params[0] contains the primary status. [1] contains the auxiliary status.

Guardian Programming Reference Summary for C 522630-001 11 -11

SETMODE Operations

37, continued

Primary status bits are: [0] bits 0-8 = 0 undefined bit 9 = 1 reserved bits 10-12 = 0 no faults = 1 printer idle = 2 paper out = 3 end of ribbon = 4 data parity error = 5 buffer overflow = 6 cover open = 7 auxiliary status available bit 13 = 0 buffer not full = 1 buffer full bit 14 = 0 OK = 1 device power on error bit 15 = 0 OK = 1 device not ready If primary status last-params[0] bits 10-12 = 7, auxiliary status word is: [1] bits 0-7 = undefined bits 8-11 = fault display status (most significant hex digit) bits 12-15 = fault display status (least significant hex digit) Fault display status summary: Operator Aux Status Aux StatusProblem Display bits 8-11. Bits 12-15 Description None 00 No faults E01 01 Paper out E03 03 Cover open E06 06 End of ribbon E07 07 Break E11 11 Parity error E12 12 Unprintable character E22 22 Carrier loss E23 23 Buffer overflow E30 30 Printwheel motor fault E31 31 Carriage fault E32 32 Software fault E34 34 Hardware fault

Guardian Programming Reference Summary for C 522630-001 11 -12

SETMODE Operations

38

Terminal: Set special line-termination mode and character param1 = 0 sets special line-termination mode. param2 is the new line-termination character. The line-termination character is not counted in the length of a read. No system-supplied carriage return or line feed is issued at the end of a read (see note on cursor movement below). = 1 sets special line-termination mode. param2 is the new line-termination interrupt character. The line-termination character is counted in the length of a read. No system-supplied carriage return or line feed is issued at the end of a read (see note on cursor movement below). = 2 resets special line-termination mode. The line-termination interrupt character is restored to its configured value. param2 must be present but is not used. param2 = the new line-termination interrupt character (passed in bits 8-15) if param1 = 0 or 1. last-params If present, returns the current mode in last-params [0] and the current line-termination interrupt character in last-params [1].
Note:

Although the cursor typically will not move when 0 or 1 is specified for param1, these options do not turn off ECHO. Therefore, if the termination character is one which would normally cause cursor movement (such as a LF or CR) and ECHO is enabled, cursor movement will occur.

SETMODEs 40-49 are reserved for the Exchange products. Refer to the Exchange reference manuals for details.

Guardian Programming Reference Summary for C 522630-001 11 -13

SETMODE Operations

50

Enable/disable 3270 COPY param1 = 0 suppress COPY = 1 allow COPY Get/set 3270 status param1 status flags mask to set Theparam2 parameter is not used with function 51. Refer to the Device-Specific Access MethodsAM3270/TR3271 manual for the flags mask information. Tape drive: Set short write mode param1 = 0 allow writes shorter than 24 bytes; a record shorter than 24 bytes is padded with zeros to a length of 24 bytes (default). = 1 disallow writes shorter than 24 bytes. = 2 allow writes shorter than 24 bytes; no padding is done on records shorter than 24 bytes. Theparam2 parameter is not used with function 52.
Note:

51

52

When short writes are disallowed, an attempt to WRITE or WRITEUPDATE a record that is shorter than 24 bytes causes error 21 (bad count) to be issued. 53 Enable/disable receipt of status param1 = 0 disable status receive = 1 enable status receive param2= the response ID Return control unit and device assigned to subdevice Theparam1 parameter is not used with function 54. Theparam2 parameter is not used with function 54. last-params [0] Bits 0-7 = 0 Bits 8-15 = subdevice number known by AM3270 [1] Bits 0-7 = standard 3270 control-unit address Bits 8-15 = standard 3270 device address

54

Guardian Programming Reference Summary for C 522630-001 11 -14

SETMODE Operations

57

Disk: Set serial writes option param1 = 0 system automatically selects serial or parallel writes (default). = 1 change the file label default value of the serial writes option. Theparam2 parameter is used with DP2 disk files only. param2 = 0 change the open option setting of the serial writes option (default). = 1 change the file label default value of the serial writes option. Return count of bytes read param1 = count of actual bytes read param2 = 0 Tape drive: Set density param1= 0800 BPI (NRZI) = 1 1600 BPI (PE) = 2 6250 BPI (GCR) = 3 as indicated by switches on tape drive Theparam2 parameter is not used with function 66.

59

66

67

AUTODCONNECT for full-duplex modems: Monitor carrier detect or data set ready param1 = 0 disable AUTODCONNECT (default setting). = 1 enable AUTODCONNECT. Theparam2 parameter is not used with function 67. Line printer (subtype 4): Set horizontal pitch param1 = 0 normal print (default) = 1 condensed print = 2 expanded print Theparam2 parameter is not used with function 68. Set transmission priority. Transmission authority is used by an Expand process to determine the ordering of messages for transmission on an Expand path. This operation indirectly invokes the network utility process, $ZNUP, on a remote system to get information before the request can be serviced. Theparam1 parameter is not used with function 71. param2 bits 0-7 = 0 (reserved) Bits 8-15 = transmission priority The transmission priority value can range from 0 through 255. A value of 0 (the default) causes the processor priority of the process to be used as the transmission authority. The lowest priority is 1; the highest priority is 255. Once a path is selected, the Expand process processes the highest-priority message first.

68

71

Guardian Programming Reference Summary for C 522630-001 11 -15

SETMODE Operations

72

Force system buffering for nowait files param1 = 1 force use of intermediate buffer in PFS for read operations. (Nowait write operations always require the data to remain unchanged until completion of the information.) = 0 allow the system to make transfers directly from user buffers. The default value for files opened by FILE_OPEN_ is 0; for files opened by OPEN it is 1. The param2 parameter is not used, and the value should be zero, if supplied. ($RECEIVE): Set system message modes param1 Bits 0-12 should be zero. Bit 13 = 0 disable reception of -38 messages (default). = 1 enable reception of cancellation (-38) messages. Bit 14 = 0 disallow reception of SETPARAM (-37) messages, returning error 2 to processes attempting SETPARAM calls (default). = 1 allow reception of SETPARAM (-37) messages. Bit 15 = 0 disallow return of <last-param> values for SETMODE (-33) messages, returning error 2 to processes attempting to obtain them (default). = 1 allow <last-param> values to be returned for SETMODE (-33) messages. The extended form of the -33 message will be delivered under this mode. The param2 parameter is not used, and the value should be zero, if supplied. Disk: Set buffered option defaults same as CREATE param1 = 0 buffered = 1 write-through The param2 parameter is used with DP2 disk files only. param2 = 0 change the open option setting of the buffered option (default). = 1 change the file label default value of the buffered option. This function operates only on Guardian objects. If an OSS file is specified, filesystem error 2 occurs.

80

90

Guardian Programming Reference Summary for C 522630-001 11 -16

SETMODE Operations

91

Disk: Set cache and sequential option (function 91 is not applicable for alternatekey files). param1 = 0 system managed (default). DP2 will detect sequential access; when detected, it will set LRU access to sequential and perform key-sequenced sequential splits. = 1 direct I/O, bypass disk cache. = 2 random access, LRU-chain buffer. = 3 sequential access, reuse buffer. Directs DP2 to set cache. LRU access to sequential and perform key-sequenced sequential splits. The param2 parameter is not used with function 91. Sequential LRU access results in random LRU chaining that provides an approximate half-life within the LRU cache chain. Key-sequenced sequential splits attempt to leave the inserted record as the last in the old block, in contrast to a 50/50 split. This helps to ensure a compact keysequenced structure when multiple sequential records are inserted. Disk: Set maximum number of extents for a nonpartitioned file. (Function 92 is invalid for audit-trail files and for partitioned non-key-sequenced files.) param1 = new maximum number of extents value. There is no guarantee of success if you specify a value greater than 500. The default is 16 extents. The param2 parameter is not used with function 92. This function operates only on Guardian objects. If an OSS file is specified, filesystem error 2 occurs. Disk: Set buffer length for an unstructured file param1=new BUFFERSIZE value, must be valid DP2 block size. Valid DP2 block sizes are 512,1024, 2048, 4096 bytes (the default is 4096 bytes). The param2 parameter is not used with function 93. This function operates only on Guardian objects. If an OSS file is specified, filesystem error 2 occurs. Disk: Set audit-checkpoint compression option for an Enscribe file. param1 = 0 no audit-checkpoint compression (default) = 1 audit-checkpoint compression enabled param2 = 0 change the open option setting of the audit-checkpoint compression option (default) = 1 change the file label default value of the audit-checkpoint compression option

92

93

94

Guardian Programming Reference Summary for C 522630-001 11 -17

SETMODE Operations

95

Disk: Flush dirty cache buffers The param1 parameter is not used with function 95. The param2 parameter is not used with function 95. If last-params is specified, SETMODE returns: 0 = broken file flag off after dirty cache blocks were written to disk 1 = broken file flag on, indicating some part of file is bad, possibly due to failed write of a dirty cache block License program to use privileged procedures param1 = 0 disallow privilege (revoke license) = 1 allow privilege (license) The param2 parameter is not used with function 97. To use this SETMODE function on a Guardian file, the user must be logged on as the super ID (255, 255) on the system where the file is located. To use this function on an OSS object, the user must have appropriate privilege; that is, the user must be locally authenticated as the super ID (255, 255) on the system where the target object resides. TAPEPROCESS error recovery method param1 = 0 record level (default) = 1 file level = 2 volume level Once set, the error recovery method remains set until changed or until the application closes TAPEPROCESS. The param2 parameter is not used with function 99.

97

99

SETMODEs 100-109 are reserved for customer use.

Guardian Programming Reference Summary for C 522630-001 11 -18

SETMODE Operations

110

Set Shift In/Shift Out (SISO) code extension technique for an individual subdevice
Note:

SETMODE 110 is supported in AM6520 for CRT protocol when used for 6530 terminals, ITI protocol for 6530 terminals, and PRT protocol for 5520 printers. param1 = 0 disable SISO (default setting) = 1 enable SISO The param2 parameter is not used with function 110. 112 Session in Between Brackets (BETB) state Places SNAX LU-LU session in BETB state so that either the first speaker or the bidder can bid to open a new bracket. param1 = 0 disable = 1 enable placing session in the BETB state Set screen size param1 = the screen width (40, 66, 80, or 132) param2 = the screen length (25 or 28) last-params is an integer reference parameter containing two elements: last-params[0]= old param1 [1]= old param2 SNA Control Request Notification param1 = 0 disable = 1 enable control request notification Users of CRT protocol can receive notification that a CINIT or CTERM request has been sent by the SSCP to the PLU. Terminal: Establish extended address field for ADCCP (ABM only) combined stations. See the Envoy ACP/XF Reference Manual.

113

115

116

Guardian Programming Reference Summary for C 522630-001 11 -19

SETMODE Operations

117

Process files: Set TRANSID forwarding param1 = 0 normal mode (default for process subtypes other than 30 and 31): If a transaction identifier is in effect at the time of a write, read, or writeread on the process file, it is sent with the request so that the receiver will operate under the transaction. = 1 suppress mode (default for process subtypes 30 and 31): A transaction identifier is never associated with a message on the process file, whether or not one is in effect for the sending process. The SETMODE action is local to the program that calls SETMODE; no SETMODE message is sent to the destination process. If this SETMODE function is invoked in a process pair, provision should be made to either call CHECKSETMODE or to reexecute the SETMODE call at the time of a takeover. Tape drive: Set mode param1 = 0 set start/stop mode = 1 set streaming mode The param2 parameter is not used with function 119. Only the 3209 controller supports both options of SETMODE 119. The 3208 and 3211 controllers supports this SETMODE function only when param1 = 0. The 3214 and 3215 controllers support this SETMODE function only when param1 = 1.

119

120

Return end-of-tape (EOT) message when writing labeled tapes param1 = 0 volume switching is transparent = 1 notify user of volume switch by sending error 150 (EOT). COBOL applications do not receive error 150 (EOT); the COBOL run-time library (RTL) handles this error transparently. The param2 parameter is not used with function 120. Disk: Set the generic lock key length of a key-sequenced file (DP2 only). param1=lock key length. The generic lock key length determines the grouping of records that will share a single lock. This value must be between 0 and the key length of the file. If locks are in force at the time of the call, this SETMODE function is rejected with error 73. The key length value applies to all partitions of a file. Alternate keys are not affected. If the lock key length is nonzero and less than the key length of the file, the keys are not affected. If the lock key length is nonzero and less than the key length of the file, generic locking is activated and calls to UNLOCKREC are thus ignored. Generic locking is turned off by giving a lock key length of 0 or equal to the key length of the file (which is equivalent to 0). The param2 parameter is not used and should be zero if supplied. Note that when generic locking is activated, any write is rejected with error 73 if it attempts to insert a record having the same generic lock key as an existing lock owned by another user, whether for audited or nonaudited files.

123

Guardian Programming Reference Summary for C 522630-001 11 -20

SETMODE Operations

141

DP2 disk file: Enable/disable large transfers param1 = 1 enable large transfers = 0 disable large transfers (this is the default value when the file is opened.) The param2 parameter is not used with function 141. last-params [0] contains the previous setting of the large transfer mode flag. last-params [1] if param1 is 1, this contains the value of the file's broken flag after the cache has been flushed. if param1 is 0, this contains a 0. SETMODE 141 is valid only for DP2 disk files. When enabled by a SETMODE 141 (or SETMODENOWAIT 141), a read or write operation can transfer up to 56K bytes of data to a DP2 disk file if the operation is local or over a FOX connection, or up 32K bytes if it is through Expand. Large transfer operations are allowed on remote DP2 files if the DP2 disk process is at release level C00 or higher. If this SETMODE function is waited and any nowait I/O operations are outstanding at the time SETMODE is called, the SETMODE is not done. The condition code is set to CCL and error 27 is returned. When this SETMODE function is issued with param1 set to 1, DP2 flushes and removes all blocks for the file from its cache. This ensures that any updates done by the user before the SETMODE are written to disk. The file must have been opened with the unstructured access option specified, even if the file is unstructured. There is no support for alternate-key files or partitions. Because the file is opened for unstructured access, secondary partitions and alternate-key files are not opened.

Guardian Programming Reference Summary for C 522630-001 11 -21

SETMODE Operations

141, continued

If the file is audited and structured, the file must be opened with an access mode of read-only. The exclusion mode can be shared, protected, or exclusive. If the exclusion mode is shared, updates done by other openers of the file might not be seen by this opener. If the file is audited and unstructured, only read operations can be performed on the file after this SETMODE is issued with param1 set to 1. Write operations must not be issued until the SETMODE is reissued with param1 set to 0. If the file is not audited, the file can be opened with any access mode and any exclusion mode. If the exclusion mode is shared, updates done by other openers of the file might not be seen by this opener. To issue write requests after the SETMODE is issued with param1 set to 1, the exclusion mode must be exclusive. Once the large transfer mode is enabled, only the data transfer operations of READX, READUPDATEX, WRITEX, and WRITEUPDATEX are allowed. No record locks are supported. READX and WRITEX use the record address in NEXTREC. READUPDATEX and WRITEUPDATEX use the record address in CURREC. POSITION can be used to set CURREC and NEXTREC. Relative byte addressing is used for positioning. The operation is done nowait if the file is opened for nowait I/O. The operation must then be completed by a call to AWAITIOX. The operation can be canceled by CANCEL or CANCELREQ. With the large transfer mode enabled, data is read or written directly from the user's buffer. The user's buffer is locked in memory until completion of the operation. The data is not moved to or from the PFS. If the I/O is done nowait, the user should not modify or examine the data in the buffer until the I/O has finished. This also applies to other processes sharing the segment containing the buffer. If the I/O is done in a nowait manner and the buffer is in the stack, the buffer must be in the high end of the stack. The record address (in NEXTREC or CURREC) must be on a page boundary (a multiple of 2K bytes) or error 550, "illegal position," will be returned. Note that, as usual, when performing successive READXs without intervening POSITIONs, NEXTREC is incremented by the count actually read, and that just before the EOF, the count read will probably not be a multiple of 2K bytes, hence violating the record address constraint for the next READX call. A POSITION before each READX call ensures that the record address meets the page boundary constraint. If -1D positioning is used, the current EOF must be on a page boundary, otherwise the disk process returns an error. If -1D positioning is used or writes are done that change the EOF, some performance gains are lost. When the EOF is changed, DP2 must do extra checkpoints. To avoid the extra checkpoints, issue a CONTROL 2 to set the EOF to a high value before starting a series of large writes. When the writes are complete, another CONTROL 2 can be issued to set EOF to the correct value.

Guardian Programming Reference Summary for C 522630-001 11 -22

SETMODE Operations

141, continued

The length of the transfer cannot be more than 57,344 bytes. The length must be a multiple of 2K bytes. Although up to 56K bytes are transferred to the disk process in one operation, the actual transfer to the disk might not be 56K bytes at once. The disk process must do the actual data transfer to the disk in smaller pieces if more than one file extent is crossed or the controller is not a 3107 or 3108. Also, some Expand connections do not support transfers of more than 30K bytes and return an error if a larger transfer is attempted. Large transfer requests are considered repeatable, so no sync ID is passed to the disk process. If the file is opened with a positive sync depth, normal retries occur after path failures. A positive sync depth should not be used with -1D positioning, because writes to the end of a file are not repeatable. If a path failure occurs, determine whether the data was written before the path failure. If the data was not written, issue a retry. Since DP2's cache is bypassed by these operations and the data is read from or written to the disk file directly, records or blocks modified by other openers might not be seen by these requests. The user might see "dirty" data if access mode and exclusion mode are not set carefully. Select Character Set param1 = 1 select IBM PC character set. = 0 select default character set. The param2 parameter is not used with function 141. If supplied, it must be 0. For 5512 , 5515/5516, and 5573 printers, the I/O process sends the following ESC sequences to select the character set: ESC(1OUselect IBM PC character set. ESC(1O@select default character set.
Note:

142

These printers do not come equipped with the IBM PC character set; it can be installed later. To use this operation, the printer must have the IBM PC character set installed on the printer. If the printer does not have the IBM PC character set installed, the printer ignores the SETMODE 142.

Guardian Programming Reference Summary for C 522630-001 11 -23

SETMODE Operations

144

Sets LU character set and double-byte character code The param1 parameter must be omitted for function 144. The param2 parameter must be omitted for function 144. last-params[0]. Bit 0 = 0, no translation =1SNAX does EBCDIC/ASCII translation Bits 1-7 =IBM device type 1=IBM-3277 2=not 3277 or 3276 3=IBM-3276 Bits 8-15 = value of LU attribute ALLOWEDMIX [1] Bits 0-7 = LU character set 0=ASCII (USASCII) 9=EBCDIC (IBM EBCDIC) 14 =KATAKANA EBCDIC Bits 8-15 = double-byte character set 0=No DBCS 2=IBMKANJI 3=IBMMIXED 5=JEFKANJI Queue waiters for disk file write param1 = 0 disables the effect of param1 = 1 causes CONTROL 27 requests to be queued and completed one at a time; otherwise all are completed by the first write. The param2 parameter is not used with function 146. SETMODE 146 remains in effect until the file has no more openers. When there are no more openers, the effect of SETMODE 146 is lost and the next open must repeat this SETMODE function. Disk: Alternate key insertion locking param1 = 0 no automatic locking (default): locking and unlocking during insertion is not automatically performed. = 1 automatic locking: writes of record with alternate keys are locked at the beginning of insertion and unlocked after all associated alternate key record insertions are complete. This prevents interference from programs attempting concurrent update of the same record. The param2 parameter must be zero, if supplied. SETMODE 149 is not valid (nor needed) for audited files. For process pairs, the mode needs to be set in the backup by CHECKSETMODE. If the file is a keysequenced file using the generic locks feature, the lock established by automatic locking might not be released automatically at the end of the write processing.

146

149

Guardian Programming Reference Summary for C 522630-001 11 -24

SETMODE Operations

152

Disk: Skip cache flushing when closing nonaudited file (C30 and later releases only) param1 Bit 15 = 1 for nonaudited disk files, causes the cache not to be flushed when the file is closed unless the close is either for the last open with write access or for the last open with a nonzero sync-depth value. = 0 disables the effect of SETMODE 152 with param1 = 1. The param2 parameter is not used with function 152. If it is supplied, it must be 0. To be effective, SETMODE 152 should be performed for each open of a file. Any open that does not perform SETMODE 152 causes a flush of the cache when it closes the file. Disk: Variable-length audit compression. (D10 and later releases. This function should be avoided if a fallback to a release earlier than D10 is possible.) Enable or disable variable-length audit compression for any structured Enscribe file. param1 = 1 enables variable length audit compression. = 0 disables variable length audit compression. The param2 parameter is not used with function 153. If supplied, it must be 0.
CAUTION:

153

Since this feature generates undo and redo that cannot be processed correctly by earlier releases of the disk process, a fallback to a release earlier than D10 can result in problems. If a fallback to a release earlier than D10 is possible, this function should be avoided. If this function is used and a fallback becomes necessary, the following steps should be taken:

1. The TMF subsystem should be stopped while the affected volumes are brought up. The TMF subsystem can subsequently be restarted. 2. Once the earlier version of operating system is running, new TMF online dumps should be acquired for any files protected by the TMF subsystem, on which SETMODE function 153 was used if subsystem TMF rollforward protection is required.

Guardian Programming Reference Summary for C 522630-001 11 -25

SETMODE Operations

162

Override System Compression Default on 5190 Cartridge Tape param1 = 1 No data compression = 2 Data compression (DRC) The param2 parameter is not used with function 162. Users of unlabeled tapes who do not want to use the default compression setting can use SETMODE 162 to override the default setting. BACKUP and FUP do not support this operation. This operation is allowed only at the beginning of tape (BOT). For more information about the 5190 Cartridge Tape Subsystem, refer to the 5190 Cartridge Tape Subsystem Manual.

Guardian Programming Reference Summary for C 522630-001 11 -26

SETMODE Operations

163

SNAX:Enhanced CDI mode param1 = 0 enables normal mode (disables all enhanced CDI support). = 1 enables enhanced CDI mode. = 2 enables special WRITEREAD mode (allows applications to determine the setting of CDI by using the WRITEREAD procedure; using WRITEREAD causes the outbound data buffer to be sent with CDI enabled). The param2 parameter is not used with function 163. A SETMODE 163 call applies only to the opener, not to the device that is opened; another SETMODE 163 call must be made if the file is closed. Enhanced CDI mode is supported only by the SNAX/XF and SNAX/CDF products. For more information about enhanced CDI mode, refer to the SNAX/XF Application Programming Manual and the SNAX/CDF Application Programming Manual. SNAX:Exception response (ER) mode param1 = 0 disables ER mode. The LU sends outbound LU-LU FMD requests in definite response (DR) mode. This is the default value if SCF or SPI has not been used previously to configure ER mode; otherwise, the SCF or SPI configuration value is used. = 1 enables ER mode for applications existing prior to the introduction of ER mode. The LU sends outbound LU-LU FMD requests in ER mode. However, error 122 is sent on a negative response instead of error 951. = 2 enables ER mode for applications using the ER mode features. The LU sends outbound LU-LU FMD requests in ER mode. Error 951 is sent on a negative response. The param2 parameter is not used with function 165. last-params [0] contains the previous value of param1. last-params [1] contains the number of outbound requests required per device before an ER mode sync point is automatically generated on behalf of the user. ER mode is supported only by the SNAX/XF product. Specifying this function for SNALU causes an error 2 (invalid operation) to be returned. Passing a value other than one of those listed above causes an error 590 (invalid parameter value) to be returned. A SETMODE 165 call applies only to the opener, not to the device that is opened; another SETMODE 165 call must be made if the file is closed. For more information about ER mode, refer to the SNAX/XF Application Programming Manual.

165

Guardian Programming Reference Summary for C 522630-001 11 -27

SETMODE Operations

260

Printer: Enable PostScript printing param1 = 1 The FASTP print process sends the PCL command to switch the printer to PostScript mode. At the end of the job and before the next job prints, the printer is returned to PCL mode. = 0 The FASTP print process sends the PCL command to switch the printer back to PCL mode. The param2 parameter is not used with function 260. Function 260 applies only to 5577 printers. When PostScript mode is in effect, SETMODE 142 and CONTROL 1 are ignored and FASTP inhibits the sending of other PCL sequences such as page eject and job offset. For programming information about SETMODE function 260, refer to the Guardian Programmers Guide.

Guardian Programming Reference Summary for C 522630-001 11 -28

12 Completion Codes
For a more detailed description of the completion codes, refer to the Guardian Procedure Calls Reference Manual.
Completion Code 0 1 2 3 4 5 6 7 8 9 Definition Normal, voluntary termination with no errors. Normal, voluntary termination with WARNING diagnostics. Abnormal, voluntary termination with FATAL errors or diagnostics. Abnormal, voluntary, but premature termination with FATAL errors or diagnostics. A process associated with a RUN statement never started. Process calls PROCESS_STOP_ (with abnormal termination specified) or ABEND on itself. PROCESS_STOP_, STOP, or ABEND was called to delete a process by an external, but authorized, process. Restart this job. Code 8 is the same as code 1 (normal termination) except that you must examine the listing file to determine whether the results are acceptable. A OSS kill() or raise() function generated a signal that stopped the process.

The following completion codes are reserved for Tandem use:


Completion Code -1 -2

Definition A trap was detected. A process terminated itself, but the operating system has a resource problem and cannot pass along the requested completion code and the associated termination information. This code is returned by the system when a process terminating itself passed bad parameters to PROCESS_STOP_, STOP, or ABEND. This code is returned by the system when a processor failure caused the name of a process to be deleted (that is, the only process running under that name was in the processor that failed). A communications or resource failure occurred during the execution of one of the functions in the OSS exec or tdm_exec sets of functions; or an initialization failure of the new process occurred when it was too late for the exec or tdm-exec function to return an error to the caller. An OSS process terminated when it caused a hardware exception.

-3 -4

-5

-6

Guardian Programming Reference Summary for C 522630-001 12- 1

Completion Codes

Completion Code -7 -8 -9 -10 -11 -12 -13

Definition An OSS process terminated as a result of a corrupted stack frame or register state. An OSS process terminated because of insufficient user stack space for signal recovery. An OSS process terminated because of insufficient PRIV stack space for signal recovery. An OSS process terminated because it was unable to obtain resources for signal delivery. An OSS process terminated because it attempted to resume from a nonresumable signal. One of the functions in the OSS exec or tdm_exec sets of functions executed successfully. The OSS open() or dup() function performed by the PROCESS_SPAWN_ procedure failed.

Guardian Programming Reference Summary for C 522630-001 12- 2

13 Traps
For a more detailed description of the traps, refer to the Guardian Procedure Errors and Messages Manual.
Trap Number 0 (%0) 1 (%1) 2 (%2) 3 (%3) 4 (%4) 5 (%5) 11 (%13) 12 (%14) 13 (%15) Signal Name SIGSEGV SIGILL SIGFPE SIGSTK SIGTIMEOUT SIGLIMIT SIGMEMMGR SIGNOMEM SIGMEMERR Trap Description Illegal address reference Instruction failure Arithmetic overflow Stack overflow Process loop-timer timeout Call from process with PIN greater than 255 Memory manager read error No memory available Uncorrectable memory error

Guardian Programming Reference Summary for C 522630-001 13- 1

Traps

Guardian Programming Reference Summary for C 522630-001 13- 2

14 Interprocess Messages
Interprocess Command Interpreter Messages
For a complete description of the command interpreter interprocess messages, refer to the Guardian Programmers Guide. Unless otherwise specified, file name are in internal (expanded) format. Note that the user ID of a user who is logged off is 0 and the user ID of the null user (0.0) is 0.

-1 STARTUP
typedef struct CIStartup { short messageCode; struct { short volume[ 4 ]; short subVolume[ 4 ]; } defaults; struct { short short short } infile, volume[ 4 ]; subVolume[ 4 ]; fileName[ 4 ]; outfile; /* parameter string for */ /* the run command up to */ /* 530 */ /* always -1 */

char param[1];

} CIStartup;

Guardian Programming Reference Summary for C 522630-001 14- 1

Interprocess Messages

-2 ASSIGN
typedef struct CIAssign { short messageCode; struct { char char char char programNameLength; programName[ 31 ]; fileNameLength; fileName[ 31 ]; /* always -2 */

/* blank-filled */ /* blank-filled */

} logicalUnit; unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned unsigned fileNameSpecified priExtSizeSpecified secExtSizeSpecified fileCodeSpecified exclusionSpecified accessSpecified recordSizeSpecified blockSizeSpecified filler1 filler2 : : : : : : : : : : 1; 1; 1; 1; 1; 1; 1; 1; 8; 16;

struct { short volume[ 4 ]; short subVolume[ 4 ]; } physicalUnit; short short short short short short short priExtSize; secExtSize; fileCode; exclusion; access; recordSize; blockSize;

} CIAssign;

Guardian Programming Reference Summary for C 522630-001 14- 2

Interprocess Messages

-3 PARAM
typedef struct CIParam { short messageCode; short numParams; char params [1024]; } CIParam; /* always -3 */ /* number of parameters */

The field parameters in the above message format is composed of numparams records of the following form (offsets are given in bytes):
param [0] param [1] for n param [n+1] param [n+2] for v = length n, in bytes, of parameter-name = parameter-name = length v, in bytes, of parameter-value = parameter-value

-20 WAKEUP
typedef struct CIWakeup { short messageCode; } CIWakeup; /* always -20 */

-21 DISPLAY
typedef struct CIDisplay { short messageCode; char text [132]; } CIDisplay; /* always -21 */ /* n <= 132 */

Guardian Programming Reference Summary for C 522630-001 14- 3

Interprocess Messages

-50 LOGON
typedef struct CILogon { short short short short short } CILogon; messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; /* always -50 */

-51 LOGOFF
typedef struct CILogoff { short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; /* always -51 */

} CILogoff;

-52 RUN
typedef struct CIRun { short short short short short short short short short short short short } CIRun; messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; progFileName [12]; PRIParameter; CPUParameter; INParamFileName [12]; OUTParamFileName [12]; LIBParamFileName [12]; SWAPParamFileName [12]; /* always -52 */

Guardian Programming Reference Summary for C 522630-001 14- 4

Interprocess Messages

-53 ILLEGAL LOGON


typedef struct CIIllegalLogon { short short short short short char messageCode; userIllegalLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; illegalLogonString[132]; /* always -53 */

/* n <= 132 bytes */

} CIIllegalLogon;

-54 ADD USER


typedef struct CIAddUser { short short short short short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; newUserGroupName [4]; newUserName [4]; newUserGroupNum; newUserNum; /* always -54 */

} CIAddUser;

-55 DELETE USER


typedef struct CIDeleteUser { short short short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; delGroupName [4]; delUserName [4]; /* always -55 */

} CIDeleteUser;

Guardian Programming Reference Summary for C 522630-001 14- 5

Interprocess Messages

-56 ALTER PRIORITY


typedef struct CIAlterPriority { messageCode; /* userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; processID [4]; /* /* short fileName [12]; /* /* short priority; /* short phandle; /* /* } CIAlterPriority; short short short short short short always -56 */

ID of process to be altered file name of process to be altered the new priority process handle of process to be altered

*/ */ */ */ */ */ */

-57 PASSWORD
typedef struct CIPassword { short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; /* always -57 */

} CIPassword;

-58 REMOTE PASSWORD


typedef struct CIRemotePassword { short short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; systemPassword; /* always -58 */

} CIRemotePassword;

Guardian Programming Reference Summary for C 522630-001 14- 6

Interprocess Messages

-59 PRELOGON
typedef struct CIPrelogon { short short short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; TACLLoggedOn; attemptedUserID; /* always -59 */

} CIPrelogon;

Note. Logon message sent to $CMON before VERIFYUSER or USER_AUTHENTICATE_ is performed.

-60 CONFIGURATION
typedef struct CIConfig { short short short short short messageCode; userLogonID; TACLExecPriority; TACLInputFile [12]; TACLOutputFile [12]; /* always -60 */

} CIConfig;

Guardian Programming Reference Summary for C 522630-001 14- 7

Interprocess Messages

Interprocess System Messages


For a complete description of the interprocess messages, refer to the Guardian Procedure Errors and Messages Manual.

-2 CPU DOWN
For D-series systems:
Word sysmsg[0] sysmsg[1] for 4 Description -2 processor number

-3 CPU UP
Word sysmsg[0] sysmsg[1] for 4 Description -3 processor number

-5 PROCESS DELETION (STOP)


There are two forms of the STOP message:
Word sysmsg[0] sysmsg[1] for 4 sysmsg[5] sysmsg[6] for 4 sysmsg[10] sysmsg[11] sysmsg[12] sysmsg[13] for 4 sysmsg[17] sysmsg[18] sysmsg[19] sysmsg[20] for n Description -5 Process ID of deleted process Header length (header ends at sysmsg[19]) Process processor time in microseconds (a FIXED value) Job ID; 0 if process has no GMOM Completion code Termination information; 0 if user did not supply information SPI subsystem organization name SPI subsystem number SPI subsystem version Length of text in bytes Text of length sysmsg[19] (80 byte maximum)

Guardian Programming Reference Summary for C 522630-001 14- 8

Interprocess Messages

Word sysmsg[0] sysmsg[1] for 3 sysmsg[4] sysmsg[5] sysmsg[6] for 4 sysmsg[10] sysmsg[11] sysmsg[12] sysmsg[13] for 4 sysmsg[17] sysmsg[18] sysmsg[19] sysmsg[20] for n

Description -5 Name of the deleted process -1 Header length (header ends at sysmsg[19]) Process processor time in microseconds (a FIXED value) Job ID; 0 if the process has no GMOM Completion code Termination information; 0 if user did not supply information SPI subsystem organization name SPI subsystem number SPI subsystem version Length of text in bytes Text of length sysmsg[19] (80 byte maximum)

If an external process caused the termination, the message is changed as follows:


Word sysmsg[11] sysmsg[12] sysmsg[13] for 4 Description Completion code defaults to 6 Creator access ID Process ID of the process that caused the termination

Guardian Programming Reference Summary for C 522630-001 14- 9

Interprocess Messages

-6 PROCESS DELETION (ABEND)


There are two forms of the ABEND message:
Word sysmsg[0] sysmsg[1] for 4 sysmsg[5] sysmsg[6] for 4 sysmsg[10] sysmsg[11] sysmsg[12] sysmsg[13] for 4 sysmsg[17] sysmsg[18] sysmsg[19] sysmsg[20] for n Word sysmsg[0] sysmsg[1] for 3 sysmsg[4] sysmsg[5] sysmsg[6] for 4 sysmsg[10] sysmsg[11] sysmsg[12] sysmsg[13] for 4 sysmsg[17] sysmsg[18] sysmsg[19] sysmsg[20] for n Description -6 Process ID of deleted process Header length (header ends at sysmsg[19]) Process processor time in microseconds (a FIXED value) Job ID; 0 if process has no GMOM Completion code Termination information; 0 if user did not supply information SPI subsystem organization name SPI subsystem number SPI subsystem version Length of text in bytes Text of length sysmsg[19] (80 byte maximum) Description -6 $process-name of the deleted process -1 Header length (header ends at sysmsg[19]) Process processor time in microseconds (a FIXED value) Job ID; 0 if process has no GMOM Completion code Termination information; 0 if user did not supply information SPI subsystem organization name SPI subsystem number SPI subsystem version Length of text in bytes Text of length sysmsg[19] (80 byte maximum)

If an external process caused the termination, the message is changed as follows:

Guardian Programming Reference Summary for C 522630-001 14 -10

Interprocess Messages

Word sysmsg[11] sysmsg[12] sysmsg[13] for 4

Description Completion code defaults to 6 Creator access ID Process ID of the process that caused the termination

If a trap is encountered, the message is changed as follows:


Word sysmsg[11] sysmsg[12] sysmsg[13] for 4 sysmsg[17] sysmsg[18] sysmsg[19] sysmsg[20] for n Description Completion code is -1 Termination information is 0 SPI subsystem organization name is blanks SPI subsystem number is 0 SPI subsystem version is 0 Length of text in bytes Text of length sysmsg[19] (maximum 76 bytes). Text follows:

TRAP NO=nn, S=nnnnnn, CS=nn, P=nnnnnn, ENV=nnnnnn, L=nnnnnn, OCT P=nnnnnnnn

-8 CHANGE IN STATUS OF NETWORK NODE


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] Description -8 Bits 0-7 System number Bits 8-15 Number of processors Current processor-status bit mask Previous processor-status bit mask

-9 JOB PROCESS CREATION


Word sysmsg[0] sysmsg[1] for 4 sysmsg[5] Description -9 Job ID Process ID

Guardian Programming Reference Summary for C 522630-001 14 -11

Interprocess Messages

-10 SETTIME
Word sysmsg[0] sysmsg[1] sysmsg[2] for 4 sysmsg[6] Description -10 processor number Signed change in microseconds (FIXED integer) Reason code 0 = Initial setting (Greenwich mean time [GMT] and local civil time [LCT] change) 1 = Subsequent adjustment (GMT and LCT time change) 2 = Daylight-savings-time transition (LCT time change)

-11 POWER ON
Word sysmsg[0] sysmsg[1] Description -11 processor number

-12 NEWPROCESSNOWAIT COMPLETION


Word sysmsg[0] sysmsg[1] Description -12 Bits 0-7, NEWPROCESS error; refer to NEWPROCESS and NEWPROCESSNOWAIT Error Codes for more information Bits 8-15, NEWPROCESS error or file-system error number Tag passed to NEWPROCESSNOWAIT in filenames [36:37] Process ID of the new process NEWPROCESS error number NEWPROCESS suberror number or file-system error number

sysmsg[2] for 2 sysmsg[4] for 4 sysmsg[8] sysmsg[9]

-13 SYSTEM MESSAGE BUFFER OVERRUN


Word sysmsg[0] Description -13

Guardian Programming Reference Summary for C 522630-001 14 -12

Interprocess Messages

-20 BREAK ON DEVICE


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] sysmsg[4] Description -20 Logical device number, in binary, of device where BREAK was pressed. If a process called SENDBREAKMESSAGE, this field contains -1. System number, in binary, of logical device number or SENDBREAKMESSAGE caller. Most significant word of break tag. Least significant word of break tag.

-21 3270 DEVICE STATUS RECEIVED


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] Description -21 Response ID Actual TR3271 status bytes, in which the sense byte is bits 0-7 and the status byte is bits 8-15 Translation of the device status to status bits; the application might pass this word directly to TR3271 by way of SETMODE 51 to post the status on a TR3271 subdevice.

-22 ELAPSED TIME TIMEOUT


Word sysmsg[0] sysmsg[1] sysmsg[2] for 2 Description -22 Parameter 1 supplied to SIGNALTIMEOUT (0 if none) Parameter 2 supplied to SIGNALTIMEOUT (0D if none)

-23 MEMORY LOCK COMPLETION


Word sysmsg[0] sysmsg[1] sysmsg[2] for 2 Description -23 Parameter 1 supplied to LOCKMEMORY Parameter 2 supplied to LOCKMEMORY (if none, OD)

Guardian Programming Reference Summary for C 522630-001 14 -13

Interprocess Messages

-24 MEMORY LOCK FAILURE


Word sysmsg[0] sysmsg[1] sysmsg[2] for 2 Description -24 Parameter 1 supplied to LOCKMEMORY (if none, 0) Parameter 2 supplied to LOCKMEMORY (if none, 0D)

-26 PROCESS TIME TIMEOUT


Word sysmsg[0] sysmsg[1] sysmsg[2] for 2 Description -26 Parameter 1 supplied to SIGNALPROCESSTIMEOUT (0 if none) Parameter 2 supplied to SIGNALPROCESSTIMEOUT (0D if none)

-30 PROCESS OPEN


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] for 4 sysmsg[7] sysmsg[8] sysmsg[9] for 4 sysmsg[13] for 4 sysmsg[17], bit 14 sysmsg[17], bit 15 Description -30 Flags parameter to callers OPEN Sync-or-receive-depth parameter to callers OPEN 0 if normal OPEN; or Process ID of primary process opened by a backup process 0 if normal OPEN; or file number of file opened by a backup process Process accessor ID of opener Optional first qualified name of named process or blanks Optional second qualified name of named process or blanks 1 if the openers process access identification (given in the message) has not been verified in the receivers node (although it passes the remote password test) 1 if the opener is on a different node from the receiving process

-31 PROCESS CLOSE


Word sysmsg[0] Description -31

Guardian Programming Reference Summary for C 522630-001 14 -14

Interprocess Messages

-32 PROCESS CONTROL


Word sysmsg[0] sysmsg[1] sysmsg[2] Description -32 Operation for CONTROL Operation parameter for CONTROL

-33 PROCESS SETMODE


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] Description -33 Function for SETMODE or SETMODENOWAIT Function parameter 1 for SETMODE or SETMODENOWAIT Function parameter 2 for SETMODE or SETMODENOWAIT

If the receiving process can handle requests for last parameter information (by setting bit 15 of param1 in a SETMODE 80 call), the flags word is included:
Word sysmsg[4] Description Flags word: Bit 13, 1 if param1 was supplied for SETMODE Bit 14, 1 if param2 was supplied for SETMODE Bit 15 1 if last-params was supplied for SETMODE

-34 PROCESS RESETSYNC


Word sysmsg[0] Description -34

-35 PROCESS CONTROLBUF


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] for n Description -35 Operation parameter for CONTROLBUF Length of buffer data for CONTROLBUF in bytes Buffer data of length sysmsg[2] for CONTROLBUF

Guardian Programming Reference Summary for C 522630-001 14 -15

Interprocess Messages

-37 PROCESS SETPARAM


Word sysmsg[0] sysmsg[1] sysmsg[2] Description -37 Function parameter for SETPARAM Flags word: Bit 14, 1 if parameter array was supplied Bit 15, 1 if parameter array was returned sysmsg[3] sysmsg[4:n] Length of parameter array in bytes Parameter array of length sysmsg[3]

-38 QUEUED MESSAGE CANCELLATION


Word sysmsg[0] sysmsg[1] Description -38 Message tag of canceled message

-40 DEVICE TYPE INQUIRY


Word sysmsg[0] sysmsg[1:4] sysmsg[5:8] Description -40 First qualifier name in internal format (blank padded) Second qualifier name in internal format (blank padded)

-41 NOWAIT DEVICEINFO2 COMPLETION


Word sysmsg[0] sysmsg[1:2] sysmsg[3] sysmsg[4] sysmsg[5] sysmsg[6] Description -41 Tag value from tag-or-timeout parameter File-system error code Devtype value Physical-recordlen value Diskprocess-version value

Guardian Programming Reference Summary for C 522630-001 14 -16

Interprocess Messages

-100 REMOTE CPU DOWN


Word sysmsg[0] sysmsg[1] for 2 sysmsg[3] sysmsg[4] sysmsg[5] for 3 sysmsg[8] for n Description -100 Node number processor number Length of node name, in bytes Reserved Node name (including the backslash \) of length sysmsg[4]

-101 PROCESS DELETION


Word sysmsg[0] sysmsg[1] for 10 sysmsg[11] for 4 sysmsg[15] sysmsg[16] sysmsg[17] sysmsg[18] for 4 sysmsg[22] sysmsg[23] sysmsg[24] for 10 sysmsg[34] sysmsg[35] sysmsg[36] sysmsg[37], bits 013 sysmsg[37], bit 14 sysmsg[37], bit 15 sysmsg[38] for 2 Description -101 Process phandle of terminated process Process processor time in microseconds (a FIXED value) Process job ID; 0 if the process is not part of a job Completion code Termination information (0 if none supplied) SPI subsystem organization name SPI subsystem number SPI subsystem version Process phandle of external process causing termination; null if none Length of termination text in bytes Offset (from beginning of message) of process descriptor of terminated named process (pair) in bytes Length of process descriptor of terminated named process or process pair in bytes (0 if no text) Reserved OSS system type: 1 if terminated process was an OSS process, 0 if terminated process was a Guardian process Abend: termination caused by ABEND if 1, STOP if 0 OSS process ID

Guardian Programming Reference Summary for C 522630-001 14 -17

Interprocess Messages

Word sysmsg[40] sysmsg[41] for n sysmsg[ ] for n

Description Reserved Termination text of length sysmsg[34] (80-byte limit). Process descriptor of terminated named process or process pair of length sysmsg[36]

-102 NOWAIT PROCESS_CREATE_ COMPLETION


Word sysmsg[0] sysmsg[1] for 2 sysmsg[3] for 10 sysmsg[13] sysmsg[14] sysmsg[15] sysmsg[16] for 4 sysmsg[20] for n Description -102 Nowait-tag supplied to PROCESS_CREATE_ Process phandle of new process Error Error-detail Length of process descriptor of new process in bytes Reserved Process descriptor of new process of length sysmsg[15]

-103 PROCESS OPEN


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] sysmsg[4] sysmsg[5] sysmsg[6] sysmsg[7] Description -103 Access mode (access FILE_OPEN_ parameter) Exclusion mode (exclusion FILE_OPEN_ parameter) Nowait depth (from the nowait FILE_OPEN_ parameter) Sync depth (sync-or-receive-depth FILE_OPEN_ parameter) Open options (from the options FILE_OPEN_ parameter) User ID of opener (process access ID) Miscellaneous: Bit 15, backup open: this is an open by a backup Bit 14, the opener is on a different node from the receiver. Bit 13, the openers user ID has not been verified locally (in the receivers node0); in any case it will have passed a remote password check Bits 0-12, currently undefined; subject to change sysmsg[8] for 10 sysmsg[18] Backup open: contains process phandle of primary process Normal open: null process phandle Length of qualifier name in bytes
Guardian Programming Reference Summary for C 522630-001 14 -18

Interprocess Messages

Word sysmsg[19] sysmsg[20] sysmsg[21]

Description Offset in bytes from the beginning of the message to the beginning of the opener process name Length of the opener process name in bytes For a backup open, the file number used by the primary. It is typically, but not always, the same as the backup. Unlike the old open message, this value is never negative. Creator access ID of the opener. Unlike the process access ID given earlier in the message, this ID is not verified by remote password checking. Offset from the beginning of the message to the beginning of the opener home terminal name in bytes Length of the opener home terminal name in bytes Reserved The qualifier portion of the name used to open the process, in external form (for example, #PORT2.CTL). The length of this item is in sysmsg[18]. It is zero length if no qualifier was given. For a named opener, this is the process name in external process descriptor form (system, name, and sequence number). If the opening process is unnamed, the length is zero. In either case, the openers process handle is available from FILE_GETRECEIVEINFO_. Begins at offset sysmsg[19] with length sysmsg[20]. Openers home terminal name in external format. Begins at offset sysmsg[23] with length sysmsg[24].

sysmsg[22]

sysmsg[23] sysmsg[24] sysmsg[25] for 5 sysmsg[30] for n sysmsg[ ] for n

sysmsg[ ] for n

-104 PROCESS CLOSE


Word sysmsg[0] sysmsg[1] Description -104 Tape disposition parameter for FILECLOSE_

-105 BREAK ON DEVICE


Word sysmsg[0] sysmsg[1] sysmsg[2] for 2 Description -105 File number of the receivers open file of the terminal that indicated break (or -1 if unavailable). Break tag value specified with SETPARAM

Guardian Programming Reference Summary for C 522630-001 14 -19

Interprocess Messages

-106 DEVICE TYPE INQUIRY


Word sysmsg[0] sysmsg[1] for 3 sysmsg[4] sysmsg[5] for n Description -106 Reserved Length of the qualifier part of the file name being inquired about in bytes (zero if none given) Qualifier part of the file name being inquired about, in external format, of length sysmsg[4]

-107 SUBORDINATE NAME INQUIRY


Word sysmsg[0] sysmsg[1] Description -107 Flags: Bit 15, Skip if same; if set and the start name given below exists, skip it and return the following name. If equal to 0, return the start name if it exists. Bit 14, Reserved sysmsg[2] sysmsg[3] sysmsg[4] sysmsg[5] for 3 sysmsg[8] for n sysmsg[ ] for n Length of the start name in bytes (zero if no start name) Offset from the beginning of the message to the beginning of the name pattern in bytes Length of the name pattern in bytes Reserved Start name: the qualifier part of the file name, in external format, at which to start searching for a name for sysmsg[2]. Name pattern: the qualifier part of the pattern for which a name is to be returned at offset sysmsg[3] and length sysmsg[4]

Guardian Programming Reference Summary for C 522630-001 14 -20

Interprocess Messages

-108 NOWAIT FILE_GETINFOBYNAME_ COMPLETION


Word sysmsg[0] sysmsg[1] for 2 sysmsg[3] sysmsg[4] for 5 sysmsg[9] sysmsg[10] Description -108 Tag value from the timeout-or-tag parameter to FILE_GETINFOBYNAME_ File-system error code for the request Type information (device type, and so on) having the same layout as described for the typeinfo parameter of FILE_GETINFOBYNAME_ Physical record length Flag value from the flags parameter to FILE_GETINFOBYNAME_: Bits 0-14, Currently undefined; subject to change Bit 15, 0 signifies a Guardian file, 1 signifies an OSS file

-109 NOWAIT FILENAME_FINDNEXT_ COMPLETION


Word sysmsg[0] sysmsg[1] sysmsg[2] sysmsg[3] for 5 Description -109 Search ID for the request The file-system error code for the request Information (device type, and so on) having the same layout as that of the entityinfo parameter of FILENAME_FINDNEXT_. If sysmsg[2] <> 0, the value of this field is undefined. Length of the returned name in bytes (zero if none present because of an error) Tag parameter from FILENAME_FINDNEXT_ Reserved Returned name, in external form of length sysmsg[8]

sysmsg[8] sysmsg[9] for 2 sysmsg[11] for 3 sysmsg[14] for n

-110 LOSS OF COMMUNICATION WITH NETWORK NODE


Word sysmsg[0] sysmsg[1] for 3 sysmsg[4] for 2 sysmsg[6] sysmsg[7] for n Description -110 Reserved Node identifier Length of node name in bytes Node name (including the backslash \)

Guardian Programming Reference Summary for C 522630-001 14 -21

Interprocess Messages

-111 ESTABLISHMENT OF COMMUNICATION WITH NETWORK NODE


Word sysmsg[0] sysmsg[1] for 3 sysmsg[4] for 2 sysmsg[6] sysmsg[7] for n Description -111 Reserved Node identifier Length of node name in bytes Node name (including the backslash \)

-112 JOB PROCESS CREATION


Word sysmsg[0] sysmsg[1] sysmsg[2] for 10 Description -112 Job ID Process handle of the newly created process

-113 REMOTE CPU UP


Word sysmsg[0] sysmsg[1] for 2 sysmsg[3] sysmsg[4] sysmsg[5] for 3 sysmsg[8] for n Description -113 Node identifier processor number Length of node name in bytes Reserved Node name (including the backslash \)

-141 PROCESS SPAWN


Word sysmsg[0] sysmsg[1] for 13 sysmsg[14] for 2 sysmsg[16] for 2 sysmsg[18] for 10 Description -141 Reserved

nowait-tag supplied to PROCESS_SPAWN_


ZSYS-DDL-PROCESSRESULTS.Z-LEN of process-results supplied to PROCESS_SPAWN_ ZSYS-DDL-PROCESSRESULTS.Z-PHANDLE of processresults (process handle of the new process)

Guardian Programming Reference Summary for C 522630-001 14 -22

Interprocess Messages

Word sysmsg[28] for 2 sysmsg[30] for 2 sysmsg[32] sysmsg[33]

Description ZSYS-DDL-PROCESSRESULTS.Z-PID of process-results (OSS pid of the new process) ZSYS-DDL-PROCESSRESULTS.Z-ERRNO of processresults (OSS errno) ZSYS-DDL-PROCESSRESULTS.Z-TPCERROR of processresults (Guardian error) ZSYS-DDL-PROCESSRESULTS.Z-TPCDETAIL of processresults (Guardian error detail)

-147 CONFIG GETINFO (G-Series Only)


Word sysmsg[0] sysmsg[1] sysmsg[2] for 4 sysmsg[6] for 4 sysmsg[10] for 4 Description -147 Message version (must be equal to ZSYS-VAL-SMSGCONFIGINFO-VERS) Device name for which configuration info is needed; blank-filled (can be all blanks) Subdevice name; blank-filled (can be all blanks) Secondary subdevice name qualifier; blank-filled (can be all blanks)

Guardian Programming Reference Summary for C 522630-001 14 -23

Interprocess Messages

Guardian Programming Reference Summary for C 522630-001 14 -24

15 Error Codes
This section contains a list of error codes that are returned by Guardian procedure calls and the file system. For a full description of the error codes, refer to the Guardian Procedure Errors and Messages Manual. File-System Error Codes
Code 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Description Operation successful End-of-file Operation not allowed on this type of file Failure to open or purge a partition Failure to open an alternate key file Failure to provide sequential buffering System message received Process not accepting control or setmode Operation successful (examine MCW for additional status) Operation successful, the data returned was locked by another user File/record already exists File not in directory or record not in file, or the specified tape file is not present on a labeled tape File in use Illegal filename specification Device does not exist Volume specification supplied does not match name of volume on which file actually resides File number has not been opened Paired open was specified and the file is not open by the primary process, the parameters supplied do not match the parameters supplied when the file was opened by the primary, or the primary process is not alive System does not exist No more devices in logical device table Attempt to open network file with a name either too long or not acceptable Illegal count specified Application parameter or buffer address is out of bounds Disk address is out of bounds Privileged mode required for this operation
Guardian Programming Reference Summary for C 522630-001 15- 1

18 19 20 21 22 23 24

Error Codes

25 26 27 28

AWAITIO or CANCEL was attempted on a wait file AWAITIO or CANCEL was attempted on a file with no outstanding operations WAIT operation attempted when outstanding requests pending Number of outstanding NOWAIT operations would exceed that specified, or attempt to open a disk file or $RECEIVE with maximum number of concurrent operations greater than 1, or attempt to add more than the configured maximum subdevices for an I/O process Missing parameter Unable to obtain main memory space for a message block Unable to obtain file-system buffer space Unable to obtain storage pool space (SYSPOOL) I/O process is unable to obtain buffer space Unable to obtain file-system control block Unable to obtain I/O process control block Unable to lock physical memory I/O process is unable to lock physical memory Server process received a request with a sync ID older than the set of saved replies Operation timed out CHECKSUM error on file synchronization block Attempt to read from unallocated extent Unable to obtain disk space for file extent Disk directory is full or DCT is full File is full Invalid key specified Key not consistent with file data Security violation Access violation, or attempt to use an unexpired labeled tape for output, or mismatch between DEFINE use attribute (INPUT or OUTPUT/EXTEND) and the current operation (read or write) Directory error Directory is marked bad Error in disk free space table File-system internal error or CP6100 file management interface error I/O error in disk free space table or DP2 UNDO area I/O error in directory I/O error on volume label

29 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 47 48 49

50 51 52 53 54 55 56

Guardian Programming Reference Summary for C 522630-001 15- 2

Error Codes

57 58 59 60 61 62 63 64 65 66 70 71 72 73 74 75 76 78 79 80 81 82 83 84 85 86 87 88 89 90

Disk free space table is full Disk free space table is marked bad File is bad File resides on removed volume, device downed or not open, or server has failed and been replaced by a different process with the same name since it was opened No more file opens permitted on this volume or device Volume has been mounted, but mount order has not been given, file open not permitted Volume has been mounted and mount is in progress, file open not permitted Volume has been mounted and mount is in progress, file open not permitted Only special requests permitted or one device up, one device special and special request to both Device down, LIU not yet downloaded, hard failure occurred on controller, disk and controller incompatible, or both halves of a mirrored disk are down Continue file operation Duplicate record Attempted access to unmounted partition or structured access to secondary partition File/record locked Number of READUPDATES without replies exceeds receive-depth, or ACTIVATERECEIVETRANSID or reply called with an invalid message-tag Requesting process has no current process transid Transaction is in the process of ending Transid is invalid or obsolete Attempt by transaction to update or delete a record that it has not previously locked Invalid operation on audited file or nonaudited disk volume Operation invalid for transaction that still has nowait I/Os outstanding on a disk or process file The TMF subsystem has not been started up Attempt to begin more concurrent transactions than can be handled The TMF subsystem has not been configured Device has not been started up for the TMF subsystem BEGINTRANSACTION has been disabled Waiting on a read request and did not get it A control read is pending, new read invalid Remote device has no buffer available Transaction aborted by system because its parent process died
Guardian Programming Reference Summary for C 522630-001 15- 3

Error Codes

91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 110 111 112 113 114 115 119 120 121 122 123 124 130 131 132 133 134

Transaction aborted by system due to database ID inconsistency Distributed transaction aborted by system due to network partition Transaction spanning too many audit files aborted by system Transaction aborted by operator command Transaction aborted because of disk process takeover by BACKUP Transaction aborted because it exceeded the AUTOABORT timeout duration Transaction was aborted Transaction monitor processs network active transactions table is full Attempt to use microcode option that is not installed Device not ready or controller not operational Tape write-protected Paper out, bail open, or end of ribbon Disk not ready due to power failure No response from device Invalid VFU buffer A previously buffered write has failed Only BREAK access permitted Operation aborted because of BREAK READ or WRITEREAD preempted by operator message or too many user console messages DEFINE attributes not valid for attempted function X.25 network line problem restart failure X.25 network problem reset failure Error code value was too large to fit into 8-bit container Data parity error, or attempt to access a tape whose density is higher than the switch setting on the tape drive Data overrun error Request aborted due to possible data loss caused by reset of circuit, or due to CLB sequence error or a DP2 disk process takeover Subdevice busy Line reset is in progress Illegal address to disk Write check error from disk Seek incomplete from disk Access not ready on disk Address compare error on disk
Guardian Programming Reference Summary for C 522630-001 15- 4

Error Codes

135 136 137 138 139 140

Write-protect violation with disk Unit ownership error (dual-port disk) Controller buffer parity error Interrupt overrun Controller error Modem error (communication link not yet established, modem failure, momentary loss of carrier, or disconnect) or FOX link to an EXPAND line handler is down Invalid read or write from/to an optical disk End-of-tape marker detected Runaway tape detected, or attempt to access a tape whose density is lower than the switch setting on the tape drive Unusual end or tape unit went offline or CP6100 file closed while requests in progress Tape drive power on BOT detected during backspace files or backspace records Only nine-track magnetic tape allowed Tape command rejected or communication protocol violation detected I/O process internal error Invalid function requested for Hyper Link Device mode wrong for request, or attempt to execute the PUP PRIMARY command while the tape drive is waiting for a labeled tape mount Request is invalid for device state Impossible event occurred for line state Operation timed out EOT received or power at auto-call unit is off Disconnect received or data line is occupied (busy) RVI received or data line not occupied after setting call request ENQ received or auto-call unit failed to set present next digit EOT received on line bid or data set status not set after dialing all digits NAK received on line bid or auto-call unit failed to clear present next digit after digit present was set WACK received on line bid or auto-call unit set abandon call and retry or station disabled or station not defined No ID sequence received during circuit assurance mode or invalid MCW entry number on write No response received on bid/poll/select, or reply invalid Reply not proper for protocol
Guardian Programming Reference Summary for C 522630-001 15- 5

148 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172

Error Codes

173 174 175 176 177 178 179 180 181 182 183 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 210 211 213 214 215 216 217

Maximum allowable NAKs received (transmission error) or invalid MCW on write or invalid request ID WACK received or CLB frame aborted Incorrect alternating ACK received or command reject POLL sequence ended with no responder Text overrun (insufficient buffer space for data transfer) No address list specified Application buffer is incorrect or control request pending or autopoll active Unknown device status received Status receipt currently enabled for subdevice SNALU access method outbound RU error SNA session has ended Operation returning with no useful data Damage to logical flow of events Response not yet available Device error Device power on or terminal reset Device in diagnose mode Invalid or missing microcode file Device use or mount request rejected by operator Operation requires use of $ZSVR but it is not running Tape label record missing or incorrect An SQL error occurred A DEFINE of the given name could not be found Disk file is Safeguard protected Device is owned by alternate port Current path to the device is down or attempt was made to write to a nonexistent process or error in message system interface Device ownership changed during operation Processor performing operation failed during operation Channel data parity error Channel timeout I/O attempted to absent memory page Memory breakpoint encountered during this I/O Memory parity error during this I/O

Guardian Programming Reference Summary for C 522630-001 15- 6

Error Codes

218 219 220 221 222 223 224 225 230 231 232 233 240 241 246 248 249 250 251 252 255 300-511 538 541 549 550 551 560 561 563 564 565 566 567 573

Interrupt timeout Illegal device reconnect Protect violation Controller handshake violation Bad channel status from EIO instruction Bad channel status from IIO instruction Controller error No unit or multiple units assigned to same unit number Processpr power failed, then restored Controller power failed, then restored Access denied, SMON communication error SERVERCLASS_SEND_ error Network line-handler error, operation not started Network error, operation not started External cluster bypass error, operation aborted Network line-handler error, operation aborted Network error, operation aborted All paths to the system are down Network protocol error Required Expand class is not available Too many interrupts or net line-handler flooded Reserved for application processes Extent size is greater than 65,535 pages A data structure version is incompatible with the requested operation Block mode is not currently allowed on this terminal Illegal position or key value Duplicate exists for insertion-ordered alternate key A PIN greater than 255 was encountered The system did not recognize an item code in a list Buffer too small The system detected an operation that is not allowed for this file type Illegal request Illegal reply DEFINE used is incompatible for use with target systems TOS version Requested process handle cannot be returned
Guardian Programming Reference Summary for C 522630-001 15- 7

Error Codes

578 579 580 581 582 583 584 590 593 594 595 597 632 634 635 638 639 640 1091 1163 40004999 5001 5002 5007 5010 5011

The block size specified is too large The record size specified is too large for the given block size, file type, and format An open failed because the file was oversize and the opener did not specify use of 64-bit primary keys An operation involving 32-bit primary keys was attempted on an open which specified use of 64-bit keys Alternate key information could not be returned because it cannot be expressed in the superseded format of the parameter The extent size specified is too large for format 1 files The operation could not be performed because a software component does not support format 2 disk files Parameter value invalid or inconsistent with another Request has been canceled A DSM/TC error was returned to $ZSVR. Refer to the EMS log for detailed information A ZSSI error was returned to $ZSVR. Refer to the EMS log for detailed information. Required item code in a list is missing Insufficient stack space The system detected a device number greater than 16 bits long Optical disk volume cannot be locked or cannot be accessed because other side is locked Process cannot be stopped until process returns to stopmode 1 Process cannot be stopped until process goes to stopmode 0 DEBUGNOW is required instead of DEBUG for a privileged process Expiration date not reached Illegal operation attempted on a file having a system reserved filename. Open System Services Error Request rejected: requestor executing on a non-SMF system. (device type: 3.36, 25.0, or 52.0) Creation of logical file rejected pending deletion of volume from storage pool. (device type: 3.36, 25.0, or 52.0) SMF access violation: insufficient SMF-privilege to access file. (device type: 3.36, 25.0, or 52.0) An error occurred during SMF lock manager processing. (device type: 3.36, 25.0, or 52.0) An error occurred during access of the ANT table. (device type: 3.36)

Guardian Programming Reference Summary for C 522630-001 15- 8

Error Codes

5012 5013 5014 5015 5017 5018 5028 5034 5035 5043 5048 5049 5050 5053 5064 5065 5072 5073 5076 5313

An error occurred during access of the PENDOPS table. (device type: 3.36, 25.0, or 52.0) The name range for a physical volume is exhausted. (device type: 3.36) No physical volumes are available. (device type: 3.36) The outcome for the request is unknown. (device type: 3.36, 25.0, or 52.0) Unable to read one of the SMF catalog tables. (device type: 3.36, 25.0, or 52.0) An error occurred during message processing. (device type: 3.36, 25.0, or 52.0) Unable to read a received message. (device type: 3.36, 25.0, or 52.0) Unable to start the thread manager. (device type: 3.36, 25.0, or 52.0) Unable to start a thread. (device type: 3.36, 25.0, or 52.0) An error occurred during a read of a SMF catalog file. (device type: 3.36, 25.0, or 52.0) BEGINTRANSACTION error. (device type: 3.36, 25.0, or 52.0) A memory allocation failed. (device type: 3.36, 25.0, or 52.0) An unexpected error occurred during request processing. (device type: 3.36, 25.0, or 52.0) The SMF lock manager reached its lock threshold. (device type: 3.36, 25.0, or 52.0) An error occurred during recovery processing. (device type: 3.36, 25.0, or 52.0) An error occurred during indeterminate outcome processing. (device type: 3.36, 25.0, or 52.0) Recovery processing was unable to initialize PENDOPS processing. (device type: 3.36, 25.0, or 52.0) A PENDOPS semaphore failed; the process that locked a SMF object could not be identified. (device type: 3.36, 25.0, or 52.0) An invalid operation code was found in the PENDOPS table; the PENDOPS entry is invalid. (device type: 3.36, 25.0, or 52.0) A virtual disk process encountered an error when trying to perform the requested operation. (device type: 3.36)

Sequential I/O Error Codes


Code 512 513 514 515 516 517 Description Invalid parameter Missing file name Device not supported Invalid access Invalid buffer address Invalid file code
Guardian Programming Reference Summary for C 522630-001 15- 9

Error Codes

518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537

Buffer too small Invalid block length Invalid record length Invalid EDIT file File already open EDITREAD or EDITREADINIT error occurred File is closed; check, read, set, write, or wait error Access violation No stack space Temporary buffer required EDIT file ran out of space Write error Invalid write to $RECEIVE Unable to open $RECEIVE I/O started An internal error occurred Checksum error Checksum error Common FCB is in old format Line number of EDIT file too long

DEFINE Error Codes


Code 0 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 Description Successful completion A syntax error occurred in the DEFINE name The DEFINE name already exists The DEFINE name does not exist Unable to obtain file-system buffer space Unable to obtain physical memory There was a bounds error in a parameter An attribute is not allowed for the current CLASS An attribute is missing Required attribute missing from current CLASS in working set Working set inconsistent for current CLASS The working set for DEFINEs is invalid
Guardian Programming Reference Summary for C 522630-001 15 -10

Error Codes

2060 2061 2062 2063 2064 2066 2067 2068 2069 2071 2073 2074 2075 2076 2077 2078 2079

No more DEFINEs are allowed No more attributes are allowed for the DEFINE The attribute is invalid for the DEFINE The name of the default subvolume has a syntax error in the SET DEFINE command Resetting a required DEFINE attribute is not allowed A required parameter is missing An invalid value was supplied for an attribute The CLASS name identifies a nonexistant CLASS Attempt to add a DEFINE that does not fall under current DEFMODE setting The DEFINE specifies a 7-character device name, which cannot be converted to a network name on a C-series system Replacing the =_DEFAULTS DEFINE with a DEFINE having the same name but a class other than DEFAULTS is not allowed Deleting the DEFINE is not allowed A DEFINE option is invalid The buffer is too small for the saved DEFINE An extended address parameter referred to an invalid segment The DEFINERESTORE buffer does not contain a valid saved DEFINE Cannot save the working set because the name is =_DEFAULTS and the working set is not CLASS DEFAULTS.

NEWPROCESS and NEWPROCESSNOWAIT Error Codes A NEWPROCESS or NEWPROCESSNOWAIT error is returned to the calling process in a word containing two 8-bit fields. The lefthand part of the error word, bits 0-7, contains one of the error codes shown below. The righthand part, bits 8-15, can contain either an error subcode or a file-system error code. Refer to the Guardian Procedure Errors and Messages Manual for further information.
Code 0 1 2 3 4 5 6 7 Description No error Undefined external(s) No PCB available File-system error on program-file Unable to allocate map File-system error on swap file Illegal file format Unlicensed privileged program
Guardian Programming Reference Summary for C 522630-001 15 -11

Error Codes

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

Process name error Library conflict Unable to communicate with system monitor process File-system error on library file Program file and library file are the same Invalid segment size unable to set up the page tables File-system error on initial setup of the swap file Illegal home terminal I/O error on home terminal DEFINE context propagation error Object file with an illegal device subtype Process device subtype specified in backup process isnt the same as primarys DSC error: bad ZZPIM file DSC error: dynamic IOP error PFS^SIZE is out of range Cannot create PFS An unknown error number was returned from a remote system Unable to allocate a priv stack for the process Unable to lock the priv stack for the process Unable to allocate a main stack for the process DSC error: unable to lock the main stack of a native IOP Security inheritance failure Unable to allocate native globals Unable to lock native globals Main stack maximum value too large Heap maximum value too large Space guarantee value too large Duplicate shared run-time library (SRL) Unknown SRL specified by program Unknown SRL specified by another SRL Too many SRLs Program file requires fixup SRL requires fixups Program file security violation SRL security violation
Guardian Programming Reference Summary for C 522630-001 15 -12

Error Codes

43 47 48 49 50 51 52 53 54 55 119 3xx 5xx

Program requires symbol from shared run-time library (SRL) Cannot guarantee swap space Mismatch on number of SRLs Undefined externals in SRL Incorrect number of SRLs in program file Incorrect number of SRLs in library SRL must be licensed Unable to obtain global virtual space Symbolic reference target/source type mismatch External data reference not resolved to any user/system library Error number returned is too large SRL has invalid file format File-system error on SRL number xx

PROCESS_CREATE_ Error Codes


Code 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Description No error Error while accessing program file Parameter error Bounds violation Error while accessing library file Error while accessing swap file Error while accessing extended swap file File-system error on PFS Illegal home terminal I/O error on home terminal Unable to communicate with system monitor process Process name error Illegal program file format Illegal library file format Undefined externals No PCB available Unable to allocate map Unlicensed privileged program Library conflict
Guardian Programming Reference Summary for C 522630-001 15 -13

Error Codes

19 20 21 22 24 25 26 27 29 30 31 32 33 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52

Program file and library file are the same Object file with an illegal device subtype Process device subtype specified in backup process is not the same as primary Backup creation specified, but caller is unamed DEFINE context propagation error DSC error: invalid ZZPIM file Dynamic IOP error Invalid PFS size Unable to allocate a priv stack for the process Unable to lock the priv stack for the process Unable to allocate a main stack for the process DSC error: unable to lock the main stack of a native IOP Security inheritance failure Internal PROCESS_CREATE_ error Child's PFS error Unable to allocate global data for the process Unable to lock global IOP data for the process The main stack maximum value, specified either by the procedure call or by the object file, is too large. The heap maximum value, specified either by the procedure call or by the object file, is too large. The space guarantee value, specified either by the procedure call or by the object file, is too large. The process creation request specifies two files that contain the same shared runtime library (SRL) names. Unable to find a SRL specified by the program file Unable to find a SRL specified by another SRL The process creation request specifies too many SRLs The program file requires fixups to a SRL but the program file is currently running A SRL requires fixups to another SRL Security violation. The program file is not licensed BUT a SRL containing instance data is licensed Security violation. Either the program file or SRL is licensed but a SRL is not licensed The program file requires a symbol from a SRL but the SRL is not exporting it The specified version, Z^VERSION, of the ZSYS^DDL^PLAUNCH^PARMS structure is not supporteD
Guardian Programming Reference Summary for C 522630-001 15 -14

Error Codes

53 54 55 56 57 58 59 60 61 62 63 104 106 107 108 110 111 112 113 114 115 116 3xx 5xx

The specified version, Z^VERSION, of the ZSYS^DDL^PLAUNCH^PARMS structure is incompatible with the specified length, Z^LENGTH, of the structure Internal process creation error The specified space guarantee cannot be allocated Internal process creation error A shared run-time library (SRL) has undefined externals Internal process creation error Internal process creation error Security violation; a SRL containing callable procedures must be licensed to be used by callable or privileged code Unable to obtain global vitual space Symbolic reference target/source type mismatch External data references not resolved to any user/system library Unable to create OSS process OSS start interpreter error OSS static variable error Not running on an OSS system error OSS current working directory error OSS file descriptor dup error OSS file descriptor open error OSS file descriptor open timeout error Cannot create OSS prive process Unable to allocate global data or heap for the process (PROCESS_SPAWN_ only) Unable to propagate SRL data (PROCESS_SPAWN_ ONLY) Invalid file format on SRL number xx File-system error on SRL number xx

Guardian Programming Reference Summary for C 522630-001 15 -15

Error Codes

PROCESS_GETINFOLIST_ Error Codes


Code 0 1 2 3 4 5 6 7 9 10 11 12 Description No error A file-system error occurred Parameter error Bounds error Specified process does not exist Unable to communicate with CPU Unable to connunicate with node No more matches Invalid search code Invalid search value Invalid return attribute code Invalid search option

Guardian Programming Reference Summary for C 522630-001 15 -16

Error Codes

PROCESS_GETPAIRINFO_ Error Codes


Code 0 2 3 4 5 6 7 8 9 10 11 13 Description No error Parameter error Bounds error Single named process Callers pair: caller is current primary Callers pair: caller is current backup Process is unamed Search is complete Process does not exist Unable to communicate with node Target is a process controlling a device or volume, but bit 15 was not set Limited information is returned for a process that is not started

PROCESS_SPAWN_ Open System Services (OSS) Errors


Code 0 4002 4005 4007 4008 4009 4011 4012 4013 4014 4020 4022 4126 4131 4203 4212 Description NO ERROR NO SUCH FILE OR DIRECTORY I/O ERROR ARGUMENT LIST TOO LONG EXEC FORMAT ERROR BAD FILE DESCRIPTOR NO MORE PROCESSES INSUFFICIENT USER MEMORY PERMISSION DENIED BAD ADDRESS NOT A DIRECTORY INVALID FUNCTION ARGUMENT CONNECTION TIMED OUT FILE NAME TOO LONG OSS NOT RUNNING OR NOT INSTALLED AN ERROR OCCURRED DURING INVOCATION OF A DEFINE PROCEDURE

Guardian Programming Reference Summary for C 522630-001 15 -17

Error Codes

ALLOCATESEGMENT Error Codes


Code 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 Description No error Illegal segment ID Illegal segment size Bounds violation on swap file parameter Illegal combination of options Unable to allocate segment space Unable to allocate segment page table space Security violation PIN does not exist No segment allocated to PIN Trying to share segment with self Requested segment is currently being resized or is incompatible

SEGMENT_ALLOCATE_ Error Codes


Code 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Description No error Error creating or opening segment swap file Parameter error Bounds violation Illegal segment ID Illegal segment size Unable to allocate segment space Unable to allocate segment page table space Security violation PIN does not exist No segment allocated to PIN Trying to share segment with self Requested shared segment is incompatible Requested segment already allocated Unable to allocate the PST Requested address range already allocated

Guardian Programming Reference Summary for C 522630-001 15 -18

Error Codes

Subsystem Programmatic Interface (SPI) Error Codes


Code 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -26 -27 Description No error Invalid buffer format Illegal parameter value Missing parameter Illegal parameter address Buffer full Invalid checksum Internal error Token not found Illegal token code or map Invalid subsystem ID Operation not supported Insufficient stack space File-system error Guardian procedure error Invalid template file More text is available See Tandem representative No format ID available

EDITREAD and EDITREADINIT Error Codes


Code 0 or greater -1 -2 -3 -4 -5 Description No error End-of-file encountered I/O error Text file format error Sequence number error Checksum error

Guardian Programming Reference Summary for C 522630-001 15 -19

Error Codes

IOEdit Error Codes In addition to the error codes shown here, the IOEdit procedures can also return filesystem error codes. Some of the file-system error codes have special meanings when returned by IOEdit. Refer to the Guardian Procedure Errors and Messages Manual for details.
Code -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 Description Inconsistent directory size value Record numbers in the directory are out of order A record number in the directory is beyond legal range A block number in the directory is outside the file Duplicate block numbers in the directory Numbers ran out Record numbers out of order Record length too large Record format inconsistent Cannot do renumbering Error accessing non-EDIT file line numbers Error accessing non-EDIT file change tags Change tag should be appended to record Both tag and record number error Change tag overlays text

Formatter Error Codes


Code 267 268 270 271 272 273 274 Description Buffer overflow No buffer Format loopback Edit item mismatch Illegal input character Bad format Numeric overflow

Guardian Programming Reference Summary for C 522630-001 15 -20

16 ASCII Character Set


Character NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS Left 000000 000400 001000 001400 002000 002400 003000 003400 004000 004400 005000 005400 006000 006400 007000 007400 010000 010400 011000 011400 012000 012400 013000 013400 014000 014400 015000 015400 016000 016400 Right 000000 000001 000002 000003 000004 000005 000006 000007 000010 000011 000012 000013 000014 000015 000016 000017 000020 000021 000022 000023 000024 000025 000026 000027 000030 000031 000032 000033 000034 000035 Hexadecimal 00 01 02 03 04 05 06 07 08 09 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Meaning Null Start of heading Start of text End of text End of transmission Enquiry Acknowledge Bell Backspace Horizontal tabulation Line feed Vertical tabulation Form feed Carriage return Shift out Shift in Data link escape Device control 1 Device control 2 Device control 3 Device control 4 Negative acknowledge Synchronous idle End of transmission block Cancel End of medium Substitute Escape File separator Group separator

Guardian Programming Reference Summary for C 522630-001 16- 1

ASCII Character Set

RS US SP ! " # $ % & ' ( ) * + , . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @

017000 017400 020000 020400 021000 021400 022000 022400 023000 023400 024000 024400 025000 025400 026000 026400 027000 027400 030000 030400 031000 031400 032000 032400 033000 033400 034000 034400 035000 035400 036000 036400 037000 037400 040000

000036 000037 000040 000041 000042 000043 000044 000045 000046 000047 000050 000051 000052 000053 000054 000055 000056 000057 000060 000061 000062 000063 000064 000065 000066 000067 000070 000071 000072 000073 000074 000075 000076 000077 000100

1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

Record separator Unit separator Space Exclamation point Quotation mark Number sign Dollar sign Percent sign Ampersand Apostrophe Opening parenthesis Closing parenthesis Asterisk Plus Comma Hyphen (minus) Period (decimal point) Right slash Zero One Two Three Four Five Six Seven Eight Nine Colon Semicolon Less than Equals Greater than Question mark Commercial at sign

Guardian Programming Reference Summary for C 522630-001 16- 2

ASCII Character Set

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c

040400 041000 041400 042000 042400 043000 043400 044000 044400 045000 045400 046000 046400 047000 047400 050000 050400 051000 051400 052000 052400 053000 053400 054000 054400 055000 055400 056000 056400 057000 057400 060000 060400 061000 061400

000101 000102 000103 000104 000105 000106 000107 000110 000111 000112 000113 000114 000115 000116 000117 000120 000121 000122 000123 000124 000125 000126 000127 000130 000131 000132 000133 000134 000135 000136 000137 000140 000141 000142 000143

41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

Uppercase A Uppercase B Uppercase C Uppercase D Uppercase E Uppercase F Uppercase G Uppercase H Uppercase I Uppercase J Uppercase K Uppercase L Uppercase M Uppercase N Uppercase O Uppercase P Uppercase Q Uppercase R Uppercase S Uppercase T Uppercase U Uppercase V Uppercase W Uppercase X Uppercase Y Uppercase Z Opening bracket Back slash Closing bracket Circumflex Underscore Grave accent Lowercase a Lowercase b Lowercase c

Guardian Programming Reference Summary for C 522630-001 16- 3

ASCII Character Set

d e f g h i j k l m n o p q r s t u v w x y z { | } ~ DEL

062000 062400 063000 063400 064000 064400 065000 065400 066000 066400 067000 067400 070000 070400 071000 071400 072000 072400 073000 073400 074000 074400 075000 075400 076000 076400 077000 077400

000144 000145 000146 000147 000150 000151 000152 000153 000154 000155 000156 000157 000160 000161 000162 000163 000164 000165 000166 000167 000170 000171 000172 000173 000174 000175 000176 000177

64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F

100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

Lowercase d Lowercase e Lowercase f Lowercase g Lowercase h Lowercase i Lowercase j Lowercase k Lowercase l Lowercase m Lowercase n Lowercase o Lowercase p Lowercase q Lowercase r Lowercase s Lowercase t Lowercase u Lowercase v Lowercase w Lowercase x Lowercase y Lowercase z Opening brace Vertical line Closing brace Tilde Delete

Guardian Programming Reference Summary for C 522630-001 16- 4

17 TNS Instruction Set


TNS Alphabetical List of Instructions
The mnemonics and opcodes for the TNS instruction set are listed in alphabetical order in the following table. For complete information about these instructions, refer to the Himalaya S-Series Server Description Manual. TNS/R instructions are not documented in this manual. A single asterisk following an instruction description denotes a privileged instruction, and a double asterisk denotes an instruction intended for operating system use only.
Mnemonic ADAR ADDI ADDS ADM ADRA ADXI ALS ANG ANLI ANRI ANS ANX ARS ASPT BANZ BAZ BCLD BEQL BFI BGEQ BGTR BIC BIKE BLEQ Octal Code 00016104--002---74--00014104--0302-000044 007--006--000034 000046 0303-000470 -154--144-000452 -12--000030 -13---11---10--000464 -16--Description Add A to Register Add Immediate Add to S Add to Memory Add Register to A Add to Index Immediate Arithmetic Left Shift AND to Memory AND Left Immediate AND Right Immediate AND to SG Memory AND to Extended Memory Arithmetic Right Shift Address of Segment Page Table Header * Branch on A Branch on A Zero Bus Cold Load * Branch if Equal Branch Forward Indirect Branch if Greater or Equal Branch if Greater Branch if Carry Bicycle While Idle * Branch if Less or Equal

Guardian Programming Reference Summary for C 522630-001 17- 1

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic BLSS BNDW BNEQ BNOC BNOV BOX BPT BSUB BTST BUN CAQ CAQV CCE CCG CCL CDE CDF CDFR CDG CDI CDQ CDX CED CEDR CEF CEFR CEI CEIR CEQ CEQR CFD CFDR CFE CFI

Octal Code -14--000450 -15---17---164--1-4-000451 -174-000007 -l04-000262 000261 000016 000017 000015 000334 000306 000326 000366 000307 000265 000356 000314 000315 000276 000277 000337 000337 000337 000323 000312 000313 000325 000311

Description Branch if Less Bounds Test Words * Branch if Not Equal Branch if No Carry Branch if No Overflow Branch on X Instruction Breakpoint Trap Branch to Subprocedure Byte Test Branch Convert ASCII to Quad Convert ASCII to Quad with Initial Value Condition Code Equal to Condition Code Greater than Condition Code Less than Convert Doubleword to Extended Float Convert Doubleword to Float Convert Doubleword to Float (Round) Count Duplicate Words Convert Doubleword to Integer Convert Doubleword to Quad Count Duplicate Words Extended Extended Float to Doubleword Extended Float to Doubleword (Round) Extended Float to Float Extended Float to Float (Round) Extended Float to Integer Extended Float to Integer (Round) Extended Float to Quadrupleword Extended Float to Quadrupleword (Round) Floating to Doubleword Floating to Doubleword (Round) Floating to Extended Float Floating to Integer

Guardian Programming Reference Summary for C 522630-001 17- 2

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic CFIR CFQ CFQR CID CIE CIF CIQ CLQ CMBX CMPI CMRW COMB COMW CQA CQD CQE CQER CQF CQFR CQI CQL CRAX DADD DALS DARS DCMP DDIV DDTX DDUP DFG DFS DFX DISP DLEN

Octal Code 000310 000320 000321 000327 000332 000331 000266 000267 000422 001--000432 1262-0262-000260 000247 000336 000335 000324 000330 000264 000246 000423 000220 1302-1303-000225 000223 000456 000006 000367 000357 000416 000073 000070

Description Floating to Integer (Round) Floating to Quadrupleword Floating to Quadrupleword (Round) Convert Integer to Doubleword Convert Integer to Extended Float Convert Integer to Floating Convert Integer to Quad Convert Logical to Quad Compare Bytes Extended Compare Immediate Correctable Memory Error Read/Write * Compare Bytes Compare Words Convert Quad to ASCII Convert Quad to Doubleword Convert Quad to Extended Convert Quad to Extended (Round) Convert Quad to Floating Convert Quad to Floating (Round) Convert Quad to Integer Convert Quad to Logical Convert Relative to Absolute Extended * Double Add Double Arithmetic Left Shift Double Arithmetic Right Shift Double Compare Double Divide DDT Request * Double Duplicate Deposit Field in Memory Deposit Field in System Deposit Field in Extended Memory Dispatch * Disk Record Length **

Guardian Programming Reference Summary for C 522630-001 17- 3

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic DLLS DLRS DLTE DMPY DNEG DOFS DPCL DPF DSUB DTL DTST DXCH DXIT EADD ECMP EDIV EIO EIOC EMPY ENEG ESUB EXCH EXIT FADD FCMP FDIV FMPY FNEG FRST FSUB FTL HALT HIIO IADD

Octal Code 1300-1301-000054 000222 000224 000057 000032 000014 000221 000207 000031 000005 000072 000300 000305 000303 000060 000512 000302 000304 000301 000004 125--000270 000275 000273 000272 000274 000405 000271 000206 000074 000062 000210

Description Double Logical Left Shift Double Logical Right Shift Delete Element from List * Double Multiply Double Negate Disk Record Offset ** Dynamic Procedure Call Deposit Field Double Subtract Determine Time Left for Element * Double Test Double Exchange DEBUG Exit * Extended Floating-Point Add Extended Floating-Point Compare Extended Floating-Point Divide Execute I/O * Exchange EIOC Table Entries * Extended Floating-Point Multiply Extended Floating-Point Negate Extended Floating-Point Subtract Exchange Exit Procedure Floating-Point Add Floating-Point Compare Floating-Point Divide Floating-Point Multiply Floating-Point Negate Firmware Reset * Floating-Point Subtract Find Position in Time List * Processor Halt * High-Priority Interrogate I/O * Integer Add

Guardian Programming Reference Summary for C 522630-001 17- 4

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic ICMP IDIV IDX1 IDX2 IDX3 IDXD IDXP IIO IMPY INEG INSR ISUB IXIT LADD LADI LADR LAND LBA LBAS LBP LBX LBXX LCKX LCMP LDA LDAS LDB LDD LDDX LDI LDIV LDLI LDRA LDX

Octal Code 000215 000213 000344 000345 000346 000317 000347 000061 000212 000214 000055 000211 000071 000200 003---7---000010 000364 000354 -2-4-000406 0256--, 0266-000430 000205 000362 000352 -5----6---000412 100--000203 005--00013-3----

Description Integer Compare Integer Divide Calculate Index, 1 Dimension Calculate Index, 2 Dimension Calculate Index, 3 Dimension Calculate Index, Bounds in Data Space Calculate Index, Bounds in Code SpaceIDXP Interrogate I/O * Integer Multiply Integer Negate Insert Element into List * Integer Subtract Interrupt Exit * Logical Add Logical Add Immediate Load AddressLADR Logical AND Load Byte via A Load Byte via A from System Load Byte from Program Load Byte Extended Load Byte Extended, Indexed Lock Down Extended Memory * Logical Compare Load Double via A Load Double via A from System Load Byte Load Double Load Double Extended Load Immediate Logical Divide Load Left Immediate Load Register to A Load X

Guardian Programming Reference Summary for C 522630-001 17- 5

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic LDXI LLS LMPY LNEG LOAD LOR LQAS LQX LRS LSUB LWA LWAS LWP LWUC LWX LWXX MAPS MBXR MBXX MNDX MNGG MOND MOVB MOVW MRL MVBX MXFF MXON NOP NOT NSAR NSTO ONED ORG

Octal Code 10---0300-000202 000204 -4---000011 000445 000414 0301-000201 000360 000350 -2---000342 000410 0254--, 0264-000042 000420 000421 000227 000226 000001 126--026--000075 000417 000041 000040 000000 000013 00012-34--000003 000045

Description Load X Immediate Logical Left Shift Logical Multiply Logical Negate Load Logical OR Load Quadrupleword via A from SG * Load Quadrupleword Extended Logical Right Shift Logical Subtract Load Word via A Load Word via A from System Load Word from Program Load Word from User Code Space Load Word Extended Load Word Extended, Indexed Map In a Segment * Move Bytes Extended, Reverse Move Bytes Extended, and Checksum Move Words while Not Duplicate, Extended Move Words while Not Duplicate Minus One Double Move Bytes Move Words Merge onto Ready List * Move Bytes Extended Mutual Exclusion Off * Mutual Exclusion On * No Operation Not Nondestructive Store A in a Register Nondestructive Store One Double OR to Memory

Guardian Programming Reference Summary for C 522630-001 17- 6

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic ORLI ORRI ORS ORX PCAL POP PSEM PUSH QADD QCMP QDIV QDWN QLD QMPY QNEG QRND QST QSUB QUP RCHN RCLK RCPU RDE RDP RIBA RIOC RIR RPT RSMT RSPT RSUB RSW RUS RWCS

Octal Code 0044-004--000035 000047 027--124--000076 024--00024 000245 000243 0002500023000242 000244 000263 00023000241 00025000447 000050 000051 000024 000025 000440 000510 000063 000442 000436 000424 025--000026 000461 000402

Description OR Left Immediate OR Right Immediate OR to SG Memory OR to Extended Memory Procedure Call Pop from Stack P a Semaphore * Push to Stack Quad Add Quad Compare Quad Divide Quad Scale Down Quad Load Quad Multiply Quad Negate Quad Round Quad Store Quad Subtract Quad Scale Up Reset I/O Channel * Read Clock Read Processor Number Read ENV Register Read P Register Read INTA and INTB Registers * Read EIOC table entry * Reset Interrupt * Read Process Timer * Read From Operations & Service Processor * Read Segment Page Table Entry * Return from Subprocedure Read Switches Read Micro State * Read LCS *

Guardian Programming Reference Summary for C 522630-001 17- 7

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic RXBL SBA SBAR SBAS SBRA SBU SBW SBX SBXX SCMP SCPV SCS SDA SDAS SDDX SEND SETE SETL SETP SETS SFRZ SIOC SMAP SMBP SNDQ SPT SQAS SQX SRST SSW STAR STB STD STOR

Octal Code 000426 000365 00017000355 000151266-1264-000407 0257--, 0267-000454 000463 000444 000363 000353 000413 000065 000022 000020 000023 000021 000053 000460 000067 000404 000052 000443 000446 000415 000455 000027 00011-54---64---44---

Description Read Extended Base and Limit * Store Byte via A Subtract A from a Register Store Byte via A into System Subtract Register from A Scan Bytes Until Scan Bytes While Store Byte Extended Store Byte Extended, Indexed Set Code Map Set Current Process Variables * Set Code Segment Store Double via A Store Double via A into System Store Double Extended Send * Set ENV Register Set L Register Set P Register Set S Register System Freeze * Store Entry to IOC * Set Map * Set Memory Breakpoint * Signal a Send Is Queued * Set Process Timer * Store Quadrupleword via A to SG * Store Quadrupleword Extended Soft Reset * Set Switches Store A in Register Store Byte Store Double Store

Guardian Programming Reference Summary for C 522630-001 17- 8

TNS Instruction Set

TNS Alphabetical List of Instructions

Mnemonic STRP SVMP SWA SWAS SWX SWXX SXBL TOTQ TRCE ULKX VSEM WIOC WSMT WSPT WWCS XCAL XIOC XMSK XOR XSMG XSMX ZERD

Octal Code 00010000441 000361 000351 000411 0255--, 0265 000427 000056 000217 000431 000077 000511 000437 000425 000400 127--000462 000064 000012 000343 000333 000002

Description Set RP Save Map Entries * Store Word via A Store Word via A into System Store Word Extended Store Word Extended, Indexed Set Extended Base and Limit * Test OUTQ ** Add Entry to Trace Table * Unlock Extended Memory * "V" a Semaphore * Write EIOC table entry * Write to Operations and Service Processor * Write Segment Page Table Entry * Write to LCS * External Call Exchange IOC entries * Exchange Mask * Exclusive OR Compute Checksum in Current Data Checksum Extended Block Zero Double

Guardian Programming Reference Summary for C 522630-001 17- 9

TNS Instruction Set

TNS Alphabetical List of Instructions

TNS Categorized List of Instructions


The mnemonics and opcodes for the instruction set are grouped by type of instruction in the following tables. For complete information about these instructions, refer to the Himalaya S-Series Server Description Manual. A single asterisk following an instruction description denotes a privileged instruction, and a double asterisk denotes an instruction intended for operating system use only. 16-Bit Arithmetic (Top of Register Stack)
IADD LADD ISUB LSUB IMPY LMPY IDIV LDIV INEG LNEG ICMP LCMP CMPI ADDI LADI 000210 000200 000211 000201 000212 000202 000213 000203 000214 000204 000215 000205 001--104--003--Integer Add Logical Add Integer Subtract Logical Subtract Integer Multiply Logical Multiply Integer Divide Logical Divide Integer Negate Logical Negate Integer Compare Logical Compare Integer Compare Immediate Integer Add Immediate Logical Add Immediate

Guardian Programming Reference Summary for C 522630-001 17 -10

TNS Instruction Set

TNS Alphabetical List of Instructions

32-Bit Signed Arithmetic


CDI CID DADD DSUB DMPY DDIV DNEG DCMP DTST MOND ZERD ONED 000307 000327 000220 000221 000222 000223 000224 000225 000031 000001 000002 000003 Convert Double to Integer Convert Integer to Double Double Add Double Subtract Double Multiply Double Divide Double Negate Double Compare Double Test (Load) Minus One Double (Load) Zero Double (Load) One Double

16-Bit Signed Arithmetic (Register Stack Environment)


ADRA SBRA ADAR SBAR ADXI 00014000150001600017104--Add Register to A Subtract Register from A Add A to Register Subtract A from Register Add to Index Immediate

Decimal Arithmetic Load and Store


QLD QST 0002300023Quadruple Load Quadruple Store

Decimal Integer Arithmetic


QADD QSUB QMPY QDIV QNEG QCMP 000240 000241 000242 000243 000244 000245 Quadruple Add Quadruple Subtract Quadruple Multiply Quadruple Divide Quadruple Negate Quadruple Compare

Guardian Programming Reference Summary for C 522630-001 17 -11

TNS Instruction Set

TNS Alphabetical List of Instructions

Decimal Arithmetic Scaling and Rounding


QUP QDWN QRND 0002500025000263 Quadruple Scale Up Quadruple Scale Down Quadruple Round

Decimal Arithmetic Conversions


CQI CQL CQD CQA CIQ CLQ CDQ CAQ CAQV 000264 000246 000247 000260 000266 000267 000265 000262 000261 Convert Quad to Integer Convert Quad to Logical Convert Quad to Double Convert Quad to ASCII Convert Integer to Quad Convert Logical to Quad Convert Double to Quad Convert ASCII to Quad Convert ASCII to Quad with Initial Value

Floating-Point Arithmetic
FADD FSUB FMPY FDIV FNEG FCMP 000270 000271 000272 000273 000274 000275 Floating-Point Add Floating-Point Subtract Floating-Point Multiply Floating-Point Divide Floating-Point Negate Floating-Point Compare

Extended Floating-Point Arithmetic


EADD ESUB EMPY EDIV ENEG ECMP 000300 000301 000302 000303 000304 000305 Extended Floating-Point Add Extended Floating-Point Subtract Extended Floating-Point Multiply Extended Floating-Point Divide Extended Floating-Point Negate Extended Floating-Point Compare

Guardian Programming Reference Summary for C 522630-001 17 -12

TNS Instruction Set

TNS Alphabetical List of Instructions

Floating-Point Conversions
CEF CEFR CFI CFIR CFD CFDR CED CEDR CEI CEIR CFQ CFQR CEQ CEQR CFE CIF CDF CDFR CQF CQFR CIE CDE CQE CQER 000276 000277 000311 000310 000312 000313 000314 000315 000337 000316 000320 000321 000322 000323 000325 000331 000306 000326 000324 000330 000332 000334 000336 000335 Convert Extended to Floating Convert Extended to Floating, Rounded Convert Floating to Integer Convert Floating to Integer, Rounded Convert Floating to Double Convert Floating to Double, Rounded Convert Extended to Double Convert Extended to Double, Rounded Convert Extended to Integer Convert Extended to Integer, Rounded Convert Floating to Quad Convert Floating to Quad, Rounded Convert Extended to Quad Convert Extended to Quad, Rounded Convert Floating to Extended Convert Integer to Floating Convert Double to Floating Convert Double to Floating, Rounded Convert Quad to Floating Convert Quad to Floating, Rounded Convert Integer to Extended Convert Double to Extended Convert Quad to Extended Convert Quad to Extended, Rounded

Floating-Point Functionals
IDX1 IDX2 IDX3 IDXP IDXD 000344 000345 000346 000347 000317 Calculate Index, 1 Dimension Calculate Index, 2 Dimensions Calculate Index, 3 Dimensions Calculate Index, Bounds in Code Space Calculate Index, Bounds in Data Space

Guardian Programming Reference Summary for C 522630-001 17 -13

TNS Instruction Set

TNS Alphabetical List of Instructions

Register Stack Manipulation


EXCH DXCH DDUP STAR NSAR LDRA LDI LDXI LDLI 000004 000005 000006 000110001200013100--10---005--Exchange A with B Double Exchange Double Duplicate Store A in a Register Nondestructive Store A in a Register Load A from a Register Load Immediate Load Index Immediate Load Left Immediate

Boolean Operations
LAND LOR XOR NOT ORRI ORLI ANRI ANLI 000010 000011 000012 000013 004--0044-006--007--Logical AND Logical OR Exclusive OR NOT OR Right Immediate OR Left Immediate AND Right Immediate AND Left Immediate

Bit Shift and Deposit


DPF LLS DLLS LRS DLRS ALS DALS ARS DARS 000014 0300-1300-0301-1301-0302-1302-0303-1303-Deposit Field Logical Left Shift Double Logical Left Shift Logical Right Shift Double Logical Right Shift Arithmetic Left Shift Double Arithmetic Left Shift Arithmetic Right Shift Double Arithmetic Right Shift

Guardian Programming Reference Summary for C 522630-001 17 -14

TNS Instruction Set

TNS Alphabetical List of Instructions

BYTE Test
BTST 000007 Byte Test

Memory Stack to/from Register Stack


LWP LBP PUSH POP LWXX SWXX LBXX SBXX LDX NSTO LOAD STOR LDB STB LDD STD LADR ADM -2----2-4-024--124--0254--, 0264-0255--, 0265-0256--, 0266-0257--, 0267--3----34---4----44---5----54---6----64---7----74--Load Word from Program Load Byte from Program Push Registers to Memory Pop Memory to Registers Load Word Extended, Indexed Store Word Extended, Indexed Load Byte Extended, Indexed Store Byte Extended, Indexed Load Index Nondestructive Store Load Word Store Word Load Byte Store Byte Load Double Store Double Load Address of Variable Add to Memory

Guardian Programming Reference Summary for C 522630-001 17 -15

TNS Instruction Set

TNS Alphabetical List of Instructions

Load and Store via Address on Register Stack


ANS ORS ANG ORG ANX ORX LWUC LWAS LWA SWAS SWA LDAS LDA SDAS SDA LBAS LBA SBAS SBA DFS DFG LBX SBX LWX SWX LDDX SDDX LQX SQX DFX SCS LQAS SQAS 000034 000035 000044 000045 000046 000047 000342 000350 000360 000351 000361 000352 000362 000353 000363 000354 000364 000355 000365 000357 000367 000406 000407 000410 000411 000412 000413 000414 000415 000416 000444 000445 000446 AND to SG Memory OR to SG Memory AND to Current Data OR to Current Data AND to Extended Memory OR to Extended Memory Load Word from User Code Segment Load Word via A from System Load Word via A Store Word via A into System Store Word via A Load Double via A from System Load Double via A Store Double via A into System Store Double via A Load Byte via A from System Load Byte via A Store Byte via A into System Store Byte via A Deposit Field into System Data Deposit Field in Current Data Load Byte Extended Store Byte Extended Load Word Extended Store Word Extended Load Doubleword Extended Store Doubleword Extended Load Quadrupleword Extended Store Quadrupleword Extended Deposit Field Extended Set Code Segment Load Quadrupleword via A from SG * Store Quadrupleword via A to SG *

Guardian Programming Reference Summary for C 522630-001 17 -16

TNS Instruction Set

TNS Alphabetical List of Instructions

Branching
BIC BUN BOX BGTR BEQL BGEQ BLSS BAZ BNEQ BANZ BLEQ BNOV BNOC BFI -10---104--1-4--11---12---13---14---144--15---154--16---164--17--000030 Branch if Carry Branch Unconditionally Branch on Index Branch if CC Greater Branch if CC Equal Branch if CC Greater or Equal Branch if CC Less Branch if A Zero Branch if CC Not Equal Branch if A Not Zero Branch if CC Less or Equal Branch if no Overflow Branch if no Carry Branch Forward Indirect

Moves, Compares, Scans, and Checksum Computations


MNGG CDG MOVW MOVB COMW COMB SBW SBU MNDX XSMX XSMG CDX MVBX MBXR MBXX CMBX 000226 000366 026--126--0262-1262-1264-1266-000227 000333 000343 000356 000417 000420 000421 000422 Move Words While Not Duplicate Count Duplicate Words Move Words Move Bytes Compare Words Compare Bytes Scan Bytes While Scan Bytes Until Move Words While Not Duplicate, Extended Checksum Extended Block Compute Checksum in Current Data Count Duplicate Words Extended Move Bytes Extended Move Bytes Extended Reverse Move Bytes Extended, and Checksum Compare Bytes Extended

Guardian Programming Reference Summary for C 522630-001 17 -17

TNS Instruction Set

TNS Alphabetical List of Instructions

Program Register Control


SETL SETS SETE SETP RDE RDP STRP ADDS CCL CCE CCG 000020 000021 000022 000023 000024 000025 00010002--000015 000016 000017 Set L Register Set S Register Set ENV Register Set P Register Read ENV Register Read P Register Set Register Pointer Add to S Register Set CC Less Set CC Equal Set CC Greater

Routine Calls/Returns
PCAL XCAL SCMP DPCL EXIT DXIT BSUB RSUB 027--127--000454 000032 125--000072 -174-025--Procedure Call External Procedure Call Set Code Map Dynamic Procedure Call Exit from Procedure DEBUG Exit * Branch to Subprocedure Return from Subprocedure

Interrupt System
RIR XMSK IXIT DISP RIBA 000063 000064 000071 000073 000440 Reset INT Register * Exchange MASK Register * Exit from Interrupt Handler * Dispatch * Read INTA and INTB Registers *

Bus Communication
TOTQ SEND 000056 000065 Test Out Queues ** Send Packet *

Guardian Programming Reference Summary for C 522630-001 17 -18

TNS Instruction Set

TNS Alphabetical List of Instructions

Input/Output
RSW SSW EIO IIO HIIO RCHN LIOC SIOC XIOC RIOC WIOC EIOC 000026 000027 000060 000061 000062 000447 000457 000460 000462 000510 000511 000512 Read Switch Register Set Switch Register Execute I/O * Interrogate I/O * High-Priority Interrogate I/O * Reset I/O Channel * Load IOC * Store IOC * Exchange IOC entries * Read EIOC table entry * Write EIOC table entry * Exchange EIOC table entries *

Miscellaneous
NOP RCLK RCPU BPT RUS BIKE 000000 000050 000051 000451 000461 000464 No Operation Read Clock Read Processor Number Instruction Breakpoint Trap Read Micro State * Bicycle While Idle *

Guardian Programming Reference Summary for C 522630-001 17 -19

TNS Instruction Set

TNS Alphabetical List of Instructions

Resource Management
MXON MXFF SNDQ SFRZ DOFS DLEN HALT PSEM VSEM VWCS WWCS RWCS FRST RSMT WSMT RPT SPT BCLD SRST DDTX 000040 000041 000052 000053 000057 000070 000074 000076 000077 000401 000400 000402 000405 000436 000437 000442 000443 000452 000455 000456 Mutual Exclusion On * Mutual Exclusion Off * Signal a Send Is Queued * System Freeze * Disk Record Offset ** Disk Record Length ** Processor Halt * "P" a Semaphore * "V" a Semaphore * Verify LCS * Write LCS * Read LCS * Firmware Reset * Read from Operations & Service Processor * Write to Operations & Service Processor * Read Process Timer * Set Process Timer * Bus Cold Load * Soft Reset * DDT Request *

Guardian Programming Reference Summary for C 522630-001 17 -20

TNS Instruction Set

TNS Alphabetical List of Instructions

Memory Management
MAPS SMAP CRAX RSPT WSPT RXBL SXBL LCKX ULKX CMRW SVMP BNDW SCPV ASPT 000042 000067 000423 000424 000425 000426 000427 000430 000431 000432 000441 000450 000463 000470 Map In a Segment * Set Map * Convert Relative to Absolute Extended * Read Segment Page Table Entry * Write Segment Page Table Entry * Read Extended Base and Limit * Set Extended Base and Limit * Lock Down Extended Memory * Unlock Extended Memory * Correctable Memory Error Read/Write * Save Map Entries * Bounds Test Words * Set Current Process Variables * Address of Segment Page Table Header *

List Management
DLTE INSR MRL FTL DTL 000054 000055 000075 000206 000207 Delete Element from List * Insert Element into List * Merge onto Ready List * Find Position in Time List *

Determine Time Left for Element

Trace and Breakpoints


TRCE SMBP 000217 000404 Add Entry to Trace Table * Set Memory Breakpoint *

Guardian Programming Reference Summary for C 522630-001 17 -21

TNS Instruction Set

TNS Alphabetical List of Instructions

Guardian Programming Reference Summary for C 522630-001 17 -22

Potrebbero piacerti anche