Guardian Programming Ref for C

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 Published 522630-001 February 2002

Transcript of Guardian Programming Ref for C

Page 1: Guardian Programming Ref for C

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 Published

522630-001 February 2002

Page 2: Guardian Programming Ref for C

Document History Part Number Product Version Published

142747 G06.03 December 1998

422953-001 G06.06 August 1999

522630-001 G09 February 2002

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

Document DisclaimerInformation 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 StatementExport of the information contained in this manual may require authorization from the U.S. Department of Commerce.

ExamplesExamples 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 CustomersFOR 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 Software—Restricted 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 Software—Restricted 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.

Page 3: Guardian Programming Ref for C

Guardian Programming Reference Summary for C

Tables

What’s 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-001iii

Page 4: Guardian Programming Ref for C

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 SetTNS Alphabetical List of Instructions 323

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

Table 9-1. CONTROL Operation 1 227

Table 9-2. CONTROL Operations 2 - 27 229

Guardian Programming Reference Summary for C—522630-001iv

Page 5: Guardian Programming Ref for C

What’s New in This Manual

Manual InformationGuardian 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.

Document History

Part Number Published

522630-001 February 2002

Part Number Product Version Published

142747 G06.03 December 1998

422953-001 G06.06 August 1999

522630-001 G09 February 2002

Guardian Programming Reference Summary for C—522630-001v

Page 6: Guardian Programming Ref for C

What’s 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-001vi

Page 7: Guardian Programming Ref for C

About This Manual

Your Comments InvitedAfter 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 NotationThe 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-001vii

Page 8: Guardian Programming Ref for C

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-001viii

Page 9: Guardian Programming Ref for C

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 ] /* i */ ,[ short _near *old-value ] ); /* 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-001ix

Page 10: Guardian Programming Ref for C

About This Manual Change Bar Notation

Guardian Programming Reference Summary for C—522630-001x

Page 11: Guardian Programming Ref for C

1 Process Name and ID FormatsD-Series Process File Name Formats

The syntax for a process file name that identifies an unnamed process is:

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

The syntax for a process file name that identifies a named process is:

[node]process-name[:seq-no][.qual-l[.qual-2]]

node

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-0011-1

Page 12: Guardian Programming Ref for C

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-0011-2

Page 13: Guardian Programming Ref for C

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

File Code Description

100 Object file

101 EDIT-format file

110 EDIT VS recovery file

111 EDIT VS stack dump file (data area image)

115 TEDIT TEDPROFL file

120-128 Spooler control files

129 Spooler job file

130 Inspect save file

134 TMF audit-trail file

170 XRAYSCAN structured output files for Enform reports

175 Measure data file

176 NonStop SQL Table file for Surveyor

180 C data file

223 Enable log file

230-232 Ada data file

250 Transfer profile file

251 Transfer session file

252 Transfer item descriptor file

253 Transfer recipient file

254 Transfer folder file

255 Transfer item data file

256 Transfer distribution list file

257 Transfer ready file

258 Transfer time file

259 Transfer network file

260 Transfer inverted folder file

261 Transfer restart file

Guardian Programming Reference Summary for C—522630-0012-1

Page 14: Guardian Programming Ref for C

File Codes

262 Transfer name file

263 Transfer DIN file

264 Transfer alias file

265 Transfer trace file

266 Transfer queue file

267 Transfer inverted attachment file

268 Transfer external objects file

275 Transfer WORDLINK and Translator format name file

276 Transfer WORDLINK and Translator character map file

277 Transfer WORDLINK and Translator batch gateway configuration file

278 Transfer WORDLINK and Translator format type file

280 Transfer WORDLINK and Translator text server text file

281 Transfer System Management Monitor database monitor sample file

282 Transfer System Management Monitor queue monitor sample file

283-299 Transfer files

300 TPS (Pathway) TCL program directory file

301 TPS (Pathway) TCL program code file

302 TPS (Pathway) SCREEN COBOL symbol file

303-304 TPS (Pathway) files

305 TPS (Pathway) TCP data area swap file

306 TPS (Pathway) AM control file

307 TPS (Pathway) Path TCP dump file

308 TPS (Pathway) Pathway trace file

309 TPS (Pathway) PATHMON stack dump file

310-399 TPS (Pathway) files

400 Tape simulator control file

401 Tape simulator data file

410 EXERCISE message file

411 EXERCISE error information file

412-419 EXERCISE files

430 EXERCISE Tandump segmented save file

Guardian Programming Reference Summary for C—522630-0012-2

Page 15: Guardian Programming Ref for C

File Codes

440 TACL saved variable segment file

450 C00 file server and ViewPoint status display configuration file

451 Event display configuration file

500 NonStop II processor microcode file

502 NonStop II microcode file for SHADOW

505 5106 Tri-Density tape drive microcode object file

510 Standard (unformatted) microcode file

520 NonStop TXP processor microcode file

521 GASM-format microcode object file

525 NonStop VLX processor microcode file

540-549 Safeguard files

550-599 NonStop SQL files

600 MUMPS global file

601 MUMPS routine file

602 MUMPS global directory file

603-620 MUMPS files

660 Encore capture file

661-669 Encore files

700 Native object file

830-831 Comm trace files

832-833 Comm configuration files

834-835 Comm configuration database files

840 SNAX utility output file

841 COUP database file

842 COUP process image file

843 EMS logger file

844 EMS formatter template

845 EMS compiled filter

846 Cover files

847-848 NetBatch files

849 DNS configuration file

Guardian Programming Reference Summary for C—522630-0012-3

Page 16: Guardian Programming Ref for C

File Codes

850 DNS database file

851 SNAX5 configuration file

852 NonStop CLX shutdown file

853-854 Optical disk files

855 FUP restart file

888 Enform compiled query file

904 Exchange trace file

Guardian Programming Reference Summary for C—522630-0012-4

Page 17: Guardian Programming Ref for C

3 Device Types and Subtypes

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

Type DeviceSubtype D-Series Description G-Series Description

0 Process 0 Default subtype for general use

Default subtype for general use

1-49 Reserved for definition by Tandem. The following subtypes are defined:

1 = CMI process2 = Security monitor process30 = Device simulation process31 = Spooler collector process

Reserved for definition by Tandem. The following subtypes are defined:

1 = CMI process2 = Security monitor process30 = WANBOOT process31 = Spooler collector process

48 = TFTP server process

49 = SNMP trap multiplexor

50-63

For general use For general use

1 Operator con-sole

0 $0 (operator process) or alternate collector

$0 (operator process) or alternate collector

1 $0.#ZSPI ($0 opened to receive SPI commands)

$0.#ZSPI ($0 opened to receive SPI commands)

2 $Z0 (compatibility distributor)

$Z0 (compatibility distributor)

2 $RECEIVE 0

3 Disk 2 4103 (160 MB formatted capacity)

N.A.

3 4104 (240 MB formatted capacity)

N.A.

4 4105 or 4106 (64 MB formatted capacity)

N.A.

5 4109 (moving-head part, 64 MB formatted capacity)

N.A.

6 4116 (540 MB formatted capacity)

N.A.

Guardian Programming Reference Summary for C—522630-0013-1

Page 18: Guardian Programming Ref for C

Device Types and Subtypes

3 Disk 7 4109 (fixed-head part, 1.45 MB formatted capacity)

N.A.

8 4110, 4111 (128 MB formatted capacity)

N.A.

4120 (V8) (128 MB formatted capacity)

N.A.

9 4114 or 4115 (264 MB formatted capacity)

N.A.

10 4130 (XL8) (415 MB formatted capacity)

N.A.

16 4160 (V80) (265 MB formatted capacity) with 3125 controller

N.A.

17 4210 (145 MB formatted capacity)

N.A.

18 4170 (XL80) (895 MB formatted capacity) with 3129 controller

N.A.

19 4220 (300 MB formatted capacity) with 3681 MFC

N.A.

20 4580 (8 GB) with 3129 controller

N.A.

21 4230 (648 MB formatted capacity) with 3681 MFC

N.A.

22 4500 (1038 MB formatted capacity per spindle) with 3128 controller

N.A.

23 4240 (1038 MB formatted capacity) with 3681 MFC

N.A.

26 4330 (160 MB formatted capacity)

N.A.

29 4250 (2 GB formatted capacity) with 3681 MFC

N.A.

31 4510 (2 GB formatted capacity per spindle) with 3128 controller

N.A.

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-2

Page 19: Guardian Programming Ref for C

Device Types and Subtypes

3 Disk 33 4245 (1038 MB formatted capacity) with 3681 MFC

N.A.

34 4255 (2 GB formatted capacity) with 3681 MFC

N.A.

36 NonStop Storage Manage-ment Foundation (SMF) virtual disk process

38 4560 (2 GB formatted capaity per spindle) with 3129 controller

4560 (2 GB formattedcapacity per spindle) with ServerNet/DA

39 4570 (4 GB) 4570 (4 GB) with ServerNet/DA

41 N.A. 4604 (4 GB)

42 N.A. 4608 (8 GB)

4609 (8 GB)

43 N.A. 4618 (18 GB)

43 N.A. 4619 (18 GB) (15,000 rpm)

44 N.A.

4580

4636 (36 GB)

4590 (18 GB) with ServerNet/DA

48 4590 (18 GB) 4590 (18 GB) with ServerNet/DA

56 5200 Optical Disk Subsystem (1.3 GB per volume) with 3128 controller

N.A.

4 Magnetic tape unit

0 5101, 5103, 5104, 5110, 5114 (9-track, 45/125 ips) tape units with 3202 controller

N.A.

1 5105 (7-track, 45 ips) tape unit with 3203 controller

N.A.

2 5106 (tri density) master tape unit or 5107 slave unit with 3206 controller

N.A.

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-3

Page 20: Guardian Programming Ref for C

Device Types and Subtypes

3 5101, 5103, 5104, 5110, 5114 (9-track, 45/125 ips) tape units with 3207 controllers

N.A.

4 Magnetic tape unit

4 5130 (9-track, 200 ips) master tape unit or 5131 slave unit with 3208 controller

N.A.

5 5120 cartridge tape unit with 3209 or 3681 controller in 3681 MFC

N.A.

6 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

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

7 5130 master tape unit (9-track, 200 ips) or 5131 slave unit with 3211 controller

N.A.

8 5180 tape unit (18 track, 38000 bpi) with 3215 controller

N.A.

9 5190 tape unit (18 track, 38000 bpi) with 3216 controller or 3681 MFC and 5194 tape unit (36 tracks, 38000 bpi)

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

10 5188 tape unit (38000 bpi) with 3217 controller

N.A.

11 5142 DAT with PMF or IOMF

5 Printer 0 SNAX PRT protocol

1 5502, 5503, 5504, 5510, 5513, and 5514 (parallel printers) or 5518 parallel printer (for 7-bit data trans-fer) with 3601 UI

N.A.

3 5508 (serial printer)

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-4

Page 21: Guardian Programming Ref for C

Device Types and Subtypes

4 5520 (serial printer)

5 Printer 5 5510, 5513, 5514 (alternate character set) for parallel (band) printers or 5518 parallel printer (for 8-bit data transfer) with 3601 UI

N.A.

6 5530 (letter-quality serial printer)

7 5515, 5516 dot matrix (parallel and serial printers) 5518 dot matrix (parallel printer)

8 5573 or 5574 laser (serial printer)

9 5512 dot matrix (serial printer)

10 5577 laser (serial printer)

32 ASYNC_PRT Device. Non-standard serial printers (DTR printer and 554x printers)

6 Terminal 0 Conversational mode (P/N 6401/6402) or ASYNC_TERM device

Conversational mode (P/N 6401/6402) or PATP-TERM (non-Tandem) device

1 Page mode (P/N 6511, 6512) Page mode (P/N 6511, 6512)

2 Page mode (P/N 6520, 6524) Page mode (P/N 6520, 6524)

3 Page mode (P/N 6520 remote) ITI protocol for use by AM6520

N.A.

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

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

5 Page mode (P/N 6530 remote) ITI protocol for use by AM6520

N.A.

6-10 Conversational mode Conversational mode

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-5

Page 22: Guardian Programming Ref for C

Device Types and Subtypes

6 = 3277 (screen size 12x40) 6 = 3277 (screen size 12x40)

6 Terminal 7 = 3277 (screen size 24x80) 7 = 3277 (screen size 24x80)

8 = 3277 (screen size 32x80) 8 = 3277 (screen size 32x80)

9 = 3277 (screen size 43x80) 9 = 3277 (screen size 43x80)

10 = 3277 (screen size 12x80)

10 = 3277 (screen size 12x80)

11 6340 FaxLink 6340 FaxLink

16 Nonstandard device with 3606 controller, for read-continuous/type-ahead capability

SNAX Interac-tive Terminal Interface (ITI) Protocol

20 3275-11, 3276-1 & -11,3277-1, 3278-1

3275-11, 3276-1 & -11,3277-1, 3278-1

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

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

22 3276-3, 3278-3, 3277-3,3279-3A, -3B, -S3G, & -03X

3276-3, 3278-3, 3277-3,3279-3A, -3B, -S3G, & -03X

23 3276-4 & -14, 3278-4,3277-4, 6580-A04, -A06, -A08, & -A10

3276-4 & -14, 3278-4,3277-4, 6580-A04, -A06, -A08, & -A10

24 3278-5 3278-5

30 3262, 3284, 3286, 3282, 3289

3262, 3284, 3286, 3282, 3289

32 Hard-copy console 6603/6604 terminal

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-6

Page 23: Guardian Programming Ref for C

Device Types and Subtypes

7 Envoy data communica-tions line

0 BISYNC, point-to-point, nonswitched

BISYNC, point-to-point, nonswitched

1 BISYNC, point-to-point, switched

BISYNC, point-to-point, switched

2 BISYNC, multipoint, tributary

BISYNC, multipoint, tributary

3 BISYNC, multipoint, supervisor

BISYNC, multipoint, supervisor

8 ADM-2, multipoint, supervisor

ADM-2, multipoint, supervisor

9 TINET, multipoint, supervisor

TINET, multipoint, supervisor

10 Burroughs, multipoint, supervisor

Burroughs, multipoint, supervisor

11 Burroughs, point-to-point, contention

Burroughs, point-to-point, contention

13 Burroughs, point-to-point, contention

Burroughs, point-to-point, contention

30 Full duplex (FDX), out line Full duplex (FDX), out line

31 Full duplex (FDX), in line Full duplex (FDX), in line

32 NASDAQ, Full duplex (FDX), out line

NASDAQ, Full duplex (FDX), out line

33 NASDAQ, Full duplex (FDX), in line

NASDAQ, Full duplex (FDX), in line

40 Asynchronous line supervisor

50 Isochronous line N.A.

56 Automatic calling unit (ACU)

N.A.

8 Open SCSI N.A.

9 Process-to-pro-cess interface

0 X25AM process

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-7

Page 24: Guardian Programming Ref for C

Device Types and Subtypes

10 Terminal SNAX Cathode-Ray Tube (CRT) protocol

0 327x CRT mode Interface 327x CRT mode Interface

20 3275-11, 3276-1 & -11, 3277-1, 3278-1

3275-11, 3276-1 & -11, 3277-1, 3278-1

21 3275-12, 3276-2 & -12,3277-2, 3278-2, 3178-C10, -C20, -C3, & -C4,3279-2A, -2B, -S2A, -S2B, & -02X

3275-12, 3276-2 & -12,3277-2, 3278-2, 3178-C10, -C20, -C3, & -C4,3279-2A, -2B, -S2A, -S2B, & -02X

22 3276-3, 3278-3, 3277-3,3279-3A, -3B, -S3G, & -03X

3276-3, 3278-3, 3277-3,3279-3A, -3B, -S3G, & -03X

23 3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, -A08, & -A10

3276-4 & -14, 3278-4, 3277-4, 6580-A04, -A06, -A08, & -A10

24 3278-5, 3276-5, 3277-5 3278-5, 3276-5, 3277-5

30 3262, 3284, 3286, 3287, 3289

3262, 3284, 3286, 3287, 3289

11 EnvoyACP/XF 40 FRMEXF or SDLCXF (synchronous data-link control) line

41 HDLCXF (high-level data-link control) line

42 ADCCP (advanced data communications control procedures) line

43 Frame protocol

12 Tandem-to-IBM Link (TIL)

0

13 SNAX/XF or SNAX/APN

5 SNASVM (Service Manager Process)

14 SNALU 0 SNA Application Logical Unit (SNALU)

15 SNAX/3501 0 3501 Data Encryption Devices

3501 Data Encryption Devices

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-8

Page 25: Guardian Programming Ref for C

Device Types and Subtypes

15 SNAX/3501 1 Key manager (ZKEY) Key manager (ZKEY)

3 High performance security modules

High performance security modules

NSP 4 Atalla A6000 Network Security Processor with 3605 controller

Atalla A6000 Network Security Processor

19 IPX/SPX 0 Manager process Manager process

1 Protocol process Protocol process

20-23

NTM/MP 0 NonStop Transaction Manager/MP

NonStop Transaction Manager/MP

24 OSS Open System Services Open System Services

25 SMF pool 0 N.A. Storage pool process

26 Tandem Hyper-Link (THL)

0

27 IPBMON 0 Interprocessor bus monitor for Fiber Optic Extension (FOX) or TorusNet vertical subsystem in FOX-compatibility mode

Interprocessor bus moni-tor for Fiber Optic Extension (FOX) or TorusNet vertical sub-system in FOX-compatibility mode

5 $IPB1 (TorusNet vertical subsystem master service manager in multiple-link mode)

$IPB1 (TorusNet vertical subsystem master service manager in multiple-link mode)

6 Service manager for additional TorusNet vertical links

Service manager for additional TorusNet verti-cal links

28 $ZNUP 0 Network Utility Process

29 $ZMIOP 1 Subsystem manager

30 Optical disk unit 0 5200 Optical Storage Facility (OSF) disk drive with 3128 controller

N.A.

1 5410 optical disk subsystem with 3219 controller

N.A.

2 5411 optical disk subsystem with 3220 controller

N.A.

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-9

Page 26: Guardian Programming Ref for C

Device Types and Subtypes

30 Optical disk unit 3 5420 optical disk subsystem with 3220 controller

N.A.

31 SNMP 0 NonStop SNMP Agent NonStop SNMP Agent

36 TandemTalk 1 AppleTalk Transaction Protocol (ATP)

N.A.

2 AppleTalk Data Stream Protocol (ADSP)

N.A.

3 AppleTalk Session Protocol (ASP)

N.A.

4 AppleTalk Printer Access Protocol (PAP)

N.A.

37 ISDN 0 Integrated Services Digital Network Subsystem Manager

Integrated Services Digital Network Sub-system Manager

43 SLSA 0 N.A. ServerNet LAN Systems Access (SLSA) manager process (LAN MAN)

1 N.A. ServerNet LAN Systems Access (SLSA) monitor process (LAN MON)

44 any device type > 63

0 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.

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 QIO 0 Queued I/O Monitor Process Queue I/O Monitor Process

46 TELNET 0 TELNET Server Process TELNET Server Process

48 TCP/IP 0

49 SNAX/CDF 0 N.A.

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-10

Page 27: Guardian Programming Ref for C

Device Types and Subtypes

50 CSM 0 Communications Subsystem Manager with 3650, 6100, or 6110 controller

N.A.

1 Single-board (SBSCSM) with 3605 or 3606 controller

N.A.

2 N.A. SWAN Concentrator Manager(CONMGR)

3 N.A. $ZZWAN WAN manager process

63 Subsystem Control Point (SCP)

Subsystem Control Point (SCP)

51 CP6100 0 Line interface unit (LIU) Line interface unit (LIU)

1 Bisynchronous (BISYNC) point-to-point line

Bisynchronous (BISYNC) point-to-point line

2 ADCCP line ADCCP line

3 TINET line N.A.

4 MPSB Burroughs multipoint MPSB Burroughs multipoint

52 SMF master 0 N.A. SMF master process

53 ATP6100 0 ASYNCTERMPROC: Terminals or serial printers attached to 3605, 6105, or 6110 controller (LIU-1)

1 ASYNCTERMPROC: Terminals or serial printers attached to 3606, 6105, or 6110 controller (LIU-4)

2 ASYNCPROC: ATP6100 lines on the 3681 multifunction controller

54 DDNAM 0 Non-3650 or non-6100

63 3650 or 6100

55 Open Systems Interconnection (OSI)

1 N.A. OSI/Application Services (OSI/AS) Manager

4 N.A. Transport service provider (TSP)

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-11

Page 28: Guardian Programming Ref for C

Device Types and Subtypes

55 Open Systems Interconnection (OSI)

5 N.A. Tandem application, presentation, and session (TAPS) processes

11 N.A. OSI/Message Handling System (OSI/MHS)

12 N.A. OSI/Message Handling System (OSI/MHS)

20 N.A. OSI/FTAM Application Manager

21 N.A. OSI/FTAM Services

24 N.A. OSI/CMIP

25 N.A. OSI/FTAM Services

56 Multilan 0 MLAM line attached to the 3613, 3615, or 3616 TLAM controller

N.A.

1 Network-basic input-output system (NETBIOS)

N.A.

2 Dynamic Configuration Management

N.A.

3 Controller Debug N.A.

4 SAP NAM (Expand) N.A.

5 Ethernet N.A.

6 Logical link control (LLC) type 1

N.A.

57 GDS 0 General Device Support General Device Support

58 SNAX/XF or SNAX/APN

0 SDLC (6203 or 6204) line with 3604 controller

1 Line to 3605, 6100, or 6110 controller

2 Line attached to 3840, or 3841 SNAXLink controller (SNAX/XF only)

N.A.

3 SNAX/XF Over X.25 (SOX)

4 Support for TLAM token-ring lines

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-12

Page 29: Guardian Programming Ref for C

Device Types and Subtypes

59 AM6520 0 Line attached to a byte-syn-chronous controller

N.A.

10 Line attached to 3605, 6100 CSS, or 6105 or 6110 CC

N.A.

60 AM3270 0 Line attached to a byte-synchronous controller

10 Line attached to 3605, 6100 CSS, or 6105 or 6110 CC

Line attached to SWAN concentrator

TR3271 1 Line attached to a byte-synchronous controller

11 Line attached to 3605, 6100 CSS, or 6105 or 6110 CC

Line attached to SWAN concentrator

61 X.25 0-61 Line attached to a 3604 controller

N.A.

62 Line attached to a 3681 multifunction controller

N.A.

63 Line attached to 3605, 6110 controller, or 6100 CSS

Line attached to SWAN concentrator

62 Expand NCP 0 $NCP Network Control Process

63 Expand Line Handler

0 NETNAM single-line handler attached to a non-3605 controller

NETNAM single-line handler attached to a non-3605 controller

1 NETDIRECT multiline line handler

NETDIRECT multiline line handler

2 Multiline line handler attached to a non-3605 con-troller

Multiline line handler attached to a non-3605 controller

3 NETCLUSTER FOX line handler

NETCLUSTER FOX line handler

5 NETDIRECT single-line handler attached to 3605, 6100, 6110 CSS, or 6105 CC

NETDIRECT single-line handler attached to 3605, 6100, 6110 CSS, or 6105 CC

6 Multiline line handler attached to 3605, 6100, 6110 CSS, or 6105 CC

Multiline line handler attached to 3605, 6100, 6110 CSS, or 6105 CC

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-13

Page 30: Guardian Programming Ref for C

Device Types and Subtypes

65 Storage Sub-system Manager

0 N.A. responsible for the configuration and control of storage I/O processes

66 NonStop Ker-nel Management

0 N.A. responsible for the configuration and control of system-wide attributes and generic processes

67 SCSI Lock Management

0 N.A. responsible for coordinating resource sharing SCSI I/O subsystem components across processors

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

Type DeviceSubtype D-Series Description G-Series Description

Guardian Programming Reference Summary for C—522630-0013-14

Page 31: Guardian Programming Ref for C

4 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.

_status_eq (<return_value>) The DST table was loaded successfully.

Guardian Programming Reference Summary for C—522630-0014-1

Page 32: Guardian Programming Ref for C

Functions Summary (A-C)

ADDRESS_DELIMIT_

Obtains the addresses of the first and last bytes of a particular area of the caller’s logical address space. It can also obtain a set of flags that describe the area, and the logical segment ID of the area.

return value:!

address-descriptor

#include <cextdecs(ADDRESS_DELIMIT_)>short ADDRESS_DELIMIT_ ( long address /* i */ ,long *low-address /* o */ ,long *high-address /* o */ ,short *address-descriptor /* o */ ,short *segment-id /* o */ ,short error-detail ); /* o */

0 No error; the requested values are returned. 2 Parameter error; address parameter was missing. 3 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.

4 address is not mapped. 5 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 .

Bits 0-6 Bits are reserved; 0 is returned.Bit 7 A flat, kernel-aliased segment. A kernel-aliased segment does not have a

corresponding absolute segment address.Bit 8 A flat, aliased segment. An aliased segment has a corresponding absolute

segment address.Bit 9 The currently addressable extended data segment.Bit 10 Accessible only by privileged processes.Bit 11 Shared by another process.Bit 12 Cannot be deallocated.Bit 13 Writeback-inhibited.Bit 14 Extensible.Bit 15 Resident.

Guardian Programming Reference Summary for C—522630-0014-2

Page 33: Guardian Programming Ref for C

Functions Summary (A-C)

segment-id

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.

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

#include <cextdecs(ADDRTOPROCNAME)>short ADDRTOPROCNAME ( short p-reg /* i */ ,short stack-env /* i */ ,char *proc-name /* o */ ,short proc-name-size /* i */ ,short *proc-name-length /* o */ ,[short *base ] /* o */ ,[short *size ] /* o */ ,[short *entry ] /* o */ ,[short *attributes ] /* o */ ,[short pin ] ); /* i */

Guardian Programming Reference Summary for C—522630-0014-3

Page 34: Guardian Programming Ref for C

Functions Summary (A-C)

return value:

stack-env

attributes

_status_eq (<return_value>) The symbolic procedure name was found; error contains 0.

_status_gt (<return_value>) An error occurred; error contains the error value.

0 Successful call; the procedure name is deposited into proc-name for proc-name-length bytes.

11 A procedure name was not found.22 One of the parameters specifies an address that is out of bounds.23 The p-reg, stack-env, and pin parameters do not indicate a legal code

location.24 The pin parameter was supplied, and the caller is not privileged.29 A required parameter was not supplied.122 The supplied value of proc-name-size is less than the length of the

procedure name that is to be returned into proc-name.

Bit 4 = Library bitBit 7 = System code bitBits 11-15 = Space ID bits

Bit 0 = Priv bitBit 1 = Callable bitBit 2 = Resident bitBit 3 = Interrupt bitBit 4 = Entry point bitBit 5 = Variable bitBit 6 = Extensible bitBits 7-15 = PEP number

Guardian Programming Reference Summary for C—522630-0014-4

Page 35: Guardian Programming Ref for C

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-0014-5

Page 36: Guardian Programming Ref for C

Functions Summary (A-C)

AWAITIO[X] Completes a previously initiated I/O operation.

timelimit

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(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>) An error occurred (call FILEINFO)._status_eq (<return_value>) An I/O operation finished._status_gt (<return_value>) A warning occurred (call FILEINFO).

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

#include <cextdecs(BACKSPACEEDIT)>short BACKSPACEEDIT ( short filenum ); /* i */

Guardian Programming Reference Summary for C—522630-0014-6

Page 37: Guardian Programming Ref for C

Functions Summary (A-C)

BINSEM_CLOSE_ Closes access to a binary semaphore.

return value:

BINSEM_CREATE_ Creates, opens, and locks a binary semaphore.

return value:

#include <cextdecs(BINSEM_CLOSE_)>short BINSEM_CLOSE_ ( long semid ); /* i */

0 = No error.29 = Required parameter missing. The semid parameter must be specified.4022 = 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.

4045 = 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.

#include <cextdecs(BINSEM_CREATE_)>short BINSEM_CREATE_ ( long *semid /* o */ ,short security ); /* i */

0 = No error. 22 = Bounds error. The semid parameter cannot be written to by the calling

process.29 = Required parameter missing. The semid and security parameters must

be specified.4022 = 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.

4024 = 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.

4028 = 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-0014-7

Page 38: Guardian Programming Ref for C

Functions Summary (A-C)

BINSEM_FORCELOCK_Forces a lock on a binary semaphore

return value:

BINSEM_LOCK_Locks a binary semaphore.

return value:

#include <cextdecs(BINSEM_FORCELOCK_)>short BINSEM_FORCELOCK_ ( long semid /* i */ ,short *processhandle );/* o */

0 = No error. 22 = Bounds error. The processhandle parameter cannot be written to by the

calling process.4022 = 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.

4045 = Deadlock. The binary semaphore was forsaken before the procedure call, and it is now locked. The corresponding OSS errno value is EDEADLK.

4103 = 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.

#include <cextdecs(BINSEM_LOCK_)>short BINSEM_LOCK_ ( long semid /* i */ ,long timeout );/* i */

0 = No error. The binary semaphore becomes locked. 4011 = Operation timed out. The timeout value was reached before the binary

semaphore could be locked. The corresponding OSS errno value is EAGAIN.

4022 = 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.

4045 = Deadlock. The binary semaphore was forsaken before the procedure call, and it is now locked. The corresponding OSS errno value is EDEADLK.

Guardian Programming Reference Summary for C—522630-0014-8

Page 39: Guardian Programming Ref for C

Functions Summary (A-C)

BINSEM_OPEN_ Opens a binary semaphore.

return value:

BINSEM_UNLOCK_ Unlocks a binary semaphore.

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

0 = No error. 22 = Bounds error. The semid parameter cannot be written by the calling

process, or processhandle cannot be read from the calling process.29 = Required parameter missing. The semid, processhandle, and proc-

semid parameters must be specified.4002 = No entry. The proc-semid and processhandle parameters do not

identify a binary semaphore in the processor. The corresponding OSS errno value is ENOENT.

4013 = 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.

4022 = 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.

4024 = 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.

#include <cextdecs(BINSEM_UNLOCK_)>short BINSEM_UNLOCK_ ( long semid ); /* i */

Guardian Programming Reference Summary for C—522630-0014-9

Page 40: Guardian Programming Ref for C

Functions Summary (A-C)

return value:

BREAKMESSAGE_SEND_ Sends a break-on-device message to a specified process.

CANCEL Cancels the oldest incomplete operation on a file opened nowait.

CANCELPROCESSTIMEOUT Cancels a timer set by SIGNALPROCESSTIMEOUT.

0 = No error.4001 = Cannot lock. The semid parameter is not locked by the calling process.

The corresponding OSS errno value is EPERM. 4022 = 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.

#include <cextdecs(BREAKMESSAGE_SEND_)>short BREAKMESSAGE_SEND_ ( short *processhandle /* i */ ,short receiver-filenum /* i */ ,[ short *breaktag ] ); /* i */

#include <cextdecs(CANCEL)>_cc_status CANCEL ( short filenum ); /* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) The operation was canceled.

#include <cextdecs(CANCELPROCESSTIMEOUT)>_cc_status CANCELPROCESSTIMEOUT ( short tag ); /* i */

_status_eq (<return_value>) CANCELPROCESSTIMEOUT was successful._status_gt (<return_value>) The value of tag was invalid.

Guardian Programming Reference Summary for C—522630-0014-10

Page 41: Guardian Programming Ref for C

Functions Summary (A-C)

CANCELREQ Cancels an incomplete operation on a file opened for nowait I/O.

CANCELTIMEOUT Cancels a timer initiated by SIGNALTIMEOUT.

CHANGELIST Controls polling when the application program acts as a supervisor or tributary station in a centralized multipoint configuration.

#include <cextdecs(CANCELREQ)>_cc_status CANCELREQ ( short filenum /* i */ ,[ long tag ] );/* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) The operation was canceled.

#include <cextdecs(CANCELTIMEOUT)>_cc_status CANCELTIMEOUT ( short tag ); /* i */

_status_eq (<return_value>) CANCELTIMEOUT finished successfully._status_gt (<return_value>) The value of tag was invalid.

#include <cextdecs(CHANGELIST)>_cc_status CHANGELIST ( short filenum ,short function /* i */ ,short parameter );/* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) The CHANGELIST procedure executed

successfully.

Guardian Programming Reference Summary for C—522630-0014-11

Page 42: Guardian Programming Ref for C

Functions Summary (A-C)

function

parameter

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.

return value:

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

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

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

1 = The BREAK key was pressed; the process owns BREAK.0 = The BREAK key was not pressed; this process does not own BREAK.

Guardian Programming Reference Summary for C—522630-0014-12

Page 43: Guardian Programming Ref for C

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

TNS C Programming Information

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.

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

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

Guardian Programming Reference Summary for C—522630-0014-13

Page 44: Guardian Programming Ref for C

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 Programmer’s 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 Programmer’s Guide.

CHECKOPEN (superseded by FILE_OPEN_CHKPT_) Is called by a primary process to open a designated file for the primary’s 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 process’s 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 Programmer’s Guide.

CHECKPOINTMANY (superseded by CHECKPOINTMANYX) Is called by a primary process to send information about the primary process’s 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 Programmer’s Guide.

CHECKPOINTMANYX Is called by a primary process to send information about the primary process’s 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 Programmer’s Guide.

Guardian Programming Reference Summary for C—522630-0014-14

Page 45: Guardian Programming Ref for C

Functions Summary (A-C)

CHECKPOINTX Is called by a primary process to send information about the primary process’s 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 Programmer’s 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 Programmer’s 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 Programmer’s 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 Programmer’s Guide.

CHILD_LOST Examines a system message to determine whether a specified process or process pair has been lost.

return value

#include <cextdecs(CHILD_LOST_ )>short CHILD_LOST_ ( char *message /* i */ ,short length /* i */ ,short *processhandle );/* i */

0 = Process or process pair is not lost.1 = Reserved.2 = Parameter error.

Guardian Programming Reference Summary for C—522630-0014-15

Page 46: Guardian Programming Ref for C

Functions Summary (A-C)

message

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.

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_.

3 = Bounds error.4 = Process or process pair is lost.5 = System message is not relevant.

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

#include <cextdecs(CLOSE_FILE)>short CLOSE_FILE ( { short _near *common-fcb } /* i */ { short _near *file-fcb } /* i */ ,[ short tape-disposition ] ); /* i */

#include <cextdecs(CLOSEALLEDIT)>void CLOSEALLEDIT ();

Guardian Programming Reference Summary for C—522630-0014-16

Page 47: Guardian Programming Ref for C

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_.

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_.

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(CLOSEEDIT_ )>short CLOSEEDIT_ ( short filenum /* i */ ,[ short keep-filenum ] );/* i */

#include <cextdecs(COMPLETEIOEDIT)>short COMPLETEIOEDIT ( short filenum /* i,o */ ,short count-transferred /* i */ ,long tag); /* i */

#include <cextdecs(COMPRESSEDIT)>short COMPRESSEDIT ( short *filenum /* i,o */ ,short count-transferred /* i */ ,long tag); /* i */

Guardian Programming Reference Summary for C—522630-0014-17

Page 48: Guardian Programming Ref for C

Functions Summary (A-C)

COMPUTEJULIANDAYNO Converts a Gregorian calendar date on or after January 1, 0001, to a Julian day number.

error-mask

COMPUTETIMESTAMP Converts a Gregorian (common civil calendar) date and time into a 64-bit Julian timestamp.

date-n-time

#include <cextdecs(COMPUTEJULIANDAYNO)>long COMPUTEJULIANDAYNO ( short year /* i */ ,short month /* i */ ,short day /* i */ ,[ short _near *error-mask ] ); /* o */

Bit 0 = YearBit 1 = MonthBit 2 = Day

#include <cextdecs(COMPUTETIMESTAMP)>long long COMPUTETIMESTAMP ( short _near *date-n-time /* i */,[ short _near *errormask ] ); /* o */

[0] = The Gregorian year (yyyy, for example, 1986).

[1] = The Gregorian month (1-12).[2] = The Gregorian day of the month (1-31).[3] = The hour of the day (0-23).[4] = The minute of the hour (0-59).[5] = The second of the minute (0-59).[6] = The millisecond of the second (0-999).[7] = The microsecond of the millisecond (0-999).

Guardian Programming Reference Summary for C—522630-0014-18

Page 49: Guardian Programming Ref for C

Functions Summary (A-C)

errormask

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.

Bit 0 = YearBit 1 = MonthBit 2 = DayBit 3 = Hour of dayBit 4 = Minute of hourBit 5 = Second of minuteBit 6 = Millisecond of secondBit 7 = Microsecond of millisecond

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 /* i */ , long *common-info /* o */ , long common-info-maxlen /* i */ , long *common-info-len /* o */ , char *specific-info /* o */ , long specific-info-maxlen /* i */ , long *specific-info-len /* o */ , long timeout /* i */ , long *error-detail ) /* o */

Guardian Programming Reference Summary for C—522630-0014-19

Page 50: Guardian Programming Ref for C

Functions Summary (A-C)

return value:

CONFIG_GETINFO_BYLDEV2

CONFIG_GETINFO_BYNAME2The 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.

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

0D Information was successfully returned.1D Either the device or the process simulating a device detected a file-system error;

error-detail contains a file-system error number.2D Parameter error; error-detail contains the number of the first parameter to be

in error, where 1D designates the first parameter on the left.3D Bounds error; error-detail contains the number of the first parameter to be in

error, where 1D designates the first parameter on the left.4D Either the device or the process simulating a device detected an error; error-

detail contains the error number returned by the device.

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-0014-20

Page 51: Guardian Programming Ref for C

Functions Summary (A-C)

return value:

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

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

0D Device found and data is returned. The value of error-detail is set to zero.1D Device or subtype 30 process returned an error. The error is reported in error-

detail.2D Required parameter is invalid. The value of error-detail is set to the ordinal

number of the invalid parameter.3D Bounds error; a reference parameter contained an illegal address. The value of

error-detail is set to the ordinal number of the invalid parameter.4D 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, error-detail is the value of the error returned to the inquiry by the device.

Guardian Programming Reference Summary for C—522630-0014-21

Page 52: Guardian Programming Ref for C

Functions Summary (A-C)

CONTIME Converts a 48-bit timestamp to a date and time in integer form.

date-and-time

CONTROL Performs device-dependent I/O operations.

#include <cextdecs(CONTIME)>void CONTIME ( short _near *date-and-time /* o */ ,short t0 /* i */ ,short t1 /* i */ ,short t2 ); /* i */

[0] = Year (1975, 1976, ... )[1] = Month (1-12)[2] = Day (1-31)[3] = Hour (0-23)[4] = Minute (0-59)[5] = Second (0-59)[6] = 0.01 sec (0-99)

#include <cextdecs(CONTROL)>_cc_status CONTROL ( short filenum /* i */ ,short operation /* i */ ,[ short param ] /* i */ ,[ long tag ] ); /* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) CONTROL was successful._status_gt (<return_value>) 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-0014-22

Page 53: Guardian Programming Ref for C

Functions Summary (A-C)

CONTROLBUF Performs device-dependent I/O operations requiring a data buffer.

CONTROLMESSAGESYSTEM Controls the maximum number of receive and send XLBs (extended memory control blocks) used by a process.

error

value

#include <cextdecs(CONTROLBUF)>_cc_status CONTROLBUF ( short filenum /* i */ ,short operation /* i */ ,short _near *buffer /* i */ ,short count /* i */ ,[ short _near *count-transferred ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) CONTROLBUF was successful._status_gt (<return_value>) For a process file, the process is not accepting

CONTROLBUF system messages.

#include <cextdecs(CONTROLMESSAGESYSTEM)>short CONTROLMESSAGESYSTEM ( short actioncode /* i */ ,short value ); /* i */

0 = Successful, no error2 = Bad actioncode21 = Bad value29 = Missing parameter

0 = Sets the limit on the number of outstanding messages to the process, including time-limit expiration messages.

1 = 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-0014-23

Page 54: Guardian Programming Ref for C

Functions Summary (A-C)

CONVERTASCIIEBCDICTranslates the 256 EBCDIC encodings to and from the 256 8-bit ASCII encodings. For more information, refer to the Guardian Procedure Calls Reference Manual.

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(CONVERTASCIIEBCDIC)>void CONVERTASCIIEBCDIC ( const char* buffer /* i */ ,const unsigned short count /* i */ ,const short translation); /* i */

#include <cextdecs(CONVERTPROCESSTIME)>_cc_status CONVERTPROCESSTIME ( long long process-time /* i */ ,[ short _near *hours ] /* o */ ,[ short _near *minutes ] /* o */ ,[ short _near *seconds ] /* o */ ,[ short _near *milliseconds ] /* o */ ,[ short _near *microseconds ] );/* o */

_status_lt (<return value>) The process-time parameter represents a quantity greater than 3.7 years.

_status_eq (<return value>) CONVERTPROCESSTIME is successful._status_gt (<return value>) One or more of the supplied output parameters

failed the bounds check on the address.

Guardian Programming Reference Summary for C—522630-0014-24

Page 55: Guardian Programming Ref for C

Functions Summary (A-C)

CONVERTTIMESTAMP Converts a GMT timestamp to or from a local-time-based timestamp within any accessible node in the network.

direction

error

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_.

#include <cextdecs(CONVERTTIMESTAMP)>long long CONVERTTIMESTAMP ( long long julian-timestamp /* i */ ,[ short direction ] /* i */ ,[ short node ] /* i */ ,[ short _near *error ] ); /* o */

0 = GMT to local civil time (LCT—the default)1 = GMT to local standard time (LST)2 = LCT to GMT3 = LST to GMT

-5 = Value of node is out of range.-4 = The timestamp parameter not supplied or has invalid value.-3 = Invalid value supplied for direction.-2 = Impossible LCT.-1 = Ambiguous LCT. 0 = No errors, successful. 1 = DST range error. 2 = DST table not loaded.>2 = File-system error (attempting to reach “NODE”).

Guardian Programming Reference Summary for C—522630-0014-25

Page 56: Guardian Programming Ref for C

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.

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.

#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.

_status_eq (<return value>) CPUTIMES is successful._status_gt (<return value>) The supplied parameters failed the bounds check.

Guardian Programming Reference Summary for C—522630-0014-26

Page 57: Guardian Programming Ref for C

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.

CURRENTSPACE Returns the ENV register (as saved in the stack marker) and a string (in ASCII) containing the space ID of the caller.

return value:

#include <cextdecs(CRTPID_TO_PROCESSHANDLE_ )>short CRTPID_TO_PROCESSHANDLE_ ( short *process-id /* i */ ,short *processhandle /* o */ ,[ short *pair-flag ] /* o */ ,[ long node-number ] ); /* i */

#include <cextdecs(CURRENTSPACE)>short CURRENTSPACE ( [ char *ascii-space-id ] ); /* o */

Bit 4 Library bitBit 7 System code bitBit 11-15 Space ID bits

Guardian Programming Reference Summary for C—522630-0014-27

Page 58: Guardian Programming Ref for C

Functions Summary (A-C)

Guardian Programming Reference Summary for C—522630-0014-28

Page 59: Guardian Programming Ref for C

5 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.

julian-day-num

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.

DEBUGPROCESS (superseded by PROCESS_DEBUG_) Invokes the debug facility on a process.

#include <cextdecs(DAYOFWEEK)>short DAYOFWEEK ( long julian-day-num ); /* i */

0 = Sunday, 1 = Monday, ..., 6 = Saturday.-1 = The value of julian-day-num is negative.

#include <cextdecs(DEBUG)>void DEBUG ();

CALL DEBUGPROCESS ( process-id /* i */ ,error /* o */ ,[term ] /* i */ ,[ now ] ); /* i */

Guardian Programming Reference Summary for C—522630-0015-1

Page 60: Guardian Programming Ref for C

Functions Summary (D-F)

error

DEFINEADD Adds a DEFINE to the calling process’s context using the attributes in the working set. DEFINEADD can replace an existing DEFINE with the attributes in the working set.

return value:

0 = No error.11 = Specified process does not exist.13 = Invalid name. 14 = Supplied process ID references an LDEV that does not exist.18 = Specified system is not known.22 = Parameter or buffer out of bounds.29 = Missing parameter.48 = Security violation. 190 = The value of term (or the caller’s home terminal if term was not

specified) is not device type 6.201 = Unable to communicate over this path.240-249 = Network errors.250 = All paths to the specified system are down.590 = Bad parameter value.

#include <cextdecs(DEFINEADD)>short DEFINEADD ( constchar *define-name /* i */ ,[ short replace ] /* i */ ,[ short _near *checknum ] ); /* o */

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

Guardian Programming Reference Summary for C—522630-0015-2

Page 61: Guardian Programming Ref for C

Functions Summary (D-F)

checknum

DEFINEDELETE Deletes a DEFINE from the calling process’s context.

2059 = Working set is invalid.2066 = Missing parameter.2069 = The DEFMODE of the process does not permit the addition of the

DEFINE.

001 = Specify either RETENTION or EXPIRATION, not both.002 = If you specify USE IN or EXTEND, you must include LABELS ANSI,

VOLUMES. 003 = 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.

004 = If you specify LABELS ANSI, you must not specify LABELS EBCDIC, and vice versa.

005 = If you specify RECFORM F, then you must specify a BLOCKLEN that is a multiple of RECLEN.

006 = If you specify DEVICE, you cannot specify SYSTEM in the same DEFINE, and vice versa.

007 = 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.

008 = If you specify VOLUME SCRATCH, then USE IN or USE EXTEND is not allowed.

009 = If you specify LABELS IBM or LABELS IBMBACKUP, FILEID must be specified.

010 = If you do not specify BLOCKLEN but do specify RECLEN, you must specify a RECLEN value that is greater than 0.

011 = 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.

#include <cextdecs(DEFINEDELETE)>short DEFINEDELETE ( constchar *define-name ); /* i */

Guardian Programming Reference Summary for C—522630-0015-3

Page 62: Guardian Programming Ref for C

Functions Summary (D-F)

return value:

DEFINEDELETEALL Deletes all DEFINEs from the calling process’s context.

DEFINEINFO Returns selected information about a DEFINE.

return value:

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

#include <cextdecs(DEFINEDELETEALL)>short DEFINEDELETEALL ();

#include <cextdecs(DEFINEINFO)>short DEFINEINFO ( constchar *define-name /* i */ ,char *class /* o */ ,char *attribute-name /* o */ ,char *value-buf /* o */ ,short value-buf-len /* o */ ,short _near *value-len ); /* o */

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

Guardian Programming Reference Summary for C—522630-0015-4

Page 63: Guardian Programming Ref for C

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.

DEFINEMODE Controls the use of DEFINEs.

return value:

DEFINENEXTNAME Returns the name of the DEFINE that follows the specified DEFINE (in ASCII order).

#include <cextdecs(DEFINELIST)>_cc_status DEFINELIST ( short filenum /* i */ ,short _near *address-list /* i */ ,short address-size /* i */ ,short num-entries /* i */ ,short polling-count /* i */ ,short polling-type ); /* i */

_status_lt (<return_value>) An error occurred (call FILEINFO)._status_eq (<return_value>) The DEFINELIST procedure was executed

successfully.

#include <cextdecs(DEFINEMODE)>short DEFINEMODE ( [ short new-value ] /* i */ ,[ short _near *old-value ] ); /* o */

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

#include <cextdecs(DEFINENEXTNAME)>short DEFINENEXTNAME ( char *define-name ); /* i,o */

Guardian Programming Reference Summary for C—522630-0015-5

Page 64: Guardian Programming Ref for C

Functions Summary (D-F)

return value:

DEFINEPOOL (superseded by POOL_CHECK_, POOL_DEFINE_, POOL_GETINFO_, POOL_GETSPACE_, POOL_PUTSPACE_, and POOL_RESIZE_) Designates a portion of a user’s stack or an extended data segment for use as a pool.

status

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

#include <cextdecs(DEFINEPOOL)>short DEFINEPOOL ( short *pool-head /* o */ ,short *pool /* i */ ,long pool-size ); /* i */

0 = No error.1 = Bounds error on pool-head.2 = Bounds error on pool.3 = Invalid pool-size.4 = The pool-head and pool parameters overlap.5 = The pool-head parameter is not word-aligned.6 = The pool parameter is not word-aligned.

Guardian Programming Reference Summary for C—522630-0015-6

Page 65: Guardian Programming Ref for C

Functions Summary (D-F)

DEFINEREADATTR Obtains the current value of an attribute in a DEFINE in the calling process’s context or in the working set.

return value:

read-mode

info-word

#include <cextdecs(DEFINEREADATTR)>short DEFINEREADATTR( [ constchar *define-name ] /* i */ ,char *attribute-name /* i,o */ ,[ short _near *cursor ] /* i,o */ ,char *value-buf /* o */ ,short value-buf-len /* i */ ,short _near *value-len /* o */ ,[ short read-mode ] /* i */ ,[ short _near *info-word ] );/* o */

0 = Successful.2049 = A syntax error occurred in name.2051 = DEFINE not found.2052 = An error occurred when placing PFS in use.2054 = Bounds error on parameter.2055 = Attribute not supported.2061 = No more attributes.2066 = Missing parameter.

0 = Search the present attributes only.1 = Search the present plus required attributes that are not present.2 = Search the present plus the required and optional attributes that are not present.

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

Guardian Programming Reference Summary for C—522630-0015-7

Page 66: Guardian Programming Ref for C

Functions Summary (D-F)

DEFINERESTORE Uses a saved version of a DEFINE in the user’s 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.

return value:

#include <cextdecs(DEFINERESTORE)>short DEFINERESTORE ( short *buffer /* i */ ,[ short options ] /* i */ ,[ char *define-name ] /* o */ ,[ short _near *checknum ] ); /* o */

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

setting.2075 = The value of option (bits 0-13) is not 0.2077 = The buffer or define-name parameter is in invalid segment.2078 = The buffer parameter does not contain a valid saved DEFINE.

Guardian Programming Reference Summary for C—522630-0015-8

Page 67: Guardian Programming Ref for C

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.

return value:

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.

return value:

#include <cextdecs(DEFINERESTOREWORK[2])>short DEFINERESTOREWORK[2] ();

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

#include <cextdecs(DEFINESAVE)>short DEFINESAVE ( constchar *define-name /* i */ ,short *buffer ] /* o */ ,short buflen /* i */ ,short *deflen /* o */ ,[ short option ] ); /* i */

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

Guardian Programming Reference Summary for C—522630-0015-9

Page 68: Guardian Programming Ref for C

Functions Summary (D-F)

option

DEFINESAVEWORK[2] DEFINESAVEWORK saves the DEFINE working set in the background set. DEFINESAVEWORK2 allows a second background working set to be saved.

return value:

DEFINESETATTR Modifies the value of an attribute in the DEFINE working set.

2075 = The value of option (bits 0-14) is not 0.2076 = User’s buffer is too small.2077 = The buffer or define-name parameter is in invalid segment.2079 = An attempt to save the working set occurred, but define-name is

DEFAULTS and working set is not class DEFAULTS.

Bits 0-14 are reserved and must be 0.Bit 15 1 Save the current working set and name it define-name.

0 Save the active DEFINE named by define-name.

#include <cextdecs(DEFINESAVEWORK[2])>short DEFINESAVEWORK[2] ();

0 = Successful2052 = Unable to obtain file-system buffer space2053 = Not enough physical memory

#include <cextdecs(DEFINESETATTR)>short DEFINESETATTR ( constchar *attribute-name /* i */,[ const char *value ] /* i */,[ short value-len ] /* i */,[ short _near *default-names ] ); /* i */

Guardian Programming Reference Summary for C—522630-0015-10

Page 69: Guardian Programming Ref for C

Functions Summary (D-F)

return value:

default-names

DEFINESETLIKE Initializes the working set with the attributes in an existing DEFINE.

return value:

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

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

#include <cextdecs(DEFINESETLIKE)>short DEFINESETLIKE ( constchar *define-name ); /* i */

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

Guardian Programming Reference Summary for C—522630-0015-11

Page 70: Guardian Programming Ref for C

Functions Summary (D-F)

DEFINEVALIDATEWORK Checks the working set for consistency.

return value:

DELAY Allows a process to suspend itself for a timed interval.

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(DEFINEVALIDATEWORK)>short DEFINEVALIDATEWORK( short _near *checknum ); /* o */

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

#include <cextdecs(DELAY)>void DELAY ( long time-period ); /* i */

#include <cextdecs(DELETEEDIT)>short DELETEEDIT ( short filenum /* i */ ,long first /* i */ ,long last ); /* i */

Guardian Programming Reference Summary for C—522630-0015-12

Page 71: Guardian Programming Ref for C

Functions Summary (D-F)

DEVICE_GETINFOBYLDEV_ Obtains the logical and physical attributes of a device.

return value:

options

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

0 = Information successfully returned.1 = Reserved.2 = 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.3 = 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.4 = Device not found; error-detail contains a file-system error number.5 = Buffer too small. This error applies only to devname:maxlen.

Bits 0-12 Reserved (specify 0).Bit 13 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.

Bit 14 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.

Bit 15 Specifies that the procedure search for the next device that matches the selection criteria.

Guardian Programming Reference Summary for C—522630-0015-13

Page 72: Guardian Programming Ref for C

Functions Summary (D-F)

DEVICE_GETINFOBYNAME_ Obtains the logical and physical attributes of a device.

return value:

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.

#include <cextdecs(DEVICE_GETINFOBYNAME_)>short DEVICE_GETINFOBYNAME_ ( char *devname /* i */ ,short length /* i */ ,[ short *logical-info ] /* o */ ,[ short *logical-info-len ] /* o */ ,[ short *primary-info ] /* o */ ,[ short primary-info-maxlen ]/* i */ ,[ short *primary-info-len ] /* o */ ,[ short *backup-info ] /* o */ ,[ short backup-info-maxlen ] /* i */ ,[ short *backup-info-len ] /* o */ ,[ long timeout ] /* i */ ,[ short *error-detail ] ); /* o */

1 = Reserved.2 = 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.3 = 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.4 = Device not found; error-detail contains a file-system error number.

Guardian Programming Reference Summary for C—522630-0015-14

Page 73: Guardian Programming Ref for C

Functions Summary (D-F)

DISK_REFRESH_ (superseded on G-series releases) Causes control information to be written to the associated disk volume.

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.

status

#include <cextdecs(DISK_REFRESH_)>short DISK_REFRESH_ ( char *name /* i */ ,short length ); /* i */

#include <cextdecs(DNUMIN)>long DNUMIN ( char *ascii-num /* i */ ,long *signed-result /* o */ ,short base /* i */ ,[ short *status ] /* o */ ,[ short flags ] ); /* i */

1 = A nonexistent number (The string does not start with a valid sign, prefix, or numeric.)

0 = Valid conversion.-1 = Illegal integer (The number cannot be represented in 32 bits as a signed

quantity.)

Guardian Programming Reference Summary for C—522630-0015-15

Page 74: Guardian Programming Ref for C

Functions Summary (D-F)

flags

DNUMOUT Converts unsigned double-word integer values to their ASCII equivalents, right-justified in an array.

flags

DST_GETINFO_Provides information about the DST entry that is in effect at time keygmt.

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

each unsigned integer must fit within a 16-bit word.

#include <cextdecs(DNUMOUT)>short DNUMOUT ( char *ascii-result /* o */ ,long unsigned-doubleword /* i */ ,short base /* i */ ,[ short width ] /* i */ ,[ short flags ] ); /* i */

Bits 0-14 Must be 0Bit 15 Blank-fill on left (The default is zero-fill.)

#include <cextdecs(DST_GETINFO_)>short DST_GETINFO_ ( long long keygmt /* i */ ,short *dstentry ); /* o */

Guardian Programming Reference Summary for C—522630-0015-16

Page 75: Guardian Programming Ref for C

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.

DST_TRANSITION_DELETE_Allows a super-group user (255,n) to delete an existing entry from 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.

dstentry

#include <cextdecs(DST_TRANSITION_ADD_)>short DST_TRANSITION_ADD_ ( short *dstentry ); /* i */

#include <cextdecs(DST_TRANSITION_DELETE_)>short DST_TRANSITION_DELETE_ ( short *dstentry ); /* i */

Error Literal Value Description0 ZSYS^VAL^DST^OK The operation is successful.1 ZSYS^VAL^DST^

SECURITY^ERRORThe caller is not a super-group user (255,n).

2 ZSYS^VAL^DST^ BAD^VERSION

The version number passed in ZSYS^DDL^DST^ENTRY^DEF is not valid. The only valid version is ZSYS^VAL^DST^VERSION^SEP1997.

3 ZSYS^VAL^DST^BAD^PARAMETER

One of the specified parameters is not valid.

4 ZSYS^VAL^DST^ INTERVAL^ERROR

Invalid interval operation. An attempt was made to add, delete, or modify a DST entry that causes a collision with an existing DST entry.

5 ZSYS^VAL^DST^ DELETE^NOW^ ERROR

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.

6 ZSYS^VAL^DST^ TYPE^ERROR

The DAYLIGHT_SAVING_TIME option in the system is not configured to use the TABLE option.

Guardian Programming Reference Summary for C—522630-0015-17

Page 76: Guardian Programming Ref for C

Functions Summary (D-F)

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.

EDITREAD Reads text lines from an EDIT file (file code = 101). One line is transferred by each call to EDITREAD.

7 ZSYS^VAL^DST^ TABLE^EMPTY

The DST table has no entries. This error is returned by the DST_GETINFO_ procedure.

8 ZSYS^VAL^DST^ BOUNDS^ERROR

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.

9 ZSYS^VAL^DST^RANGE^LOW

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.

10 ZSYS^VAL^DST^RANGE^HIGH

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.

11 ZSYS^VAL^DST^COUNT^OVERFLOW

An attempt was made to add too many entries to the table. Delete some of the entries and try again.

#include <cextdecs(DST_TRANSITION_MODIFY_)>short DST_TRANSITION_MODIFY_ ( short *olddst /* i */ ,short *newdst ); /* i */

#include <cextdecs(EDITREAD)>short EDITREAD ( short _near *edit-controlblk /* i */ ,char *buffer /* o */ ,short bufferlen /* i */ ,long *sequence-num ); /* o */

Error Literal Value Description

Guardian Programming Reference Summary for C—522630-0015-18

Page 77: Guardian Programming Ref for C

Functions Summary (D-F)

status

EDITREADINIT Prepares a buffer in the application program’s data area for subsequent calls to EDITREAD.

status

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.

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

#include <cextdecs(EDITREADINIT)>short EDITREADINIT ( short _near *edit-controlblk /* i */ ,short filenum /* i */ ,short bufferlen ); /* i */

0 = Successful (OK to read).-1 = End of file detected (empty file).-2 = I/O error.-3 = Format error (not EDIT file), or buffer length is incorrect.-6 = Invalid buffer address.

Guardian Programming Reference Summary for C—522630-0015-19

Page 78: Guardian Programming Ref for C

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_.

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.

FILE_CLOSE_ Closes an open file opened by either FILE_OPEN_ or OPEN.

tape-disposition

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

#include <cextdecs(FILE_ALTERLIST_)>short FILE_ALTERLIST_ ( const char *filename /* i */ ,short length /* i */ ,short *item-list /* i */ ,short number-of-items /* i */ ,short *values /* i */ ,short values-length /* i */ ,[ short partonly ] /* i */ ,[ short *error-item ] ); /* o */

#include <cextdecs(FILE_CLOSE_)>short FILE_CLOSE_ ( short filenum /* i */ ,[ short tape-disposition ] ); /* i */

0 = Rewind and unload; do not wait for completion.1 = Rewind and take offline; do not wait for completion.2 = Rewind and leave online; do not wait for completion.3 = Rewind and leave online; wait for completion.4 = Do not rewind; leave online.

Guardian Programming Reference Summary for C—522630-0015-20

Page 79: Guardian Programming Ref for C

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 Programmer’s 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.

timelimit

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_)>short FILE_COMPLETE_ ( short *completion-info /* o */ ,[ long timelimit ] /* i */ ,[ short *complete-element-list /* i */ ,[ short num-complete-elements ] /* i */ ,[ short *error-complete-element ] ); /* o */

>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.

= 0D = Check for completion. FILE_COMPLETE_ immediately returns to the caller, regardless of whether completion has occurred.

= -1D = Wait indefinitely.< -1D = An invalid value (file-system error 590 occurs).omitted = Wait indefinitely.

#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-0015-21

Page 80: Guardian Programming Ref for C

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.

FILE_CREATE_ Defines a new structured or unstructured disk file. This procedure operates only on Guardian objects.

file-type

#include <cextdecs(FILE_COMPLETE_SET_)>short FILE_COMPLETE_SET_ ( short *complete-element-list /* i */ ,short num-complete-elements /* i */ ,[ short *error-complete-element ] ); /* o */

#include <cextdecs(FILE_CREATE_)>short FILE_CREATE_ ( char *filename /* i */ ,short maxlen /* o:i */ ,short *filenamelen /* i,o */ ,[ short file-code ] /* i */ ,[ short primary-extent-size ] /* i */ ,[ short secondary-extent-size]/* i */ ,[ short maximum-extents ] /* i */ ,[ short file-type ] /* i */ ,[ short options ] /* i */ ,[ short recordlen ] /* i */ ,[ short blocklen ] /* i */ ,[ short keylen ] /* i */ ,[ short key-offset ] ); /* i */

0 = Unstructured1 = Relative2 = Entry-sequenced3 = Key-sequenced

Guardian Programming Reference Summary for C—522630-0015-22

Page 81: Guardian Programming Ref for C

Functions Summary (D-F)

options

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.

FILE_GETINFO_ Obtains a limited set of information about a file identified by file number.

Bits 0-9 Reserved (must be 0).Bit 10 Refresh EOF. A change to the end-of-file value is to cause the file label to be

written immediately to disk.Bit 11 Index compression. For key-sequenced files, the entries in the index blocks

are to be compressed. Must be 0 for other file types.Bit 12 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.Bit 13 Audit compression. For audited files, the audit data is to be compressed.Bit 14 Audited. The file is to be audited under the TMF subsystem. Must be 0 for

systems without the TMF subsystem.Bit 15 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.

#include <cextdecs(FILE_CREATELIST_)>short FILE_CREATELIST_ ( char *filename /* i */ ,short maxlen /* o:i */ ,short *filenamelen /* i,o */ ,short *item-list /* i */ ,short number-of-items /* i */ ,short *values /* i */ ,short values-length /* i */ ,[ short *error-item ] ); /* o */

#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-0015-23

Page 82: Guardian Programming Ref for C

Functions Summary (D-F)

type-info

flags

FILE_GETINFOBYNAME_ Obtains a limited set of information about a file identified by file name.

[0] = Device type[1] = Device subtype[2] = Object type

>0 = SQL disk file 0 = Non-SQL disk file-1 = Not a disk file

[3] = File type 0 = Unstructured disk file 1 = Relative disk file 2 = Entry-sequenced disk file 3 = Key-sequenced disk file-1 = Not a disk file

[4] = File code>=0 = Disk file-1 = Not a disk file

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

#include <cextdecs(FILE_GETINFOBYNAME_)>short FILE_GETINFOBYNAME_ ( const char *filename /* i */ ,short length /* i */ ,[ short *type-info ] /* o */ ,[ short *physical-recordlen]/* o */ ,[ short options ] /* i */ ,[ long tag-or-timeout ] ) /* i */ ,[ short *flags ] ); /* o */

Guardian Programming Reference Summary for C—522630-0015-24

Page 83: Guardian Programming Ref for C

Functions Summary (D-F)

type-info

options

flags

[0] = Device type[1] = Device subtype[2] = Object type

>0 = SQL disk file 0 = Non-SQL disk file-1 = Not a disk file 0 = Unstructured disk file 1 = Relative disk file 2 = Entry-sequenced disk file 3 = Key-sequenced disk file-1 = Not a disk file

[4] = File code>=0 = Disk file-1 = Not a disk file

Bits 0-12 Reserved (specify 0).Bit 13 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>.

Bit 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.

Bit 15 Specifies that device type inquiry messages are not to be sent to subtype 30 processes.

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

Guardian Programming Reference Summary for C—522630-0015-25

Page 84: Guardian Programming Ref for C

Functions Summary (D-F)

FILE_GETINFOLIST_ Obtains detailed information about a file identified by file number.

error-item

#include <cextdecs(FILE_GETINFOLIST_)>short FILE_GETINFOLIST_ ( short filenum /* i */ ,short *item-list /* i */ ,short number-of-items /* i */ ,short *result /* o */ ,short result-max /* i */ ,[ short *result-length ] /* o */ ,[ short *error-item ] ); /* o */

Code Size (bytes) Description1 2 File name length2 * File name3 2 Current file-name length4 * Current file name5 2 DEFINE name length6 * DEFINE name7 2 Last error8 2 Last-error detail9 2 Partition in error10 2 Key in error11 4 Next record pointer12 4 Current record pointer13 2 Current key specifier14 2 Current key length15 * Current key value16 2 Current primary-key length17 * Current primary-key value18 6 Tape volume19 2 Highest open-file number20 2 Next open-file number21 2 Current access mode22 2 Open exclusion mode

Guardian Programming Reference Summary for C—522630-0015-26

Page 85: Guardian Programming Ref for C

Functions Summary (D-F)

23 2 Open nowait depth24 2 Open sync depth25 2 Open options26 4 Open information30 2 Device type31 2 Device subtype32 2 Demountable disk33 2 Audited disk34 2 Physical record length35 4 Logical device number36 2 Subdevice number40 2 SQL type41 2 File type42 2 File code43 2 Logical record length44 2 Block length45 2 Key offset46 2 Key length47 2 Lock key length50 2 Primary extent size51 2 Secondary extent size52 2 Maximum extents53 2 Allocated extents54 8 Creation time56 8 Last open time57 8 Expiration time58 2 File owner59 2 Safeguard security60 2 Progid security61 2 Clear on purge62 4 Operating-system security string63 2 Licensed file65 2 Odd unstructured file66 2 Audited file

Code Size (bytes) Description

Guardian Programming Reference Summary for C—522630-0015-27

Page 86: Guardian Programming Ref for C

Functions Summary (D-F)

67 2 Audit compression68 2 Data compression69 2 Index compression70 2 Refresh EOF71 2 Create options72 2 Write through73 2 Verify writes74 2 Serial writes75 2 File is open76 2 Crash open77 2 Rollforward needed78 2 Broken79 2 Corrupt80 2 Secondary partition81 2 Index levels82 2 SQL program83 2 SQL valid84 2 SQL-catalog name length85 * SQL-catalog name90 2 Number of partitions91 * Partition descriptors92 * Partition-volume name-length array93 * Partition-volume names94 2 Partition partial-key length95 * Partition partial-key values96 2 Partition-volume names total length100 2 Number of alternate keys101 * Alternate-key descriptors102 2 Number of alternate-key files103 * Alternate-file name-length array104 * Alternate-file names105 2 Alternate-file total name length110 4 Volume capacity111 4 Volume free space

Code Size (bytes) Description

Guardian Programming Reference Summary for C—522630-0015-28

Page 87: Guardian Programming Ref for C

Functions Summary (D-F)

112 4 Volume fragments113 4 Largest volume fragment114 16 Disk drive types115 8 Disk drive capacities116 2 Sequential block buffering117 8 Last open LCT118 8 Expiration LCT119 8 Creation LCT136 4 Partition EOF137 4 Partition maximum size140 8 Partition modification time141 8 Partition modification LCT142 4 Aggregate EOF143 4 Aggregate maximum file size144 8 Aggregate modification time145 8 Aggregate modification LCT153 2 Logical (packed) record length160 6 Three-word partition modification LCT161 2 OSS file164 4 OSS group ID165 4 OSS access permissions166 2 OSS open167 4 OSS user ID168 2 OSS number of links169 2 Security mechanisms in effect

Code Size (bytes) Description

Guardian Programming Reference Summary for C—522630-0015-29

Page 88: Guardian Programming Ref for C

Functions Summary (D-F)

FILE_GETINFOLISTBYNAME_ Obtains detailed information about a file identified by file name.

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.

return value:

#include <cextdecs(FILE_GETINFOLISTBYNAME_)>short FILE_GETINFOLISTBYNAME_ ( const char *filename /* i */ ,short length /* i */ ,short *item-list /* i */ ,short number-of-items /* i */ ,short *result /* o */ ,short result-max /* i */ ,[ short *result-length] /* o */ ,[ short *error-item ] ); /* o */

#include <cextdecs(FILE_GETLOCKINFO_)>short FILE_GETLOCKINFO_ ( const char *name /* i */ ,short length /* i */ ,[ short *processhandle ] /* i */ ,[ short *transid ] /* i */ ,short *control /* i,o */ ,short *lock-descr /* o */ ,short lock-descr-length /* i */ ,short *participants /* o */ ,short max-participants /* i */ ,[ char *locked-name ] /* o */ , short maxlen ] /* i */ ,[ short *locked-name-length ] ); /* o */

0 = Information for one locked file and all its lock holders/waiters was returned without error. More locks might exist; continue calling FILE_GETLOCKINFO_.

1 = End of information about locks associated with a process or transid.11 = Lock information for the file processor transaction was not found. If any

information has been returned already it is now invalid.

Guardian Programming Reference Summary for C—522630-0015-30

Page 89: Guardian Programming Ref for C

Functions Summary (D-F)

lock-descr

participants

12 = The disk-process lock tables were changed between calls41 = Checksum error on control. The control parameter has been altered

between calls to FILE_GETLOCKINFO_ or was not initialized before the first call.

45 = Information for one locked record or file has been returned

[0] = Lock type. 0 indicates a file lock; 1 indicates a record lock.[1] = Flags. The bits are:

<0> = 1 indicates a generic lock.<1:15> = Reserved.

[2] = The number of participants (the number of holders and waiters for the lock).[3:4] = Record ID if the lock is a record lock on a file that is not key-sequenced;

undefined otherwise.[5] = The length in bytes of the key if the lock is a record lock on a key-sequenced

file; 0 otherwise.[6:n] = The key value if the lock is a record lock on a key-sequenced file.

[0] = Flags. The bits have the following meanings:Bit 0 = 1

= 0The participant is identified by process handle.The participant is identified by transid.

Bits 1-3 = 1= 0

The lock is granted.The lock is in the waiting state.

Bit 4 = 1 The lock is an intent lock internally set by DP2.Bits 5-15 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).

0 = Information for one locked file and all its lock holders/waiters was returned without error. More locks might exist; continue calling FILE_GETLOCKINFO_.

Guardian Programming Reference Summary for C—522630-0015-31

Page 90: Guardian Programming Ref for C

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.

accessmode

exclusion

validmask

#include <cextdecs(FILE_GETOPENINFO_)>short FILE_GETOPENINFO_ ( const char *searchname /* i */ ,short length /* i */ ,long long *prevtag /* i,o */ ,[ short *primary-opener ] /* o */ ,[ short *backup-opener ] /* o */ ,[ short *accessmode ] /* i,o */ ,[ short *exclusion ] /* o */ ,[ short *syncdepth ] /* o */ ,[ char *filename ] /* o */ ,[ short maxlen ] /* i */ ,[ short *filenamelen ] /* o */ ,[ short *accessid ] /* o */ ,[ short *validmask ] ); /* o */

0 = Read-write1 = Read only2 = Write only

0 = Shared1 = Exclusive2 = Process exclusive (supported only for Optical Storage Facility)3 = Protected

Bit 0 = Primary-openerBit 1 = Backup-openerBit 2 = AccessmodeBit 3 = ExclusionBit 4 = SyncdepthBit 5 = FilenameBit 6 = Accessid

Guardian Programming Reference Summary for C—522630-0015-32

Page 91: Guardian Programming Ref for C

Functions Summary (D-F)

FILE_GETRECEIVEINFO_ Returns information about the last message read on the $RECEIVE file.

receive-info

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_GETRECEIVEINFO_)>short FILE_GETRECEIVEINFO_ ( short *receive-info ); /* o */

[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] 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).

[2] Message tag. The value that identifies the request message just read. [3] File number. The value that identifies the file associated with this message in

the requesting process.[4:5] Sync ID. The sync ID associated with this message. [6:15] 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.

[16] 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.

#include <cextdecs(FILE_GETSYNCINFO_)>short FILE_GETSYNCINFO_ ( short filenum /* i */ , short * infobuf /* o */ , short infosize ); /* o */

Guardian Programming Reference Summary for C—522630-0015-33

Page 92: Guardian Programming Ref for C

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.

access

exclusion

options

#include <cextdecs(FILE_OPEN_)>short FILE_OPEN_ ( { const char *filename | /* i */ const char *pathname } /* i */ ,short length /* i */ ,short *filenum /* i,o */ ,[ short access ] /* i */ ,[ short exclusion ] /* i */ ,[ short nowait-depth ] /* i */ ,[ short sync-or-receive-depth ] /* i */ ,[ short options ] /* i */ ,[ short seq-block-buffer-id ] /* i */ ,[ short seq-block-buffer-len ] /* i */ ,[ short *primary-processhandle ] );/* i */

0 = Read-write1 = Read only2 = Write only3 = Extend (supported only for tape)

0 = Shared1 = Exclusive2 = Process exclusive (supported only for Optical Storage Facility)3 = Protected

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.

Bit 1 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.

Bit 2 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-0015-34

Page 93: Guardian Programming Ref for C

Functions Summary (D-F)

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 Programmer’s Guide.

FILE_PURGE_ Deletes a disk file that is not open. This procedure operates only on Guardian objects.

FILE_RENAME_ Changes the name of an open disk file.

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.

Bits 4-9 Reserved (specify 0).Bit 10 Open an OSS file by its OSS pathname. Specifies that the file to be opened is

identified by the pathname parameter. Bit 11 Reserved (specify 0).Bit 12 No transactions. For $RECEIVE, system messages do not include transaction

identifiers. Must be 0 if bit 15 is 1. Bit 13 I18N locale support. For $RECEIVE, data messages include

internationalization locale information. Must be 0 if bit 15 is 1. Bit 14 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.

Bit 15 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.

#include <cextdecs(FILE_PURGE_)>short FILE_PURGE_ ( const char *filename /* i */ ,short length ); /* i */

#include <cextdecs(FILE_RENAME_)>short FILE_RENAME_ ( short filenum /* i */ ,const char *newname /* i */ ,short length ); /* i */

Guardian Programming Reference Summary for C—522630-0015-35

Page 94: Guardian Programming Ref for C

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).

FILE_SAVEPOSITION_

The FILE_SAVEPOSITION_ procedure supersedes the SAVEPOSITION procedure and is used to save a disk file’s current file positioning information in anticipation of a need to return to that position. This procedure can be used with format 2 files.

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_RESTOREPOSITION_)>short FILE_RESTOREPOSITION_ ( short filenum /* i */ ,short * savearea /* i */ ,short savesize ); /* i */

#include <cextdecs(FILE_SAVEPOSITION_)>short FILE_SAVEPOSITION_ ( short filenum /* i */ ,short * savearea /* o */ ,short savemax /* i */ ,short * savesize ); /* o */

#include <cextdecs(FILE_SETKEY_)>short FILE_SETKEY_ ( short filenum /* i */ , char * key-value /* i */ , short key-len /* i */ , [ short keyspecifier ] /* i */ , [ short positioningmode ] /* i */ , [ short options ] /* i */ , [ short comparelength ] ); /* i */

Guardian Programming Reference Summary for C—522630-0015-36

Page 95: Guardian Programming Ref for C

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.

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 pair’s 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.

FILEERROR Determines whether an I/O operation that completed with an error should be retried.

status

#include <cextdecs(FILE_SETPOSITION_)>short FILE_SETPOSITION_ ( short filenum /* i */ , long long recordspecifier );/* i */

#include <cextdecs(FILE_SETSYNCINFO_)>short FILE_SETSYNCINFO_ ( short filenum /* i */ , short * infobuf /* i */ , short infosize ); /* i */

#include <cextdecs(FILEERROR)>short FILEERROR ( short filenum ); /* i */

0 = The operation should not be retried.1 = The operation should be retried.

Guardian Programming Reference Summary for C—522630-0015-37

Page 96: Guardian Programming Ref for C

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.

return value:

#include <cextdecs(FILENAME_COMPARE_)>short FILENAME_COMPARE_ ( const char *filename1 /* i */ ,short length1 /* i */ ,const char *filename2 /* i */ ,short length2 ); /* i */

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

error number.

Guardian Programming Reference Summary for C—522630-0015-38

Page 97: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_DECOMPOSE_ Extracts and returns one or more parts of a file name or file-name pattern.

level

options

subpart

#include <cextdecs(FILENAME_DECOMPOSE_)>short FILENAME_DECOMPOSE_ ( const char *filename /* i */ ,short length /* i */ ,char *piece /* o */ ,short maxlen /* i */ ,short *piece-length /* o */ ,short level /* i */ ,[ short options ] /* i */ ,[ short subpart ] ); /* i */

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

Bits 0-12 Reserved (specify 0).Bit 13 = 1

= 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.

Bit 14 = 1

= 0

Include prefix, that is, the entire portion of filename that precedes the part specified by level.Do not include prefix.

Bit 15 = 1

= 0

Include suffix, that is, the entire portion of filename that follows the part specified by level.Do not include suffix.

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

Guardian Programming Reference Summary for C—522630-0015-39

Page 98: Guardian Programming Ref for C

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.

level

options

subpart

This parameter applies only to process file names.

#include <cextdecs(FILENAME_EDIT_)>short FILENAME_EDIT_ ( char *filename /* i */ ,short maxlen /* o,i */ ,short *filename-length /* i,o */ ,const char *piece /* i */ ,short length /* i */ ,short level /* i */ ,[ short options ] /* i */ ,[ short subpart ] ); /* i */

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

Bits 0-13 Reserved (specify 0).Bit 14 = 1

= 0

Include prefix, that is, the entire portion of filename that precedes the part specified by level.Do not include prefix.

Bit 15 = 1

= 0

Include suffix, that is, the entire portion of filename that follows the part specified by level.Do not include suffix.

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

unnamed process.

Guardian Programming Reference Summary for C—522630-0015-40

Page 99: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_FINDFINISH_ Releases the resources reserved for a search that was previously initiated by a call to FILENAME_FINDSTART_.

FILENAME_FINDNEXT_ Returns the next name in a set of named entities that was defined by a call to FILENAME_FINDSTART_.

entity-info

2 = Replace PIN, that is, the numeric part that gives the process identification number for an unnamed process.

3 = Replace sequence number, that is, the numeric part that gives the sequence number of a process.

4 = Replace name, that is, the alphanumeric section that begins with a question mark and ends at the first colon or period.

#include <cextdecs(FILENAME_FINDFINISH_)>short FILENAME_FINDFINISH_ ( short searchid ); /* i */

#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 */

[0] Device typeDevice subtypeObject type

[1][2]

> 00-1

===

SQL disk fileNon-SQL disk fileNot a disk file

[3] File type:

Guardian Programming Reference Summary for C—522630-0015-41

Page 100: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_FINDSTART_ Sets up a search of named entities.

resolve-level

options

0123-1

=====

Unstructured disk fileRelative disk fileEntry-sequenced disk fileKey-sequenced disk fileNot a disk file

[4] File code:>= 0-1

==

Disk fileNot a disk file

#include <cextdecs(FILENAME_FINDSTART_)>short FILENAME_FINDSTART_ ( short *searchid /* o */ ,[ const char *search-pattern ] /* i */ ,[ short length ] /* i */ ,[ short resolve-level ] /* i */ ,[ short device-type ] /* i */ ,[ short device-subtype ] /* i */ ,[ short options ] /* i */ ,[ const char *startname ] /* i */ ,[ short length ] ); /* i */

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

Bits 0-8 Reserved (specify 0).Bit 9 The search is to be executed in a nowait manner. The results of the search

are returned in system messages sent to $RECEIVE.Bit 10 Device simulation by subtype 30 devices is not to be supported.Bit 11 The search is not to include subprocesses.Bit 12 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-0015-42

Page 101: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_MATCH_ Determines whether one or more contiguous sections of a file name match the corresponding sections of a file name pattern.

error

generic-set

Bit 13 If device-subtype is supplied, a file name must not match the device subtype value to be returned.

Bit 14 If device-type is supplied, a file name must not match the device type value to be returned.

Bit 15 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.

#include <cextdecs(FILENAME_MATCH_)>short FILENAME_MATCH_ ( const char *filename /* i */ ,short length /* i */ ,const char *pattern /* i */ ,short length /* i */ ,[ short *generic-set ] );/* o */

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

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

Guardian Programming Reference Summary for C—522630-0015-43

Page 102: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_RESOLVE_ Converts a partially qualified file name to a fully qualified file name.

options

#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 */

Bits 0-7 Reserved (specify 0).Bit 8 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.

Bit 9 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.

Bit 10 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.

Bit 11 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.

Bit 12 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.

Bit 13 If a logical device number (LDEV) appears as part of partialname, FILENAME_RESOLVE_ translates it to the corresponding symbolic device name.

Bit 14 A single name part supplied in partialname is to be treated as a subvolume name or pattern.

Bit 15 All alphabetic characters in the resolved file name are to be shifted to upper case.

Guardian Programming Reference Summary for C—522630-0015-44

Page 103: Guardian Programming Ref for C

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.

kind

entity-level

options

FILENAME_TO_OLDFILENAME_ Converts a file name to a C-series internal file name.

#include <cextdecs(FILENAME_SCAN_)>short FILENAME_SCAN_ ( const char *string /* i */ ,short length /* i */ ,[ short *count ] /* o */ ,[ short *kind ] /* o */ ,[ short *entity-level ] /* o */ ,[ short options ] ); /* i */

0 = File name (that is, the name of an entity).1 = 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.

2 = DEFINE name.

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

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

#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-0015-45

Page 104: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_TO_PATHNAME_ Converts a Guardian file name or subvolume name to an OSS pathname.

return value:

#include <cextdecs(FILENAME_TO_PATHNAME_)>short FILENAME_TO_PATHNAME_ ( const char *filename /* i */ ,short length /* i */ ,char *pathname /* o */ ,short maxlen /* i */ ,short *pathlen /* o */ ,short [ options ] /* i */ ,short [ *index ] );

0 = No error. 563 = The pathname buffer is too small to contain the resulting name. 4002 = 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.

4006 = The fileset that corresponds to the supplied Guardian name for an OSS file is not mounted. The corresponding OSS errno value is ENXIO.

4013 = 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.

4014 = A parameter has an invalid address. The corresponding OSS errno value is DEFAULT.

4022 = 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.

4202 = The root fileset is not mounted. The corresponding OSS errno value is ENOROOT.

4211 = 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.

Guardian Programming Reference Summary for C—522630-0015-46

Page 105: Guardian Programming Ref for C

Functions Summary (D-F)

FILENAME_TO_PROCESSHANDLE_ Converts a process file name to a process handle.

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.

level

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.

#include <cextdecs(FILENAME_TO_PROCESSHANDLE_)>short FILENAME_TO_PROCESSHANDLE_ const char *filename /* i */ ,short length /* i */ ,short *processhandle ); /* o */

#include <cextdecs(FILENAME_UNRESOLVE_)>short FILENAME_UNRESOLVE_ ( const char *longname /* i */ ,short length /* i */ ,char *shortname /* o */ ,short maxlen /* i */ ,short *shortname-length /* o */ ,[ short level ] /* i */ ,[ const char *defaults ] /* i */ ,[ short length ] ); /* i */

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

Guardian Programming Reference Summary for C—522630-0015-47

Page 106: Guardian Programming Ref for C

Functions Summary (D-F)

FIXSTRING Edits a string based on subcommands provided in a template.

modification-status

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.

#include <cextdecs(FIXSTRING)>_cc_status FIXSTRING ( char *template /* i */ ,short template-len /* i */ ,char *data /* i,o */ ,short _near *data-len /* i,o */ ,[ short maximum-data-len ] /* i */ ,[ short _near *modification-status ] ); /* o */

_status_lt (<return_value>) One or more of the required parameters is missing.

_status_eq (<return_value>) The operation finished successfully._status_gt (<return_value>) An insert or replace would have caused the

data string to exceed the maximum-data-len.

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

Guardian Programming Reference Summary for C—522630-0015-48

Page 107: Guardian Programming Ref for C

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-0015-49

Page 108: Guardian Programming Ref for C

Functions Summary (D-F)

FORMATCONVERT[X] Converts the external format to the internal form required for presentation to the FORMATDATA[X] procedures.

status

conversion

#include <cextdecs(FORMATCONVERT)>short FORMATCONVERT ( char *iformat /* o */ ,short iformatlen /* i */ ,char *eformat /* i */ ,short eformatlen /* i */ ,short *scales /* o */ ,short *scale-count /* i,o */ ,short conversion ); /* i */

#include <cextdecs(FORMATCONVERTX)>short FORMATCONVERTX ( char *iformat /* o */ ,short iformatlen /* i */ ,const char *eformat /* i */ ,short eformatlen /* i */ ,short _near *scales /* o */ ,short _near *scale-count /* i,o */ ,short conversion ); /* i */

> 0 = Successful conversion. The value is the number of bytes in the converted format (iformat).

= 0 = iformatlen was insufficient to hold the entire converted format.< 0 = 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.

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

Guardian Programming Reference Summary for C—522630-0015-50

Page 109: Guardian Programming Ref for C

Functions Summary (D-F)

FORMATDATA[X] Converts data-item values between internal and external representations.

return value:

flags

#include <cextdecs(FORMATDATA)>short FORMATDATA ( char _near *buffer /* i,o */ ,short bufferlen /* i */ ,short buffer-occurs /* i */ ,short _near *length /* o */ ,short _near *iformat /* i */ ,short _near *variable-list /* i */ ,short variable-list-len /* i */ ,short flags ); /* i */

#include <cextdecs(FORMATDATAX)>short FORMATDATAX ( char *buffer /* i,o */ ,short bufferlen /* i */ ,short buffer-occurs /* i */ ,short *length /* o */ ,short *iformat /* i */ ,short *variable-list /* i */ ,short variable-list-len /* i */ ,short flags ); /* i */

0 = Successful operation267 = Buffer overflow268 = No buffer271 = EDIT item mismatch272 = Illegal input character273 = Bad format274 = Numeric overflow

Bit 2 = List-directed0 =1 =

Apply the format-directed operation.Apply the list-directed operation.

Bit 3 = P-Relative (iformat array)0 =1 =

The iformat array address is G-relative.The iformat array address is P-relative.

Bit 4 = Null value passed

Guardian Programming Reference Summary for C—522630-0015-51

Page 110: Guardian Programming Ref for C

Functions Summary (D-F)

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).

Bit 15 = Input0 =1 =

FORMATDATA[X] performs output operations.FORMATDATA[X] performs input operations.

Guardian Programming Reference Summary for C—522630-0015-52

Page 111: Guardian Programming Ref for C

6 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).

request-id

#include <cextdecs(GETCPCBINFO)>void GETCPCBINFO ( short request-id /* i */ ,short _near *cpcb-info /* o */ ,short in-length /* i */ ,short _near *out-length /* o */ ,short _near *error ); /* o */

0 = Remote creator flag; returns 1 in cpcb-info if creator was remote.1 = Logged-on process state; returns 1 in cpcb-info if the process has logged on.2 = 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.3 = Safeguard-authenticated logoff state; returns 1 in cpcb-info if the Safeguard-

authenticated logon flag is set but the process has logged off.4 = Inherited-logon flag; returns 1 in cpcb-info if the logon was inherited by the

process.5 = 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.6 = Propagate-logon flag; returns 1 in cpcb-info if the process’s local

descendants are to be created with the inherited-logon flag set. 7 = Propagate-stop-on-logoff flag; returns 1 in cpcb-info if the process’s local

descendants are to be created with the stop-on-logoff flag set. 16 = 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-0016-1

Page 112: Guardian Programming Ref for C

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_.

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(GETINCREMENTEDIT)>long GETINCREMENTEDIT ( short filenum ); /* i */

#include <cextdecs(GETPOSITIONEDIT)>long GETPOSITIONEDIT ( short filenum ); /* i */

Guardian Programming Reference Summary for C—522630-0016-2

Page 113: Guardian Programming Ref for C

Functions Summary (G-N)

GETPPDENTRY(superseded by PROCESS_GETPAIRINFO_) Obtains a description of a named process pair by the process pair’s 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 file’s synchronization block so it can be sent to the backup process in a checkpoint message.

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.

#include <cextdecs(GETSYNCINFO)>_cc_status GETSYNCINFO ( short filenum /* i */ ,[ short _near *sync-block ] /* o */ ,[ short _near *sync-block-size ] ); /* o */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) GETSYNCINFO was successful._status_gt (<returned_value>) The file is not a disk file.

Guardian Programming Reference Summary for C—522630-0016-3

Page 114: Guardian Programming Ref for C

Functions Summary (G-N)

GROUP_GETINFO_ Returns attributes of the specified group.

returned value:

is-auto-delete

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

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

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

0 = No error. 11 = Record not in use. The specified group name or group ID is undefined. 22 = 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.

29 = This procedure was called without specifying a required parameter. 590 = 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.

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

Guardian Programming Reference Summary for C—522630-0016-4

Page 115: Guardian Programming Ref for C

Functions Summary (G-N)

GROUPIDTOGROUPNAME (superseded by USER_GETINFO_) Returns the group name associated with an existing group ID from the USERID file.

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(GROUP_GETNEXT_)>short GROUP_GETNEXT_ ( [ char *group-name ] /* i */ ,[ short group-maxlen ] /* o,i */ ,[ short *group-curlen ] /* i,o */ ,[ long *groupid ] ); /* o */

#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.

_status_eq (<returned_value>) The designated group name is returned._status_gt (<returned_value>) The specified group ID is undefined.

#include <cextdecs(GROUPMEMBER_GETNEXT_)>short GROUPMEMBER_GETNEXT_ ( long groupid /* i */ ,char *member-name /* i */ ,short member-maxlen /* o,i */ ,short *member-curlen );/* i,o */

Guardian Programming Reference Summary for C—522630-0016-5

Page 116: Guardian Programming Ref for C

Functions Summary (G-N)

returned value:

GROUPNAMETOGROUPID (superseded by USER_GETINFO_) Returns the group ID associated with an existing group name from the USERID file.

HALTPOLL stops continuous polling.

0 = No error. 11 = Record not in file. The specified group has no more members or is

undefined. 22 = 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.

29 = This procedure was called without specifying all parameters. 590 = 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.

#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.

_status_eq (<returned_value>) The designated group ID is returned._status_gt (<returned_value>) The specified group name is undefined.

#include <cextdecs(HALTPOLL)>_cc_status HALTPOLL ( short filenum ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The HALTPOLL procedure executed

successfully.

Guardian Programming Reference Summary for C—522630-0016-6

Page 117: Guardian Programming Ref for C

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.

return value:

HEAPSORT sorts an array of equal-sized elements in place.

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 */

0D = Either the requested space already exists in the stack space or the stack space was successfully enlarged to make enough room for the request.

5D = The request would have exceeded the maximum stack size.6D = The stack pointer is invalid.7D = The stack pointer does not address a main stack or a privileged stack.36D = The system was unable to allocate memory.43D = The system was unable to obtain swap space.45D = The Kernel Managed Swap Facility (KMSF) was unable to obtain swap

space.

#include <cextdecs(HEAPSORT)>short HEAPSORT ( short _near *array /* i,o */ ,short num-elements /* i */ ,short size-of-element /* i */ ,short (*)()compare-function );/* i */

Guardian Programming Reference Summary for C—522630-0016-7

Page 118: Guardian Programming Ref for C

Functions Summary (G-N)

HEAPSORTX_Sorts an array of equal-sized elements in place.

return value:

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.

return value:

#include <cextdecs(HEAPSORTX_)>short HEAPSORTX_ ( short *array /* i,o */ ,long num-elements /* i */ ,short size-of-element /* i */ ,short (*)()compare-function );/* i */

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

#include <histry.h>short HIST_FORMAT_ ( NSK_histWorkspace *workspace /* i,o */ ,char *text /* o */ ,const uint16 limit ); /* i */

-2 = HIST_BAD_WIDTHThe value of the limit parameter is less than the minimum width for output defined by the Hist_MinWidth literal in the HHISTRY header file.

-9 = HIST_BAD_WORKSPACEThe 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.

-10 = HIST_BAD_FORMAT_CALLNothing 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-0016-8

Page 119: Guardian Programming Ref for C

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.

return value:

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.

return value:

#include <histry.h>short HIST_GETPRIOR_ ( NSK_histWorkspace *workspace ); /* i,o */

0 = HIST_OKThe procedure executed successfully.

-8 = HIST_ERRORThe stack tracing mechanism failed.

-9 = HIST_BAD_WORKSPACEThe 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.

#include <histry.h>short HIST_INIT_ ( NSK_histWorkspace *workspace /* i,o */ ,const uint32 version /* i */ ,const uint16 options /* i */ ,const void *context ); /* i */

0 = HIST_OKThe procedure terminated normally.

-3 = HIST_BAD_VERSIONAn invalid value was specified for the version parameter.

-4 = HIST_BAD_OPTIONAn invalid value was specified for the options parameter. An undefined bit was set.

Guardian Programming Reference Summary for C—522630-0016-9

Page 120: Guardian Programming Ref for C

Functions Summary (G-N)

options

-5 = HIST_BAD_CONTEXTA null value was specified for the context parameter. The context parameter must contain an address.

-6 = HIST_NOT_IMPLEMENTEDA specified options bit is defined but not implemented.

-7 = HIST_INIT_ERRORAn error occurred during an attempt to initialize the stack trace.

-8 = HIST_ERRORThe stack tracing mechanism failed while attempting to trace back to the calling procedure.

-11 = HIST_MISSING_HOOKThis error is not returned in the D40 release.

Bits 13-15 = 0 HO_Init_HereStarts a trace of the current stack with the context of this call to HIST_INIT_. The context parameter is ignored in this case.

= 1 HO_Init_uContextUses 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.

Guardian Programming Reference Summary for C—522630-0016-10

Page 121: Guardian Programming Ref for C

Functions Summary (G-N)

The displayed context is affected when any of the following bits are set to 1:

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_.

= 2 HO_Init_JmpBufUses 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.

= 3 HO_Init_31RegsIs reserved for Tandem use.

= 4 HO_Init_AddressUses 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.

Bit 11 HO_NoSuppressEnables 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.

Bit 10 HO_ShowProtectedEnables 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.

Bit 7 HO_OneLineModifies 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.

Guardian Programming Reference Summary for C—522630-0016-11

Page 122: Guardian Programming Ref for C

Functions Summary (G-N)

INITIALIZEEDIT Allocates the EDIT file segment (EFS) to be used by IOEdit and initializes the data structures that it contains.

nowait-option

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++ Programmer’s 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.

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

#include <cextdecs(INITIALIZEEDIT)>short INITIALIZEEDIT ( [ short *swapvol ] /* i */ ,[ short maxfiles ] /* i */ ,[ short errorabend ] /* i */ ,[ short nowait-option ] ); /* i */

0 = Don’t use double buffering on any file.1 = Use double buffering on all files that the user opens for nowait I/O before

calling OPENEDIT_ (or OPENEDIT).2 = Use double buffering on all files opened for nowait I/O, whether by the user or

by OPENEDIT_ (or OPENEDIT).

Guardian Programming Reference Summary for C—522630-0016-12

Page 123: Guardian Programming Ref for C

Functions Summary (G-N)

INTERPRETJULIANDAYNO Converts a Julian day number to the Gregorian year, month, and day.

INTERPRETTIMESTAMP Converts a 64-bit Julian timestamp into a Gregorian (the common civil calendar) date and time of day.

date-n-time

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

#include <cextdecs(INTERPRETJULIANDAYNO)>void INTERPRETJULIANDAYNO ( long julian-day-num /* i */ ,short _near *year /* o */ ,short _near *month /* o */ ,short _near *day ); /* o */

#include <cextdecs(INTERPRETTIMESTAMP)>long INTERPRETTIMESTAMP( long long julian-timestamp /* i */ ,short _near *date-and-time ); /* o */

[0] = The Gregorian year (yyyy).[1] = The Gregorian month (1-12).[2] = The Gregorian day of month (1-31).[3] = The hour of the day (0-23).[4] = The minute of the hour (0-59).[5] = The second of the minute (0-59).[6] = The millisecond of the second (0-999).[7] = The microsecond of the millisecond (0-999).

Guardian Programming Reference Summary for C—522630-0016-13

Page 124: Guardian Programming Ref for C

Functions Summary (G-N)

JULIANTIMESTAMP Returns a four-word, microsecond resolution, Julian-date-based timestamp.

type

KEYPOSITION[X] (superseded by FILE_SETKEY_) Positions by primary or alternate key within a structured file.

#include <cextdecs(JULIANTIMESTAMP)>long long JULIANTIMESTAMP ( [ short type ] /* i */ ,[ short _near *tuid ] /* o */ ,[ short _near *error ] /* o */ ,[ short node ] ); /* i */

0 = Current GMT1 = System-load GMT2 = SYSGEN GMT3 = Microseconds since system coldload

#include <cextdecs(KEYPOSITION)>_cc_status KEYPOSITION ( short filenum /* i */ ,char *key-value /* i */ ,[ short key-specifier ] /* i */ ,[ short length-word ] /* i */ ,[ short positioning-mode ] ); /* i */#include <cextdecs(KEYPOSITIONX)>_cc_status KEYPOSITIONX ( short filenum /* i */ ,const char *key-value /* i */ ,[ short key-specifier ] /* i */ ,[ short length-word ] /* i */ ,[ short positioning-mode ] );/* i */

_status_lt (<returned_value>) Indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).

_status_eq (<returned_value>) Indicates that the KEYPOSITION was successful.

_status_gt (<returned_value>) Indicates that this is not a structured disk file.

Guardian Programming Reference Summary for C—522630-0016-14

Page 125: Guardian Programming Ref for C

Functions Summary (G-N)

LABELEDTAPESUPPORT Provides a way for nonprivileged programs to determine whether tape-label processing is enabled on the system.

return value:

LASTADDR (superseded by ADDRESS_DELIMIT_) Returns the 'G'[0] relative address of the last word in the application process’s data area.

LASTADDRX (superseded by ADDRESS_DELIMIT_) Returns the last extended address available in the specified relative segment.

seg

#include <cextdecs(LABELEDTAPESUPPORT)>short LABELEDTAPESUPPORT ( [ short sysnum ] ); /* i */

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

#include <cextdecs(LASTADDR)>short LASTADDR ();

#include <cextdecs(LASTADDRX)>long LASTADDRX ( [ short seg ] ); /* i */

0 = User data.1 = If privileged, it is system data; if not, it is user data.2 = Current code.3 = User code.4-1023 = Selectable extended data segment.

Guardian Programming Reference Summary for C—522630-0016-15

Page 126: Guardian Programming Ref for C

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.

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.

#include <cextdecs(LOCKFILE)>_cc_status LOCKFILE ( short filenum /* i */ ,[ long tag ] );/* o */

_status_lt (<returned_value>) An error occurred (call FILEINFO).

_status_eq (<returned_value>) LOCKFILE was successful.

_status_gt (<returned_value>) The file is not a disk file.

Guardian Programming Reference Summary for C—522630-0016-16

Page 127: Guardian Programming Ref for C

Functions Summary (G-N)

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.

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(LOCKREC)>_cc_status LOCKREC ( short filenum /* i */ ,[ long tag ] );/* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO).

_status_eq (<returned_value>) LOCKREC was successful.

_status_gt (<returned_value>) The file is not a disk file.

#include <setjmp.h> jmp_buf env;void longjmp ( jmp_buf env /* i */ ,int value ) /* i */

#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-0016-17

Page 128: Guardian Programming Ref for C

Functions Summary (G-N)

result

MBCS_CHAR_ Indicates whether a string of bytes is part of a Tandem multibyte character set (MBCS).

result

charset

when result is nonzero:

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.

0 = Indicates that the buffer string does not contain any Katakana characters or that charset did not specify the Tandem Kanji multibyte character set.

1 = Indicates that the Tandem Kanji buffer string contains at least one Katakana character.

#include <cextdecs(MBCS_CHAR_)>short MBCS_CHAR_ ( char *testmbcschar /* i */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* i,o */

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.

nonzero = 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.

1 = Tandem Kanji9 = Tandem Hangul10 = Tandem Chinese Big 511 = Tandem Chinese PC12 = Tandem KSC5601

Guardian Programming Reference Summary for C—522630-0016-18

Page 129: Guardian Programming Ref for C

Functions Summary (G-N)

result

charset

MBCS_CHARSTRING_ Tests the contents of a data string for the exclusive use of MBCS characters of known internal character sets.

result

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

0 Indicates that either no MBCS is configured or that the specified MBCS is not supported.

nonzero Indicates that the result parameter contains the following information:Bits 0-7 Contains the display size (in columns) of the multibyte character

identified by the test.Bits 8-15 Contains the internal size (in bytes) of the multibyte character

identified by the test.

1 = Tandem Kanji9 = Tandem Hangul10 = Tandem Chinese Big 511 = Tandem Chinese PC12 = Tandem KSC5601

#include <cextdecs(MBCS_CHARSTRING_)>short MBCS_CHARSTRING_ ( char *testmbcschar /* i */ ,short bytecount /* i */ ,short *index /* o */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

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.

1 = Indicates that all MBCS characters in the testmbcsstring are valid characters (or blanks) of the specified MBCS.

Guardian Programming Reference Summary for C—522630-0016-19

Page 130: Guardian Programming Ref for C

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).

result

MBCS_DEFAULTCHARSET_ Returns the default multibyte character set (MBCS) identification.

result

#include <cextdecs(MBCS_CODESETS_SUPPORTED_)>long MBCS_CODESETS_SUPPORTED_ ();

Bit 1 = Tandem KanjiBit 2 = IBM KanjiBit 3 = IBM Kanji MixedBit 4 = JEF (Fujitsu) KanjiBit 5 = JEF (Fujitsu) Kanji MixedBit 6 = reservedBit 7 = JIS KanjiBit 8 = ReservedBit 9 = Tandem HangulBit 10 = Chinese Big 5Bit 11 = Chinese PC (5550C)Bit 12 = Tandem KSC5601 (with KIPS extensions)

#include <cextdecs(MBCS_DEFAULTCHARSET_)>long MBCS_DEFAULTCHARSET_ ();

0 = No MBCS configured1 = Tandem Kanji9 = Tandem Hangul10 = Tandem Chinese Big 511 = Tandem Chinese PC12 = Tandem KSC5601

Guardian Programming Reference Summary for C—522630-0016-20

Page 131: Guardian Programming Ref for C

Functions Summary (G-N)

MBCS_EXTERNAL_TO_TANDEM_ Translates a text string from a specified external format to the Tandem internal text format.

return value:

external-form

#include <cextdecs(MBCS_EXTERNAL_TO_TANDEM_)>short MBCS_EXTERNAL_TO_TANDEM_ ( [ long *source-string ] /* i,o */ ,[ long *destination-string ] /* i,o */ ,short source-length /* i */ ,short *maximum-length /* i,o */ ,[ short intermediate ] /* i */ ,short external-form /* i */ ,[ short *finished-length ] /* o */ ,[ char *shift-to-MBCS ] /* i */ ,[ char *shift-to-one-byte ] );/* i */

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

0 = IBM Kanji only (without subfield strings)1 = IBM Kanji EBCDIC2 = IBM Kanji/Katakana-EBCDIC3 = JEF (Fujitsu) Kanji only4 = JEF (Fujitsu) Kanji EBCDIC5 = JEF (Fujitsu) Kanji/Katakana-EBCDIC6 = NEC Kanji only (not implemented)7 = NEC Kanji/JIS X0201 (not implemented)8 = JIS X0208 Kanji/JIS X0201 (was C6226/C6220)

Guardian Programming Reference Summary for C—522630-0016-21

Page 132: Guardian Programming Ref for C

Functions Summary (G-N)

MBCS_FORMAT_CRT_FIELD Formats Kanji-only or mixed data types for specific terminal types.

return value:

terminal-type

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

0 = Successful completion of the translation-1 = Source string translation incomplete, ran out of destination buffer area or ran

out of space in the screen field-2 = Unknown terminal type specified-3 = Invalid source-string length-4 = Invalid character in Kanji-only source string-5 = Control string parameter too long-6 = Source string translation incomplete, ran out of room in screen field29 = Parameter missing

4 = Fujitsu F-6650 with lowercase alphabet5 = Fujitsu F-6650 with one-byte Katakana

Guardian Programming Reference Summary for C—522630-0016-22

Page 133: Guardian Programming Ref for C

Functions Summary (G-N)

MBCS_FORMAT_ITI_BUFFER_ Formats ITI buffers for specific terminal types.

return value:

terminal-type

#include <cextdecs(MBCS_FORMAT_ITI_BUFFER_)>short MBCS_FORMAT_ITI_BUFFER_ ( long *source-string /* i,o */ ,long *destination-string /* i,o */ ,short source-length /* i */ ,short maximum-length /* i */ ,short intermediate /* i */ ,short terminal-type /* i */ ,short maximum-col-count /* i */ ,short *finished-length /* o */ ,short *screen-col-count /* o */ ,[ char *shift-to-MBCS ] /* i */ ,[ char *shift-to-one-byte ] /* i */ ,[ short startmode ] ); /* i */

0 = Successful completion of the translation-1 = Source string translation incomplete, ran out of destination buffer area-2 = Unknown terminal type specified-3 = Invalid source-string length-4 = Invalid character in Kanji-only source string-5 = Control string parameter too long29 = Parameter missing

0 = IBM 3274-series1 = IBM Emulation on IBM5550 with one-byte Katakana2 = IBM Emulation on IBM5550 with lowercase alphabet4 = Fujitsu F-6650 with lowercase alphabet5 = Fujitsu F-6650 with one-byte Katakana

Guardian Programming Reference Summary for C—522630-0016-23

Page 134: Guardian Programming Ref for C

Functions Summary (G-N)

MBCS_MB_TO_SB_ Converts multibyte characters to the corresponding 1-byte ASCII characters.

charset

MBCS_REPLACEBLANK_ Replaces nonstandard blanks.

MBCS_SB_TO_MB_ Converts 1-byte ASCII characters to the corresponding multibyte characters.

#include <cextdecs(MBCS_MB_TO_SB_)>void MBCS_MB_TO_SB_ ( char *mbytestring /* i */ ,short mbytecount /* i */ ,char *sbytestring /* o */ ,short sbytecount /* i */ ,short *rbytecount /* o */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

1 = Tandem Kanji9 = Tandem Hangul10 = Tandem Chinese Big 511 = Tandem Chinese PC12 = Tandem KSC5601

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

#include <cextdecs(MBCS_SB_TO_MB_)>void MBCS_SB_TO_MB_ ( char *sbytestring /* i */ ,short sbytecount /* i */ ,char *mbytestring /* o */ ,short mbytecount /* i */ ,short *rbytecount /* o */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

Guardian Programming Reference Summary for C—522630-0016-24

Page 135: Guardian Programming Ref for C

Functions Summary (G-N)

charset

MBCS_SHIFTSTRING_ Upshifts or downshifts all alphabetic characters in a multibyte character set (MBCS) string.

MBCS_TANDEM_TO_EXTERNAL_ Translates a text string from Tandem internal format to a specified external text format.

return value:

1 = Tandem Kanji9 = Tandem Hangul10 = Tandem Chinese Big 511 = Tandem Chinese PC12 = Tandem KSC5601

#include <cextdecs(MBCS_SHIFTSTRING_)>void MBCS_SHIFTSTRING_ ( char *bytestring /* i */ ,short bytecount /* i */ ,short casebit /* i */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

#include <cextdecs(MBCS_TANDEM_TO_EXTERNAL_)>short MBCS_TANDEM_TO_EXTERNAL_ ( [ long *source-string ] /* i,o */ ,[ long *destination-string ] /* i,o */ ,short source-length /* i */ ,short *maximum-length /* i,o */ ,[ short intermediate ] /* i */ ,short external-form /* i */ ,[ short *finished-length ] /* o */ ,[ char *shift-to-MBCS ] /* i */ ,[ char *shift-to-one-byte ] );/* i */

0 = Successful completion of the translation-1 = Translation truncated due to lack of destination buffer space-2 = Unknown translation requested-3 = Invalid source-string length

Guardian Programming Reference Summary for C—522630-0016-25

Page 136: Guardian Programming Ref for C

Functions Summary (G-N)

external-form

MBCS_TESTBYTE_ Returns the identification of a specified byte contained within a text string of mixed data.

result

-4 = Invalid character in Kanji-only source string-5 = Control string parameter too long-6 = Translation truncated due to lack of space in screen field29 = Required parameter missing

0 = IBM Kanji only (without subfield strings)1 = IBM Kanji EBCDIC2 = IBM Kanji/Katakana-EBCDIC3 = JEF (Fujitsu) Kanji only4 = JEF (Fujitsu) Kanji EBCDIC5 = JEF (Fujitsu) Kanji/Katakana-EBCDIC6 = NEC Kanji only (not implemented)7 = NEC Kanji/JIS X0201 (not implemented)8 = JIS X0208 Kanji/JIS X0201 (was C6226/C6220)

#include <cextdecs(MBCS_TESTBYTE_)>short MBCS_TESTBYTE_ ( char *buffer /* i */ ,short bytecount /* i */ ,short *testindex /* i,o */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

0 = 1-byte character1 = First byte of a multibyte character2 = Intermediate byte of a multibyte character3 = Last byte of a multibyte character

Guardian Programming Reference Summary for C—522630-0016-26

Page 137: Guardian Programming Ref for C

Functions Summary (G-N)

MBCS_TRIMFRAGMENT_ Detects and trims trailing multibyte character fragments from text strings.

MESSAGESTATUS Determines if a particular message received through READUPDATE has been canceled.

status

MESSAGESYSTEMINFO Measures the number of XLBs used by a process, so it can warn when a limit is nearly reached.

return value:

#include <cextdecs(MBCS_TRIMFRAGMENT_)>void MBCS_TRIMFRAGMENT_ ( char *bytestring /* i */ ,short *bytecount /* i,o */ ,[ short charset ] /* i */ ,[ short *charinfo ] );/* o */

#include <cextdecs(MESSAGESTATUS)>short MESSAGESTATUS ( [ short message-tag ] ); /* i */

1 = The message has been canceled. 0 = The message has not been canceled.-1 = No pending message is associated with the given tag.

#include <cextdecs(MESSAGESYSTEMINFO)>short MESSAGESYSTEMINFO ( short itemcode /* i */ ,short *value );/* o */

0 = Successful, no error2 = Bad itemcode21 = Bad value22 = Bounds error29 = Missing parameter

Guardian Programming Reference Summary for C—522630-0016-27

Page 138: Guardian Programming Ref for C

Functions Summary (G-N)

value

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.

MONITORNET Enables or disables the receipt of system messages concerning the status of processors in remote systems.

enable

0 = The current limit on the number of messages to this process, as set by CONTROLMESSAGESYSTEM

1 = The current limit on the number of messages from this process, as set by CONTROLMESSAGESYSTEM

4 = The number of outstanding (non-LCB) messages to this process5 = The number of outstanding (non-LCB) messages from this process

#include <cextdecs(MONITORCPUS)>void MONITORCPUS ( short cpu-mask ); /* i */

#include <cextdecs(MONITORNET)>void MONITORNET ( short enable ); /* i */

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

Guardian Programming Reference Summary for C—522630-0016-28

Page 139: Guardian Programming Ref for C

Functions Summary (G-N)

MONITORNEW Enables or disables the receipt of the SETTIME and Power On messages.

enable

MOVEX Moves data between extended data segments without the need for absolute addressing; it serves both privileged and nonprivileged users.

return value:

#include <cextdecs(MONITORNEW)>void MONITORNEW ( short enable ); /* i */

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

#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>) The specified data was moved; error contains 0.

_status_gt (<returned_value>) An error occurred; error contains the error value.

0 = Successful call; the specified data was moved.2 = Either source-seg-id or dest-seg-id specified a nonexistent

extended data segment, or the destination data segment has read-only access.22 = One of the parameters specifies an address that is out of bounds.24 = Either source-seg-id or dest-seg-id specified a privileged segment

ID (greater than 2047), but the caller was not privileged.29 = A required parameter is not supplied.

Guardian Programming Reference Summary for C—522630-0016-29

Page 140: Guardian Programming Ref for C

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.

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.

#include <cextdecs(MYPROCESSTIME)>long long MYPROCESSTIME ();

Guardian Programming Reference Summary for C—522630-0016-30

Page 141: Guardian Programming Ref for C

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.

no-retry

#include <cextdecs(NO_ERROR)>short NO_ERROR ( short state ,short _near *file-fcb /* i */ ,short _near *good-error-list /* i */ ,short retryable ); /* i */

_status_eq (<returned_value>) The operation is successful.

0 = The operation should be retried.<>0 = The operation should not be retried.

Guardian Programming Reference Summary for C—522630-0016-31

Page 142: Guardian Programming Ref for C

Functions Summary (G-N)

state

NODE_GETCOLDLOADINFO_ Retrieves the name of the OSIMAGE file from which the specified node was cold loaded.

returned value:

NODENAME_TO_NODENUMBER_ Converts a node name (system name) to the corresponding node number (system number).

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

#include <cextdecs(NODE_GETCOLDLOADINFO_)>short NODE_GETCOLDLOADINFO_ ( char *filename /* o */ ,short maxlen /* i */ ,short *filename-length /* o */ ,[ const char *nodename ] /* i */ ,[ short length ] ); /* i */

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

#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-0016-32

Page 143: Guardian Programming Ref for C

Functions Summary (G-N)

NODENUMBER_TO_NODENAME_ Converts a node number (system number) to the corresponding node name (system name).

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_.

return value:

NUMIN Converts ASCII characters that represent a number into the signed integer value for that number.

#include <cextdecs(NODENUMBER_TO_NODENAME_)>short NODENUMBER_TO_NODENAME_ ( [ long nodenumber ] /* i */ ,char *nodename /* o */ ,short maxlen /* i */ ,short *length ); /* o */

#include <cextdecs(NUMBEREDIT)>short NUMBEREDIT ( short filenum /* i */ ,long first /* i */ ,long last /* i */ ,[ long start ] /* i */ ,[ long increment ] );/* i */

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

#include <cextdecs(NUMIN)>short NUMIN ( char *ascii-num /* i */ ,short _near *signed-result /* o */ ,short base /* i */ ,short _near *status ); /* o */

Guardian Programming Reference Summary for C—522630-0016-33

Page 144: Guardian Programming Ref for C

Functions Summary (G-N)

NUMOUT Converts unsigned integer values to their ASCII equivalents, right-justified in an array. Any preceding blanks are filled with zeroes.

1 = Nonexistent number 0 = Valid conversion-1 = Illegal integer or illegal syntax

#include <cextdecs(NUMOUT)>short NUMOUT ( char *ascii-result /* o */ ,short unsigned-integer /* i */ ,short base /* i */ ,short width ); /* i */

Guardian Programming Reference Summary for C—522630-0016-34

Page 145: Guardian Programming Ref for C

7 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.

return value

error-detail

#include <cextdecs(OBJFILE_GETINFOLIST_)>short OBJFILE_GETINFOLIST_ ( 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 lib-info ] /* i */ ,[ short *error-detail ] /* o */ ,[ const char *srl-filename ] /* i */ ,[ short srl-filename-len ] ); /* i */

0 = Information is returned successfully.1 = 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.

2 = 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.

3 = 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.

4 = Invalid attribute code specified; error-detail contains the attribute code that is unknown to OBJFILE_GETINFOLIST_.

5 = The process does not have a user library.

Attribute Code Attribute Description Value Representation1 Binder timestamp short (3 TNS words)2 Minimum tos version short3 Inspect length long

Guardian Programming Reference Summary for C—522630-0017-1

Page 146: Guardian Programming Ref for C

Functions Summary (O-Q)

OLDFILENAME_TO_FILENAME_ Converts a C-series internal file name to a D-series file name.

OLDSYSMSG_TO_NEWSYSMSG_ Converts a C-series system message to its D-series equivalent.

4 Binder length long5 Inspect on short6 High PIN short7 High requesters short8 Run named short9 PFS size long10 Target processor short11 Accelerator timestamp short (4 TNS words)12 Compilation mode (accelerated or not

accelerated)short

13 Run mode (will or will not run accelerated) short

#include <cextdecs(OLDFILENAME_TO_FILENAME_)>short OLDFILENAME_TO_FILENAME_ ( short *oldfilename /* i */ ,char *filename /* o */ ,short maxlen /* i */ ,short *filename-length );/* o */

#include <cextdecs(OLDSYSMSG_TO_NEWSYSMSG_)>short OLDSYSMSG_TO_NEWSYSMSG_ ( char *oldmsg /* i */ ,short length /* i */ ,char *newmsg /* o */ ,short maxlen /* i */ ,short *newmsg-length /* o */ ,[ short *error-detail ] );/* o */

Attribute Code Attribute Description Value Representation

Guardian Programming Reference Summary for C—522630-0017-2

Page 147: Guardian Programming Ref for C

Functions Summary (O-Q)

returned value:

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.

flags

0 = Message successfully converted.1 = File-system error; error-detail contains the file-system error number.2 = 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.3 = 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.4 = The supplied system message is not supported by this procedure; no

conversion was performed.

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

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

ABORT^OPENERR %1DABORT^XFERERR %2DAUTO^CREATE %10DAUTO^TOF %100D

Guardian Programming Reference Summary for C—522630-0017-3

Page 148: Guardian Programming Ref for C

Functions Summary (O-Q)

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.

BLOCKED %400DCRLF^BREAK %40000DLEVEL3^SPOOL^ENABLE %200000DMUSTBENEW %20DNOWAIT %200DOLD^RECEIVE %100000DPRINT^ERR^MSG %4DPURGE^DATA %40DREAD^TRIM %2000DVAR^FORMAT %1000DWRITE^FOLD %10000DWRITE^PAD %20000DWRITE^TRIM %4000D

#include <cextdecs(OPENEDIT_)>short OPENEDIT_ ( const char *file-name /* i */ ,short length /* i */ ,short *filenum /* i,o */ ,[ short access ] /* i */ ,[ short exclusion ] /* i */ ,[ short nowait ] /* i */ ,[ short sync-depth ] /* i */ ,[ short write-thru ] );/* i */

Guardian Programming Reference Summary for C—522630-0017-4

Page 149: Guardian Programming Ref for C

Functions Summary (O-Q)

return value

OPENER_LOST_ Examines a system message and searches an open table to determine if an opener has been lost.

status

-1 = Page-count value is inconsistent.-2 = Page-table tags are out of order.-3 = Page-table tag is outside legal range.-4 = Page-table block number is outside of file.-5 = Page-table has duplicate block numbers.11 = File does not exist; indicates that the file does not exist and that the flags

parameter indicates read-only access to the file.14 = 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.16 = 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).

31 = Unable to obtain buffer space; indicates that the file’s directory does not fit into IOEdit’s extended data segment and OPENEDIT is unable to enlarge the segment.

34 = 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.

59 = 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.

#include <cextdecs(OPENER_LOST_)>short OPENER_LOST_ ( char *message /* i */ ,short length /* i */ ,short *table /* i */ ,short *index /* i,o */ ,short number-of-entries /* i */ ,short entry-size ); /* i */

0 = Search completed; no lost openers1 = (reserved)2 = Parameter error

Guardian Programming Reference Summary for C—522630-0017-5

Page 150: Guardian Programming Ref for C

Functions Summary (O-Q)

message:length

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.

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_.

3 = Bounds error4 = Backup opener lost5 = Primary opener lost; backup promoted to primary6 = Openers lost; table entry now free7 = Message is not a relevant status-change message

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

#include <cextdecs(OSS_PID_NULL_)>long OSS_PID_NULL_ ( void );

#include <cextdecs(PACKEDIT)>void PACKEDIT ( char *unpacked-line /* i */ ,short unpacked-length /* i */ ,char *packed-line /* o */ ,short packed-limit /* i */ ,short *packed-length /* o */ ,[ short full-length ] );/* i */

Guardian Programming Reference Summary for C—522630-0017-6

Page 151: Guardian Programming Ref for C

Functions Summary (O-Q)

PATHNAME_TO_FILENAME_ Converts an OSS pathname to a Guardian file name.

returned value:

#include <cextdecs(PATHNAME_TO_FILENAME_)>short PATHNAME_TO_FILENAME_ ( const char *path /* i */ ,char *filename /* o */ ,short maxlen /* i */ ,short *length /* o */ ,[ short *infoflags ] ); /* o */

0 = No error. 563 = The buffer pointed to by filename is too small. 4002 = No such pathname exists. The corresponding OSS errno value is

ENOENT. 4006 = 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.

4013 = Search permission is denied on a component of the pathname prefix. The corresponding OSS errno value is EACCESS.

4014 = A specified parameter has an invalid address. The corresponding OSS errno value is EFAULT.

4020 = A prefix within pathname refers to a file other than a directory. The corresponding OSS errno value is ENOTDIR.

4022 = The value of pathname is invalid. The corresponding OSS errno value is EINVAL.

4131 = 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.

4202 = The root fileset is not mounted. The corresponding OSS errno value is ENOROOT.

4203 = OSS is not installed or is not initialized. The corresponding OSS errno value is EOSSNOTRUNNING.

Guardian Programming Reference Summary for C—522630-0017-7

Page 152: Guardian Programming Ref for C

Functions Summary (O-Q)

POOL_CHECK_ Checks the internal pool data structures and returns error information.

error

POOL_DEFINE_ Designates a portion of a user's stack or an extended data segment for use as a pool.

returned value:

#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 */

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

block. 12 = Corrupt free list blocks. Data is probably written into a returned block.

#include <cextdecs(POOL_DEFINE_)>short POOL_DEFINE_ ( short *pool /* i */ ,long pool-size /* i */ ,[ short alignment ] /* i */ ,[ short priv-only ] );/* i */

0 = No error. 2 = Required parameter missing. The pool and pool-size parameters must be

specified.3 = 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-0017-8

Page 153: Guardian Programming Ref for C

Functions Summary (O-Q)

POOL_GETINFO_ Returns information about the specified pool.

return value:

POOL_GETSPACE_ Obtains a block of memory from a buffer pool.

4 = Invalid size. The pool-size parameter is too small to allocate the minimum size pool including the pool header.

5 = Alignment error on pool. The pool parameter is not in alignment with the selected alignment.

6 = Invalid alignment. The value of alignment is not 0, 4, 8, or 16.

#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 */

0 = No error. 2 = 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.

3 = 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.

9 = Corrupt pool header.

#include <cextdecs(POOL_GETSPACE_)>long POOL_GETSPACE_ ( short *pool /* i */ ,long block-size /* i */ ,short *error ); /* o */

Guardian Programming Reference Summary for C—522630-0017-9

Page 154: Guardian Programming Ref for C

Functions Summary (O-Q)

error

POOL_PUTSPACE_ Returns a block of memory to a buffer pool.

returned value:

POOL_RESIZE_ Returns a block of memory to a buffer pool.

returned value:

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

#include <cextdecs(POOL_PUTSPACE_)>short POOL_PUTSPACE_ ( short *pool /* i */ ,short *block );/* i */

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

or the block has already been returned.

#include <cextdecs(POOL_RESIZE_)>short POOL_RESIZE_ ( short *pool /* i */ ,long new-pool-size );/* i */

0 = No error. 2 = Required parameter missing. 3 = 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-0017-10

Page 155: Guardian Programming Ref for C

Functions Summary (O-Q)

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.

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_.

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.

4 = Invalid size. The new-pool-size parameter is too small to allocate the minimum size pool, including the pool header.

9 = Corrupt pool header. 11 = Corrupt allocated blocks. Data is probably written beyond the allocated

block. 12 = Corrupt free list blocks. Data is probably written into a returned block. 13 = Unable to shrink pool.

#include <cextdecs(POSITION)>_cc_status POSITION ( short filenum /* i */ ,long record-specifier );/* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) POSITION was successful._status_gt (<returned_value>) No operation; filenum does not designate

a disk file.

#include <cextdecs(POSITIONEDIT)>short POSITIONEDIT ( short filenum /* i */ ,long record-number );/* i */

Guardian Programming Reference Summary for C—522630-0017-11

Page 156: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESS_ACTIVATE_ Returns a suspended process or process pair to the ready state.

returned value:

specifier

#include <cextdecs(PROCESS_ACTIVATE_)>short PROCESS_ACTIVATE_ ( short *processhandle /* i */ ,[ short specifier ] );/* i */

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

0 = Activate the specified process.1 = 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-0017-12

Page 157: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESS_CREATE_ (superseded by PROCESS_LAUNCH_) Creates a new Guardian process and, optionally, assigns a symbolic process name to it.

name-option

#include <cextdecs(PROCESS_CREATE_)>short PROCESS_CREATE_ ( [ const char *program-file ] /* i */ ,[ short length ] /* i */ ,[ const char *library-file ] /* i */ ,[ short length ] /* i */ ,[ const char *swap-file ] /* i */ ,[ short length ] /* i */ ,[ const char *ext-swap-file ]/* i */ ,[ short length ] /* i */ ,[ short priority ] /* i */ ,[ short processor ] /* i */ ,[ short *processhandle ] /* o */ ,[ short *error-detail ] /* o */ ,[ short name-option ] /* i */ ,[ const char *name ] /* i */ ,[ short length ] /* i */ ,[ char *process-descr ] /* o */ ,[ short maxlen ] /* i */ ,[ short *process-descr-len ] /* o */ ,[ long nowait-tag ] /* i */ ,[ const char *hometerm ] /* i */ ,[ short length ] /* i */ ,[ short memory-pages ] /* i */ ,[ short jobid ] /* i */ ,[ short create-options ] /* i */ ,[ const char *defines ] /* i */ ,[ short length ] /* i */ ,[ short debug-options ] /* i */ ,[ long pfs-size ] ); /* i */

0 = Process is unnamed.1 = Process is named; name is supplied in name.2 = Process is named; system must generate a name.3 = Process is caller’s backup; use caller’s name.4 = Process is named; system must generate a name.

Guardian Programming Reference Summary for C—522630-0017-13

Page 158: Guardian Programming Ref for C

Functions Summary (O-Q)

create-options

debug-options

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

Bit 0-8 Reserved (specify 0)Bit 9 0 If the caller is named, the process deletion message, if any, will go

only to the current instance of the calling process.1 If the caller is named, the process deletion message, if any, will go to

whatever process has the calling process’s name (regardless of sequence number) at that time.

Bit 10 0 Force new process into a low PIN if the calling process has the inherited force-low attribute set.

1 Ignore the value of the caller’s inherited force-low attribute.Bits 11-12 0 Propagate the DEFINEs in the caller’s context only.

1 Propagate DEFINES in defines only.2 Propagate both sets of defines; in case of name conflicts, use the

ones in defines.Bit 13 0 Use caller’s DEFINE mode.

1 Use value in bit 14.Bit 14 0 DEFINEs disabled (ignored if bit 13 is 0).

1 DEFINEs enabled (ignored if bit 13 is 0).Bit 15 0 Can be assigned any PIN.

1 Requires low PIN (in range 0 through 254).

Bit 0-11 Reserved (specify 0)Bit 12 1 Enter Debug/Inspect at the first executable instruction of the program’s

MAIN procedure.0 Begin normal program execution.

Bit 13 1 If the process traps, create a saveabend file.0 If the process traps, do not create a saveabend file.

Bit 14 1 Use debugger specified in bit 15 and saveabend option specified in bit 13 regardless of program-file flag setting.

0 Use standard rules for debugger selection.Bit 15 1 Use Inspect.

0 Use Debug.

Guardian Programming Reference Summary for C—522630-0017-14

Page 159: Guardian Programming Ref for C

Functions Summary (O-Q)

return value:

PROCESS_GETINFO_ Obtains a limited set of information about a specified process.

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

0 = Debug request accepted. If the process to be debugged is not the calling process, the request might have been queued.

11 = Process does not exist.48 = Security violation.201 = Unable to communicate with the processor of the 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 *mom’s-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 *gmom’s-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-0017-15

Page 160: Guardian Programming Ref for C

Functions Summary (O-Q)

returned value:

proc-type

PROCESS_GETINFOLIST_ Obtains detailed information about a specified process or about a set of processes that meet specified criteria.

0 = Information is returned for the specified process.1 = File-system error; error-detail contains the error number.2 = 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.3 = 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.4 = Specified process does not exist.5 = Unable to communicate with processor.6 = Unable to communicate with system.

Bits 0-14 reservedBit 15 = 1

= 0Process is a Guardian process.Process is an OSS process.

#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-0017-16

Page 161: Guardian Programming Ref for C

Functions Summary (O-Q)

returned value:

srch-option

0 = Information is returned for the specified process or processes; error-detail contains the number of processes for which information has been returned (might be more than one process if in search mode).

1 = File-system error; error-detail contains the error number.2 = 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.3 = 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.4 = 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).

5 = Unable to communicate with cpu; cpu might not exist.6 = Unable to communicate with nodename.7 = No more matches exist; error-detail contains the number of processes

for which information has been returned (might be 0).8 = Reserved.9 = Invalid search attribute code; error-detail contains the code in question

(not an index into a list).10 = Invalid search value; error-detail contains the associated attribute code

(not an index into a list).11 = Invalid return attribute code; error-detail contains the code in question

(not an index into a list).12 = Invalid srch-option.

0 = Return information for only the process specified by [nodename,] cpu,pin or by processhandle.

1 = Start a search at [nodename,] cpu,pin and return information for the first matching process.

2 = Start a search at [nodename,] cpu,pin and return information for as many matching processes as will fit in ret-values-list.

3 = Return information for only the OSS process specified by [nodename,] oss-pid.

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

Guardian Programming Reference Summary for C—522630-0017-17

Page 162: Guardian Programming Ref for C

Functions Summary (O-Q)

Attribute Code Value Representation* 1 creator access ID short* 2 process access ID short3 maximum priority (search only) short* 4 program file short bytelength, char* 5 home terminal short bytelength, char* 6 gmom's process handle short (10 TNS words)* 7 jobid short8 process subtype short9 minimum priority (search only) short12 earliest creation time (search only) long long13 latest creation time (search only) long long14 lowered priority none (as a search attribute)

short (as a return attribute)15-29 (reserved for future use)* 30 process time long long31 wait state short32 process state short33 library file short bytelength, char* 34 swap file short bytelength, char35 context changes short36 DEFINE mode short37 licenses short38 PIN short* 39 file name short bytelength, char* 40 mom's process handle short (10 TNS words)41 process file security short42 current priority short43 initial priority short44 remote creator short45 logged-on state short46 extended data segment swap file short bytelength, char47 primary short48 process handle short (10 TNS words)

Guardian Programming Reference Summary for C—522630-0017-18

Page 163: Guardian Programming Ref for C

Functions Summary (O-Q)

Attribute Code Value Representation49 qualifier info available short50 Safeguard-authenticated logon short51 force low short53 creation timestamp long long54 current pages long55 messages sent long56 messages received long57 receive queue length short58 receive queue maximum length short59 page faults long62 named short65 mom’s file name short bytelength, char66 gmom’s file name short bytelength, char67 Safeguard-authenticated logoff state short68 inherited logon short69 stop on logoff short70 propagate logon short71 propagate stop-on-logoff short72 logon flags and states short73 applicable attributes short80 effective group ID long81 saved set-group-ID long82 login name short bytelength, char <= 32 chars83 group list short n, long [n]84 saved set-user-ID long* 90 OSS process ID (OSS process only) long91 OSS command (OSS process only) short bytelength, char <= 80 chars92 OSS arguments (OSS process only) short bytelength, char <= 80 chars93 OSS program pathname (OSS process

only)short bytelength, char <= 1024 chars

94 OSS parent process ID (OSS process only)

long

95 OSS elapsed time (OSS process only) long long96 OSS processor time (OSS process only) long long

Guardian Programming Reference Summary for C—522630-0017-19

Page 164: Guardian Programming Ref for C

Functions Summary (O-Q)

Attribute Code Value Representation97 OSS start time (OSS process only) long long98 OSS group leader process ID (OSS

process only)long

99 OSS process status (OSS process only) long100 process file segment (PFS) size long101 server class name short bytelength, char102 origin of main stack long103 current main stack size long104 maximum main stack size long105 origin of the privileged stack long106 current privileged stack size long107 maximum privileged stack size long108 start of global data long109 size of global data long110 start of native heap area long111 current size of native heap area long112 maximum size of native heap area long113 guaranteed swap space long115 TNS/R native shared run-time library:

buffer size required for attribute 116short

116 TNS/R native shared run-time library file-name information (in a variable-sized array)

short number of file names,short flagsshort file-name length,char file name

117 TNS/R native shared run-time library: buffer size required for attribute 118

short

118 TNS/R native shared run-time library name information (in a variable-sized array).

short number of file names,short flagsshort name length,char name

119 process is TNS/R native short

Guardian Programming Reference Summary for C—522630-0017-20

Page 165: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESS_GETPAIRINFO_ Obtains basic information about a named process or process pair.

returned value:

#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 */

0 = Information is returned for a process pair (not the calling process).1 = Reserved.2 = Parameter error; error-detail contains the number of the first parameter

found to be in error, where 1 designates the leftmost parameter. 3 = Bounds error; error-detail contains the number of the first parameter

found to be in error, where 1 designates the leftmost parameter. 4 = Information is returned for a single named process (can be the calling process).5 = Information is returned for a process pair where the caller is the current

primary.6 = Information is returned for a process pair where the caller is the current backup.7 = No information is returned; process is unnamed (can be the calling process).8 = No information is returned; search is complete.9 = Specified process does not exist.10 = Unable to communicate with the node where the process resides.11 = Process is an I/O process, but the option to allow I/O processes was not

selected.12 = 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-0017-21

Page 166: Guardian Programming Ref for C

Functions Summary (O-Q)

options

PROCESS_LAUNCH_Creates a new process and, optionally, assigns a number of process attributes.

PROCESS_SETINFO_ Alters a single nonstring attribute of a specified process and optionally returns the prior value of the attribute.

specifier

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

devices or volumes).

#include <cextdecs(PROCESS_LAUNCH_)>short PROCESS_LAUNCH_ ( void *param-list /* i */ ,[ short *error-detail ] /* o */ ,[ void *output-list ] /* o */ ,[ short maxlen ] /* i */ ,[ short *output-list-len ); /* o */

#include <cextdecs(PROCESS_SETINFO_)>short PROCESS_SETINFO_ ( [ short *processhandle ] /* i */ ,[ short specifier ] /* i */ ,short set-attr-code /* i */ ,[ short *set-value ] /* i */ ,[ short set-value-len ] /* i */ ,[ short *old-value ] /* o */ ,[ short old-value-maxlen ] /* i */ ,[ short *old-value-len ] ); /* o */

0 = Act upon the specified process only.1 = 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-0017-22

Page 167: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESS_SETSTRINGINFO_ Alters a single string-form attribute of a specified process, and optionally returns the prior value of the attribute.

specifier

Attribute Code Value Representation40 mom's process handle short (10 TNS words)* 41 process file security short42 priority short* 45 logged-on state short* 47 primary short* 49 qualifier info available short* 50 Safeguard-authenticated logon short* 69 stop on logoff short* 70 propagate logon short* 71 propagate stop-on-logoff short

#include <cextdecs(PROCESS_SETSTRINGINFO_)>short PROCESS_SETSTRINGINFO_ ([ short *processhandle ]/* i */ ,[ short specifier ] /* i */ ,short set-attr-code /* i */ ,const char *set-value /* i */ ,short length /* i */ ,[ char *old-value ] /* o */ ,[ short maxlen ] /* i */ ,[ short *old-value-len ] ); /* o */

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

process pair.

Guardian Programming Reference Summary for C—522630-0017-23

Page 168: Guardian Programming Ref for C

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.

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.

specifier

#include <cextdecs(PROCESS_SPAWN_)>short PROCESS_SPAWN_ ( [ char *oss-program-file ] /* i */ ,[ void *fdinfo ] /* i */ ,[ char *argv ] /* i */ ,[ char *envp ] /* i */ ,[ void *inheritance ] /* i */ ,[ long inheritance-length ] /* i */ ,[ void *process-extension ] /* i */ ,[ void *process-results ] /* i,o */ ,[ long nowait-tag ] /* i */ ,[ char *path ] ); /* i */

#include <cextdecs(PROCESS_STOP_)>short PROCESS_STOP_ ( [ short *processhandle ] /* i */ ,[ short specifier ] /* i */ ,[ short options ] /* i */ ,[ short completion-code ] /* i */ ,[ short termination-info ] /* i */ ,[ short *spi-ssid ] /* i */ ,[ const char *text ] /* i */ ,[ short length ] ); /* i */

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

otherwise, stop the specified process.2 = Stop the caller’s 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-0017-24

Page 169: Guardian Programming Ref for C

Functions Summary (O-Q)

options

PROCESS_SUSPEND_ Places a process or process pair into the suspended state.

returned value:

specifier

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.

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

#include <cextdecs(PROCESS_SUSPEND_)>short PROCESS_SUSPEND_ ( short *processhandle /* i */ ,[ short specifier ] );/* i */

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

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

Guardian Programming Reference Summary for C—522630-0017-25

Page 170: Guardian Programming Ref for C

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.

status

PROCESSHANDLE_DECOMPOSE_ Returns one or more parts of a process handle.

PROCESSHANDLE_GETMINE_ Obtains the caller’s process handle.

#include <cextdecs(PROCESSHANDLE_COMPARE_)>short PROCESSHANDLE_COMPARE_ (short *processhandle-1 /* i */ ,short *processhandle-2 );/* i */

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

#include <cextdecs(PROCESSHANDLE_DECOMPOSE_)>short PROCESSHANDLE_DECOMPOSE_ ( short *processhandle /* i */ ,[ short *cpu ] /* o */ ,[ short *pin ] /* o */ ,[ long *nodenumber ] /* o */ ,[ char *nodename ] /* o */ ,[ short maxlen ] /* i */ ,[ short *nodename-length ] /* o */ ,[ char *procname ] /* o */ ,[ short maxlen ] /* i */ ,[ short *procname-length ] /* o */ ,[ long long *sequence-number ] ); /* o */

#include <cextdecs(PROCESSHANDLE_GETMINE_)>short PROCESSHANDLE_GETMINE_ (short *processhandle ); /* o */

Guardian Programming Reference Summary for C—522630-0017-26

Page 171: Guardian Programming Ref for C

Functions Summary (O-Q)

return value:

PROCESSHANDLE_NULLIT_ Initializes a process handle to a null value.

return value:

PROCESSHANDLE_TO_CRTPID_ Converts a process handle to the corresponding process ID (CRTPID).

PROCESSHANDLE_TO_FILENAME_ Converts a process handle to a process file name.

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

#include <cextdecs(PROCESSHANDLE_NULLIT_)>short PROCESSHANDLE_NULLIT_ ( short *processhandle ); /* o */

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

#include <cextdecs(PROCESSHANDLE_TO_CRTPID_)>short PROCESSHANDLE_TO_CRTPID_ ( short *processhandle /* i */ ,short *process-id /* o */ ,[ short pair-flag ] /* i */ , long node-number ] ); /* i */

#include <cextdecs(PROCESSHANDLE_TO_FILENAME_)>short PROCESSHANDLE_TO_FILENAME_ ( short *processhandle /* i */ ,char *filename /* o */ ,short maxlen /* i */ ,short *filename-length /* o */ ,[ short options ] ); /* i */

Guardian Programming Reference Summary for C—522630-0017-27

Page 172: Guardian Programming Ref for C

Functions Summary (O-Q)

options

PROCESSHANDLE_TO_STRING_ Converts a process handle to the equivalent process string.

named-form

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.

Bits 0-14 Not currently used (specify 0).Bit 15 For named processes: if set, specifies that the sequence number not be

included in filename for a named process.

#include <cextdecs(PROCESSHANDLE_TO_STRING_)>short PROCESSHANDLE_TO_STRING_( short *processhandle /* i */ ,char *process-string /* o */ ,short maxlen /* i */ ,short *process-string-length /* o */ ,[ char *nodename ] /* i */ ,[ short length ] /* i */ ,[ short named-form ] ); /* i */

0 = Return process name if possible; if it is unavailable, return cpu,pin form. 1 = Return process name; if it is unavailable, report the error. 2 = Return cpu,pin form in all cases.

Guardian Programming Reference Summary for C—522630-0017-28

Page 173: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESSNAME_CREATE_ Returns a unique process name that is suitable for passing to the PROCESS_CREATE_ procedure.

returned value:

name-type

options

#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 */

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

0 = 4-character name1 = 5-character name (returns a 4-character name if nodename refers to a C-series

system)

Bits 0-14 Reserved; must be 0.Bit 15 0 = Include node name in the returned process name.

1 = Return the process name in local form.

Guardian Programming Reference Summary for C—522630-0017-29

Page 174: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESSOR_GETINFOLIST_ Obtains configuration information and statistics about a processor.

return value:

error-detail

#include <cextdecs(PROCESSOR_GETINFOLIST_)>short PROCESSOR_GETINFOLIST_ ([const char *nodename ] /* i */ ,[ short length ] /* i */ ,[ short cpu ] /* i */ ,short *ret-attr-list /* o */ ,short ret-attr-count /* i */ ,short *ret-values-list /* i */ ,short ret-values-maxlen /* i */ ,short *ret-values-len /* o */ ,[ short *error-detail ] ); /* o */

0 = Information is returned for the specified process.1 = 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.

2 = 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.

3 = 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.

4 = Reserved.5 = Unable to communicate with cpu. The cpu parameter might not exist.7 = An invalid return attribute code was supplied.8 = The specified node is running a C-series version of the operating system;

PROCESSOR_GETINFOLIST_ cannot obtain information from a C-series system.

Code Attribute Value Representation2 processor type short3 software version short4 page size long5 memory size long6 first virtual page long7 swappable pages long8 free pages long

Guardian Programming Reference Summary for C—522630-0017-30

Page 175: Guardian Programming Ref for C

Functions Summary (O-Q)

9 current locked memory long10 maximum locked memory long11 high locked memory long12 page faults long13 scans per memory manager call long14 memory clock cycles long15 memory pressure short16 memory queue length short17 local time offset long long18 elapsed time long long19 busy time long long20 idle time long long21 interrupt time long long22 processor queue length short23 dispatches long24 PCBs in low PINs short number of elements, short ARRAY25 PCBs in high PINs short number of elements, short ARRAY26 time list elements short number of elements, long ARRAY27 process time-list elements short number of elements, long ARRAY28 breakpoints short29 send busy long long35 T16 interrupt count short number of elements, long ARRAY36 disk cache hits long long37 disk I/Os long long38 processor queue state short, short, long long39 memory queue state short, short, long long40 sequenced sends long41 unsequenced sends long42 CME events long43 pages created long44 interpreter busy long long45 interpreter transitions long46 transactions long47 processor model short

Code Attribute Value Representation

Guardian Programming Reference Summary for C—522630-0017-31

Page 176: Guardian Programming Ref for C

Functions Summary (O-Q)

PROCESSOR_GETNAME_ Returns a processor’s type as a character string.

returned value:

48 processor name short bytelength, char49 processor full name short bytelength, char56 base time long long57 memory-management attributes long58 segments in use long59 maximum segments used long60 the update part of the release

ID (the two digits that follow the period)

short

61 for Compaq internal use only62 availability of IEEE floating

point on the current systemshort

Note. Calls to this procedure are identical in their format and values to calls to CPU_GETINFOLIST_.

#include <cextdecs(PROCESSOR_GETNAME_)>short PROCESSOR_GETNAME_ ( short cpu-number /* i */ ,char *name /* o */ ,short maxlen /* i */ ,short *namelen /* o */ ,[ short *cpu-type-out ] /* o */ ,[ const char *node-name ] /* i */ ,[ short length ] /* i */ ,[ long node-number ] /* i */ ,[ short cpu-type-in ] /* i */ ,[ short expand-name ] /* i */ ,[ short *cpu-model-out ] /* o */ ,[ short cpu-model-in ] ); /* i */

22 = Parameter or buffer out of bounds29 = Missing parameter201 = Unable to communicate over this path590 = Parameter value bad or inconsistent

Code Attribute Value Representation

Guardian Programming Reference Summary for C—522630-0017-32

Page 177: Guardian Programming Ref for C

Functions Summary (O-Q)

name:maxlen

PROCESSORSTATUS Obtains the number and the status of the processor modules in a system.

PROCESSORTYPEReturns the processor type of a specified system and processor.

type

processor type0 “NonStop 1+” (no longer supported)1 “NonStop II” (no longer supported)2 “TXP” (no longer supported)3 “VLX” (no longer supported)4 “CLX”5 “Cyclone”6 “NSR-L”7 “NSR-N,” “NSR-P,” or “NSR-K”8 “NSR-W”9 “NSR-G” or “NSR-T”

#include <cextdecs(PROCESSORSTATUS)>long PROCESSORSTATUS ();

#include <cextdecs(PROCESSORTYPE)>short PROCESSORTYPE ();

-2 = This feature is not supported for the system named in sysid.-1 = Unable to communicate with processor (either it does not exist or the network

is down).0 = Tandem NonStop 1+ processor (no longer supported).1 = Tandem NonStop II processor (no longer supported).2 = Tandem NonStop TXP processor (no longer supported).3 = Tandem NonStop VLX processor (no longer supported).4 = Tandem NonStop CLX processor.

Guardian Programming Reference Summary for C—522630-0017-33

Page 178: Guardian Programming Ref for C

Functions Summary (O-Q)

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.

stringtype

options

PROCESSTIME (superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Returns the process execution time of any process in the network.

5 = Tandem NonStop Cyclone processor.6 = Tandem NonStop NSR-L processor.7 = Tandem NonStop NSR-N, NSR-P, or NSR-K processor.8 = Tandem NonStop NSR-W processor.9 = Tandem NonStop NSR-G or NSR-T processor.

#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 */

0 = Asterisk form (that is, “*”)1 = Single processor form (for example, “2”)2 = Processor, PIN form (for example, “2,137”)3 = Name form (for example, “$PSRV”)

Bits 0-14 Reserved (specify 0).Bit 15 = 1 Device names (up to eight characters) are to be accepted in the input

string.= 0 Device names are not to be accepted in the input string.

Guardian Programming Reference Summary for C—522630-0017-34

Page 179: Guardian Programming Ref for C

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-0017-35

Page 180: Guardian Programming Ref for C

Functions Summary (O-Q)

PROGRAMFILENAME (superseded by PROCESS_GETINFO_ and PROCESS_GETINFOLIST_) Obtains the name of the calling process’s 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>) The data structures are invalid, or pool-block is not a block in the buffer pool.

_status_eq (<returned_value>) The operation is successful.

Guardian Programming Reference Summary for C—522630-0017-36

Page 181: Guardian Programming Ref for C

8 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

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 process’s data area.

Note. This procedure can be called only from TNS/R native processes.

#include <cextdecs(READ)>_cc_status READ ( short filenum /* i */ ,short _near *buffer /* o */ ,short read-count /* i */ ,[ short *count-read ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(READX)>_cc_status READX ( short filenum /* i */ ,char *buffer /* o */ ,short read-count /* i */ ,[ short _near *count-read ] /* o */ ,[ long tag ] ); /* i */

Guardian Programming Reference Summary for C—522630-0018-1

Page 182: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

return value:

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_lt (<returned_value>) 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.

_status_eq (<returned_value>) The READ[X] is successful._status_gt (<returned_value>) 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).

#include <cextdecs(READ_FILE )>short READ_FILE ( short _near *file-fcb /* i */ ,short _near *buffer /* o */ ,[ short _near *count-returned ] /* o */ ,[ short prompt-count ] /* i */ ,[ short max-read-count ] /* i */ ,[ short nowait ] ); /* i */

0 = No error.1 = End of file.6 = System message (only if user requested system messages through

SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGESMANY).111 = 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-0018-2

Page 183: Guardian Programming Ref for C

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_.

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(READEDIT)>short READEDIT ( short filenum /* i */ ,[ long *record-number ] /* i,o */ ,char *unpacked-line /* o */ ,short unpacked-limit /* i */ ,short *unpacked-length /* o */ ,[ reserved parameter ] ,short prompt-count /* i */ ,[ short spacefill ] /* i */ ,[ short full-length ] ); /* i */

#include <cextdecs(READEDITP)>short READEDITP ( short filenum /* i */ ,[ long *record-number ] /* i,o */ ,char *packed-line /* o */ ,short packed-limit /* i */ ,short *packed-length ); /* o */

Guardian Programming Reference Summary for C—522630-0018-3

Page 184: Guardian Programming Ref for C

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.

READUPDATE[X] Reads data from a disk or process file in anticipation of a subsequent write to the file.

#include <cextdecs(READLOCK)>_cc_status READLOCK ( short filenum /* i */ ,short _near *buffer /* o */ ,short read-count /* i */ ,[ short *count-read ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(READLOCKX)>_cc_status READLOCKX ( short filenum /* i */ ,char *buffer /* o */ ,short read-count /* i */ ,[ short _near *count-read ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The READLOCK[X] is successful._status_gt (<returned_value>) End of file (EOF). There are no more records

in this subset.

#include <cextdecs(READUPDATE)>_cc_status READUPDATE ( short filenum /* i */ ,short _near *buffer /* o */ ,short read-count /* i */ ,[ short _near *count-read ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(READUPDATEX)>_cc_status READUPDATEX ( short filenum /* i */ ,char *buffer /* o */ ,short read-count /* i */ ,[ short _near *count-read ] /* o */ ,[ long tag ] ); /* i */

Guardian Programming Reference Summary for C—522630-0018-4

Page 185: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

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.

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The READUPDATE[X] is successful._status_gt (<returned_value>) A system message is received through

$RECEIVE.

#include <cextdecs(READUPDATELOCK)>_cc_status READUPDATELOCK ( short filenum /* i */ ,short _near *buffer /* o */ ,short read-count /* i */ ,[ short *count-read ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(READUPDATELOCKX)>_cc_status READUPDATELOCKX ( short filenum /* i */ ,char *buffer /* o */ ,short read-count /* i */ ,[ short *count-read ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The READUPDATELOCK[X] is successful.

Guardian Programming Reference Summary for C—522630-0018-5

Page 186: Guardian Programming Ref for C

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.

return value:

Note. This procedure is declared only in the EXTDECS0 file.

#include <cextdecs(REFPARAM_BOUNDSCHECK_)>short REFPARAM_BOUNDSCHECK_ ( void _far *start-address/* i */ ,long area-len /* i */ ,void _far *framestart /* i */ ,short flags ) /* i */

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.

1 = The specified memory area is out of bounds. Accessing the area might cause an addressing trap or system-generated nondeferrable signal.

2 = 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.

3 = 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.

4 = 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.

5 = An absolute address was supplied in start-address for a TNS/R native process and flags.<14> was not set to allow this.

Guardian Programming Reference Summary for C—522630-0018-6

Page 187: Guardian Programming Ref for C

Functions Summary (R-Z)

flags

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.

REMOTETOSVERSION Provides an identifying letter and number indicating which version of the Guardian operating system is running on a remote system.

tos-version

Bits 0-13 Must be zero.Bit 14 = 0 Specifies that absolute addressing is not allowed for TNS/R native

processes.= 1 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.

Bit 15 = 0 Checks the area for read/write access.= 1 Checks the area for read-only access.

#include <cextdecs(REMOTEPROCESSORSTATUS)>long REMOTEPROCESSORSTATUS ( short sysnum ); /* i */

#include <cextdecs(REMOTETOSVERSION)>short REMOTETOSVERSION ( [ short sysid ] ); /* i */

Bits 0-7 The uppercase ASCII letter that indicates system level:A TOSB 1.0C 1.1D 1.1 and Expand

Guardian Programming Reference Summary for C—522630-0018-7

Page 188: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

E 1.1 and Expand and the TMF subsystemK Ann releasesL Bnn releasesM Cnn releasesN Dnn releasesP Fnn releasesQ Gnn releases

Bits 8-15 The revision number of the system in binary format

#include <cextdecs(REPLY)>_cc_status REPLY ( [ short _near *buffer ] /* i */ ,[ short write-count ] /* i */ ,[ short *count-written ] /* o */ ,[ short message-tag ] /* i */ ,[ short error-return ] ); /* i */

#include <cextdecs(REPLYX)>_cc_status REPLYX ( [ const char *buffer ] /* i */ ,[ short write-count ] /* i */ ,[ short _near *count-written ] /* o */ ,[ short message-tag ] /* i */ ,[ short error-return ] ); /* i */

Bits 0-7 The uppercase ASCII letter that indicates system level:

Guardian Programming Reference Summary for C—522630-0018-8

Page 189: Guardian Programming Ref for C

Functions Summary (R-Z)

error-return

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.)

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 pair’s file synchronization block.

_status_lt (<returned_value>) An error occurred (call FILE_GETINFO_ or FILEINFO).

_status_eq (<returned_value>) The REPLY[X] is successful._status_gt (<returned_value>) A warning occurred (call FILE_GETINFO_ or

FILEINFO).

File System Error Condition Code Setting0 CCE (no error)1-9 CCG (warning)10-32767 CCL (error)

#include <cextdecs(REPOSITION)>_cc_status REPOSITION ( short filenum /* i */ ,short _near *positioning-block ); /* i */

_status_lt (<returned_value>) An error occurred (call FILE_GETINFO_ or FILEINFO).

_status_eq (<returned_value>) REPOSITION is successful._status_gt (<returned_value>) The file is not a disk file.

#include <cextdecs(RESETSYNC)>_cc_status RESETSYNC ( short filenum ); /* i */

Guardian Programming Reference Summary for C—522630-0018-9

Page 190: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

returned value:

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.

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) RESETSYNC is successful._status_gt (<returned_value>) The file is not a disk file.

#include <cextdecs(RESIZEPOOL)>short RESIZEPOOL ( short *pool-head /* i,o */ ,long new-pool-size ); /* i */

_status_eq (<returned_value>) The pool was resized successfully; error contains 0.

_status_gt (<returned_value>) An error occurred; error contains the error value.

0 = Successful call; the size of the specified pool had been changed to new-pool-size.

12 = 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.

21 = An invalid new-pool-size was specified.22 = One of the parameters specifies an address that is out of bounds.29 = A required parameter was not supplied.59 = The pool is invalid and cannot be resized.

#include <cextdecs(RESIZESEGMENT)>short RESIZESEGMENT ( short segment-id /* i */ ,long new-segment-size ); /* i */

Guardian Programming Reference Summary for C—522630-0018-10

Page 191: Guardian Programming Ref for C

Functions Summary (R-Z)

returned value:

SAVEPOSITION (superseded by FILE_SAVEPOSITION_) Saves a disk file’s current file-positioning information. The information is returned to the file system in a call to REPOSITION.

_status_lt (<returned_value>) indicates resource allocation failure._status_eq (<returned_value>) indicates that the segment was resized

successfully; error contains 0._status_gt (<returned_value>) indicates that an error occurred; error

contains the error value (the specified extended segment was unaffected).

-2 = Unable to allocate segment space.-1 = Unable to allocate page table space. 0 = Successful call; the size of the specified extended segment has been changed to

new-segment-size. 2 = The seg-id parameter specified a nonexistent extended segment or the

extended segment is of a type that may not be resized (see Considerations).12 = The extended segment is a shared segment and cannot be reduced or the

segment is currently being resized.21 = An invalid new-segment-size was specified.24 = The seg-id parameter specified a privileged segment ID (greater than 2047)

and the caller was not privileged.29 = A required parameter was not supplied.43 = Disk space could not be allocated to accommodate the new-segment-size

specified.45 = The existing permanent swap file for the extended segment is not large enough

to back the requested new-segment-size.

#include <cextdecs(SAVEPOSITION)>_cc_status SAVEPOSITION ( short filenum /* i */ ,short _near *positioning-block /* o */ ,[ short _near *positioning-blksize ] ); /* o */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) SAVEPOSITION is successful._status_gt (<returned_value>) The file is not a disk file.

Guardian Programming Reference Summary for C—522630-0018-11

Page 192: Guardian Programming Ref for C

Functions Summary (R-Z)

SEGMENT_ALLOCATE_ Allocates an extended data segment for use by the calling process.

return value:

#include <cextdecs(SEGMENT_ALLOCATE_)>short SEGMENT_ALLOCATE_ ( short segment-id /* i */ ,[ long segment-size ] /* i */ ,[ char *filename ] /* i */ ,[ short length ] /* i */ ,[ short *error-detail ] /* o */ ,[ short pin ] /* i */ ,[ short segment-type ] /* i */ ,[ long *base-address ] /* o */ ,[ long max-size ] /* i */ ,[ short alloc-options ] );/* i */

0 = No error.1 = File-system error related to the creation or open of filename;.error-

detail contains the file-system error number.2 = 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.3 = 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.4 = Invalid segment-id.5 = Invalid segment-size.6 = Unable to allocate segment space.7 = Unable to allocate segment page table space.8 = Security violation when attempting to share segment.9 = The pin parameter does not exist.10 = The pin parameter does not have the segment allocated.11 = Caller is trying to share segment with self.12 = Requested shared segment is incompatible.13 = The segment-id parameter is already allocated by this process.14 = Unable to allocate process segment table (PST); error-detail contains the

file-system error number.15 = Part or all of the requested address range has already been allocated.

Guardian Programming Reference Summary for C—522630-0018-12

Page 193: Guardian Programming Ref for C

Functions Summary (R-Z)

alloc-options

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 Programmer’s Guide.

SEGMENT_DEALLOCATE_ Deallocates an extended data segment.

return value:

Bits 0-13 Reserved (specify 0)Bit 14 = 0 Allocate a selectable segment.

= 1 Allocate a flat segment. If not running on a system that supports flat segments allocate a selectable segment.

Bit 15 = 0 Return the base-address in the base address parameter.= 1 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).

#include <cextdecs(SEGMENT_DEALLOCATE_)>short SEGMENT_DEALLOCATE_ ( short segment-id /* i */ ,[ short flags ] /* i */ ,[ short *error-detail ] ); /* o */

0 = Segment successfully deallocated.1 = 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.2 = 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.3 = Bounds error.4 = Segment not deallocated; error-detail contains the reason for failure.

Guardian Programming Reference Summary for C—522630-0018-13

Page 194: Guardian Programming Ref for C

Functions Summary (R-Z)

flags

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 Programmer’s 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:

Bits 0-14 Reserved (specify 0)Bit 15 = 1 Dirty pages in memory are not to be written to the swap file.

= 0 Dirty pages in memory are to be written to the swap file.

0 = No error.1 = Error occurred when attempting to obtain filename; error-detail

contains the file-system error number.2 = 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.3 = 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.4 = The value of segment-id is out of range.5 = The value of segment-id is in range but not allocated by caller.6 = Information not obtained; error-detail contains the reason for failure.

segment-id inputsegment-size outputfilename:maxlen output:inputfilename-len outputerror-detail outputbase-address output

Guardian Programming Reference Summary for C—522630-0018-14

Page 195: Guardian Programming Ref for C

Functions Summary (R-Z)

SEGMENT_GETINFO_ Retrieves information about a currently allocated extended segment.

return value:

usage-flags

The bits, when set to 1, indicate the following:

#include <cextdecs(SEGMENT_GETINFO_)>short SEGMENT_GETINFO_ ( short segment-id /* i */ ,[ long *segment-size ] /* o */ ,[ char *filename ] /* o */ ,[ short maxlen ] /* i */ ,[ short *filename-len ] /* o */ ,[ short *error-detail ] /* o */ ,[ long *base-address ] /* o */ ,[ short *usage-flags ] );/* o */

0 = No error.1 = Error occurred when attempting to obtain filename; error-detail

contains the file-system error number.2 = 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.3 = 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.4 = The value of segment-id is out of range.5 = The value of segment-id is in range but not allocated by caller.

Bits 0-8 (Bits are reserved; 0 is returned)Bit 9 Segment is a flat segment.Bit 10 Segment is a resident cache segment.Bit 11 Segment is a shared segment.Bit 12 Segment is the currently in-use segment for the process.Bit 13 Segment is writeback-inhibit. Changes made to the segment are not written to

the swap files. Bit 14 Segment is extensible.Bit 15 Segment is resident.

Guardian Programming Reference Summary for C—522630-0018-15

Page 196: Guardian Programming Ref for C

Functions Summary (R-Z)

SEGMENT_USE_ Selects a particular extended data segment to be currently addressable by the calling process.

return value:

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.

#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 */

0 = No error.3 = 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.4 = The new-segment-id parameter is not allocated. 5 = The value of new-segment-id is out of range.

Guardian Programming Reference Summary for C—522630-0018-16

Page 197: Guardian Programming Ref for C

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:

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.

return value

Native C:#include <cextdecs(SET_FILE)>short SET_FILE ( short { *common-fcb } /* i */ { *file-fcb } /* i */ ,short operation /* i */ ,[ short new-value ] /* i */ ,[ short *old-value ] /* o */ ,[ short setaddr-value ] ); /* i */C:#include <cextdecs(SET_FILE)>short SET_FILE ( short { *common-fcb } /* i */ { *file-fcb } /* i */ ,short operation /* i */ ,[ short new-value ] /* i */ ,[ short *old-value ] ); /* o */

#include <setjmp.h> jmp_buf env;int setjmp ( jmp_buf env ); /* o */

0D = Indicates that the SETJMP_ procedure was called directly.<>0D = 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-0018-17

Page 198: Guardian Programming Ref for C

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.

SETMODE Sets device-dependent functions.

#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 process’s loop timer are unchanged.

_status_eq (<returned_value>) The new-time-limit value is set into the process’s loop timer and that loop timing is enabled.

#include <cextdecs(SETMODE)>_cc_status SETMODE ( short filenum /* i */ ,short function /* i */ ,[ short param1 /* i */ ,[ short param2 /* i */ ,[ short _near *last-params );/* o */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The SETMODE is successful._status_gt (<returned_value>) The SETMODE function is not allowed for

this device type.

Guardian Programming Reference Summary for C—522630-0018-18

Page 199: Guardian Programming Ref for C

Functions Summary (R-Z)

SETMODENOWAIT Sets device-dependent functions with the nowait option on nowait files.

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(SETMODENOWAIT)>_cc_status SETMODENOWAIT ( short filenum /* i */ ,short function /* i */ ,[ short param1 ] /* i */ ,[ short param2 ] /* i */ ,[ short _near *last-params ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The SETMODENOWAIT is successful._status_gt (<returned_value>) The SETMODENOWAIT function is not

allowed for this device type.

#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>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The SETPARAM is successful._status_gt (<returned_value>) The SETPARAM function is not allowed for

this device type.

Guardian Programming Reference Summary for C—522630-0018-19

Page 200: Guardian Programming Ref for C

Functions Summary (R-Z)

function

SETSTOP Indicates how a process may be stopped.

stop-mode

1 = Set or fetch a remote data terminal equipment address.2 = Set or fetch the clear cause or diagnostic bytes.3 = Set or fetch parameters for BREAK handling.4 = Set or fetch the reset cause or diagnostic bytes.5 = Fetch the restart cause or diagnostic bytes.6 = Set or fetch the 6520 and 6530 block-mode, terminal-error counters.7 = Set or override the closed user’s group (CUG) number to be used in the next

call-request packet.8 = Set or fetch the protocol ID field in the outgoing call-request packet.9 = Fetch the reason why circuit disconnected, and learn the current link status.20 = Reset and retrieve the called data-terminal equipment (DTE) address buffer.21 = Provide a count of the number of 64-byte segments that can be sent and

received by a subdevice.22 = Access the Level 4 ITI-protocol, block-mode timer.153 = Fetch the 4-byte SNA sense code and the 4-byte exception response

identification number (use only when SNAX exception response mode is enabled).

#include <cextdecs(SETSTOP)>short SETSTOP ( short stop-mode ); /* i */

0 = Stoppable by any process.1 = Stoppable only by the super ID (255,255), a process whose process access ID

equals this process’s creator access ID (CAID) or the CAID group manager, or a process whose process access ID equals this process’s process access ID (PAID) or the PAID group manager.

2 = Unstoppable by any other process; this mode is available to privileged users only.

Guardian Programming Reference Summary for C—522630-0018-20

Page 201: Guardian Programming Ref for C

Functions Summary (R-Z)

SETSYNCINFO (superseded by FILE_SETSYNCINFO_) Is used by the backup process of a process pair to pass the process pair’s latest synchronization block to the file system.

SETSYSTEMCLOCK Changes the system clock if you are a super-group user (255, n).

mode

#include <cextdecs(SETSYNCINFO)>_cc_status SETSYNCINFO ( short filenum /* i */ ,short _near *sync-block );/* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) SETSYNCINFO is successful._status_gt (<returned_value>) The file is not a disk file.

#include <cextdecs(SETSYSTEMCLOCK)>_cc_status SETSYSTEMCLOCK ( long long julian-gmt /* i */ ,short mode /* i */ ,short tuid ); /* i */

_status_lt (<returned_value>) Insufficient capability_status_eq (<returned_value>) SETSYSTEMCLOCK was successful._status_gt (<returned_value>) There is a mismatch with tuid; retry after

redetermining the relative error.

0 = Absolute GMT, the source is operator input.1 = Absolute GMT, the source is the hardware clock.2 = Relative GMT, the source is operator input.3 = Relative GMT, the source is the hardware clock.

Guardian Programming Reference Summary for C—522630-0018-21

Page 202: Guardian Programming Ref for C

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_

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 caller’s initial state of signal handling if default handling is not desired.

return value:

Note. This procedure can be called only from TNS/R native processes.

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 */

0D = Indicates a successful outcome.-1D = 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-0018-22

Page 203: Guardian Programming Ref for C

Functions Summary (R-Z)

SIGACTION_RESTORE_

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.

returned value:

SIGACTION_SUPPLANT_

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.

Note. This procedure can be called only from TNS/R native processes.

#include <tdmsig.h>int SIGACTION_RESTORE_ ( sig_save_template *signal-buffer ); /* i */

0D = Indicates a successful outcome.-1D = 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.

Note. This procedure can be called only from TNS/R native processes.

#include <tdmsig.h>int SIGACTION_SUPPLANT_ ( void (* handler) /* i */ ( int signum ,siginfo_t * ,void * ) ,sig_save_template *signal-buffer /* o */ ,short length ); /* i */

Guardian Programming Reference Summary for C—522630-0018-23

Page 204: Guardian Programming Ref for C

Functions Summary (R-Z)

returned value:

SIGADDSET_

SIGDELSET_

SIGEMPTYSET_

SIGFILLSET_

SIGISMEMBER_These procedure names are the pTAL names for the corresponding C functions:

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.

0D = Indicates a successful outcome.-1D = 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.

Procedure Name Corresponding C FunctionSIGADDSET_ sigaddset()SIGDELSET_ sigdelset()SIGEMPTYSET_ sigemptyset()SIGFILLSET_ sigfillset()SIGISMEMBER_ sigismember()

Note. These procedures can be called only from TNS/R native processes.

Guardian Programming Reference Summary for C—522630-0018-24

Page 205: Guardian Programming Ref for C

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_.

returned value:

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 <tdmsig.h>long sigjmp_maskset ( jmp_buf *env /* i,o */ ,sigset_t *signal-mask );/* i */

0D = Indicates a successful outcome.-1D = 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.

Note. This procedure can be called only from TNS/R native processes.

#include <setjmp.h> void siglongjmp ( sigjmp_buf env /* i */ ,int value ); /* i */

Guardian Programming Reference Summary for C—522630-0018-25

Page 206: Guardian Programming Ref for C

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.

SIGNALPROCESSTIMEOUT Sets a timer based on process execution time. When the time expires, the calling process receives a system message on $RECEIVE.

SIGNALTIMEOUT Sets a timer to a given number of units of elapsed time.

Note. This procedure can be called only from TNS/R native processes.

#include <cextdecs(SIGNALPROCESSTIMEOUT)>_cc_status SIGNALPROCESSTIMEOUT ( long timeout-value /* i */ ,[ short param1 ] /* i */ ,[ long param2 ] /* i */ ,[ short _near *tag ] ); /* o */

_status_lt (<returned_value>) SIGNALPROCESSTIMEOUT cannot allocate a time list element (TLE).

_status_eq (<returned_value>) SIGNALPROCESSTIMEOUT is successful._status_gt (<returned_value>) The given timeout value is illegal, or there is

a bounds error on tag.

#include <cextdecs(SIGNALTIMEOUT)>_cc_status SIGNALTIMEOUT ( long time-out-value /* i */ ,[ short param1 ] /* i */ ,[ long param2 ] /* i */ ,[ short _near *tag ] );/* o */

Guardian Programming Reference Summary for C—522630-0018-26

Page 207: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

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.

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.

_status_lt (<returned_value>) SIGNALTIMEOUT cannot allocate a time-list element (TLE).

_status_eq (<returned_value>) SIGNALTIMEOUT completed successfully._status_gt (<returned_value>) The given timeout value is illegal.

Note. This procedure can be called only from TNS/R native processes.

Note. This procedure can be called only from TNS/R native processes.

Note. This procedure can be called only from TNS/R native processes.

#include <setjmp.h> sigjmp_buf env;long sigsetjmp ( sigjmp_buf *env /* o */ ,int mask ); /* i */

Guardian Programming Reference Summary for C—522630-0018-27

Page 208: Guardian Programming Ref for C

Functions Summary (R-Z)

returned value:

mask

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.

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 process’s 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.

0D = Indicates that the SIGSETJMP_ procedure was called directly.<>0D = Indicates that SIGSETJMP_ is returning as a result of a call to the

SIGLONGJMP_ procedure. The returned value is specified by SIGLONGJMP_.

0D = Specifies that the current signal mask is not to be saved.<>0D = Specifies that the current signal mask is to be saved. This mask is

reinstated by a corresponding call to the SIGLONGJMP_ procedure.

Note. This procedure can be called only from TNS/R native processes.

Guardian Programming Reference Summary for C—522630-0018-28

Page 209: Guardian Programming Ref for C

Functions Summary (R-Z)

STRING_UPSHIFT_ Changes all the alphabetic characters in a string to uppercase.

return value:

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.

#include <cextdecs(STRING_UPSHIFT_)>short STRING_UPSHIFT_ ( char *in-string /* i */ ,short length /* i */ ,char *out-string /* o */ ,short maxlen ); /* i */

0 = Operation successful1 = Reserved2 = Parameter error3 = Bounds error4 = String too large to fit in out-string

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-0018-29

Page 210: Guardian Programming Ref for C

Functions Summary (R-Z)

SYSTEMENTRYPOINTLABEL Returns either the procedure label of the named entry point or a zero if no label is found.

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.

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.

TIME Provides the current date and time in integer form.

date-and-time

#include <cextdecs(SYSTEMENTRYPOINTLABEL)>short SYSTEMENTRYPOINTLABEL ( char *name /* i */ ,short len ); /* i */

#include <cextdecs(TAKE_BREAK)>short TAKE_BREAK ( short _near *file-fcb ); /* i */

#include <cextdecs(TEXTTOSSID)>short TEXTTOSSID ( char *chars /* i */ ,short *ssid /* o */ ,[ long *status ] ); /* o */

#include <cextdecs(TIME)>void TIME ( short _near *date-and-time ); /* o */

[0] = year (yyyy)[1] = month (1-12)[2] = day (1-31)[3] = hour (0-23)

Guardian Programming Reference Summary for C—522630-0018-30

Page 211: Guardian Programming Ref for C

Functions Summary (R-Z)

TIMESTAMP Provides the internal form of the processor interval clock where the application is running.

TOSVERSION Provides an identifying letter and number indicating which version of the Guardian operating system is running.

version

[4] = minute (0-59)[5] = second (0-59)[6] = 0.01 sec (0-99)

#include <cextdecs(TIMESTAMP)>void TIMESTAMP ( short _near *interval-clock ); /* o */

#include <cextdecs(TOSVERSION)>short TOSVERSION ();

Bits 0-7 An uppercase ASCII letter indicating the system level:A TOSB 1.0C 1.1D 1.1 + ExpandE 1.1 + Expand + the TMF subsystemK Ann releasesL Bnn releasesM Cnn releasesN Dnn releasesP Fnn releasesQ Gnn releases

Bits 8-15 The revision number of the system in binary format

Guardian Programming Reference Summary for C—522630-0018-31

Page 212: Guardian Programming Ref for C

Functions Summary (R-Z)

UNLOCKFILE Unlocks a disk file and any records in the file that are currently locked by the caller.

UNLOCKREC Unlocks a record currently locked by the caller.

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(UNLOCKFILE)>_cc_status UNLOCKFILE ( short filenum /* i */ ,long tag ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) UNLOCKFILE was successful._status_gt (<returned_value>) The file is not a disk file.

#include <cextdecs(UNLOCKREC)>_cc_status UNLOCKREC ( short filenum /* i */ ,long tag ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The UNLOCKREC is successful._status_gt (<returned_value>) The file is not a disk file.

#include <cextdecs(UNPACKEDIT)>void UNPACKEDIT ( const char *packed-line /* i */ ,short packed-length /* i */ ,char *unpacked-line /* o */ ,short unpacked-limit /* i */ ,short *unpacked-length /* o */ ,[ short spacefill ] /* i */ ,[ short full-length ] ); /* i */

Guardian Programming Reference Summary for C—522630-0018-32

Page 213: Guardian Programming Ref for C

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.

return value:

#include <cextdecs(USER_AUTHENTICATE_)>short USER_AUTHENTICATE_ ( char *inputtext /* i */ ,short inputtext-len /* i */ ,[ short options ] /* i */ ,[ long *dialog-id ] /* i */ ,[ short *status ] /* o */ ,[ short *status-flags ] /* o */ ,[ char *displaytext ] /* o */ ,[ short displaytext-maxlen ] /* i */ ,[ short *displaytext-len ] /* o */ ,[ short cmon-timeout ] /* i */ ,[ char *termname ] /* i */ ,[ short termname-len ] /* i */ ,[ char *volsubvol ] /* o */ ,[ short volsubvol-maxlen ] /* i */ ,[ short *volsubvol-len ] /* o */ ,[ char *initdir ] /* o */ ,[ short initdir-maxlen ] /* i */ ,[ short *initdir-len ] /* o */ ,[ char *initprog ] /* o */ ,[ short initprog-maxlen ] /* i */ ,[ short *initprog-len ] /* o */ ,[ short *initprog-type ] /* o */ ,[ long *last-logon-time ] /* o */ ,[ long *time-password-expires ] );/* o */

0 = No error. 13 = Invalid termname parameter. 22 = 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.

29 = Missing parameter. Either this procedure is called without specifying inputtext:inputtext-len, or a parameter required by another parameter is not specified.

48 = Security violation. The user specified in inputtext:inputtext-len is undefined, or an error occurred during a dialog with Safeguard.

Guardian Programming Reference Summary for C—522630-0018-33

Page 214: Guardian Programming Ref for C

Functions Summary (R-Z)

options

status

Values returned for error = 0:

Values returned for error = 48:

70 = Continue dialog. See the status parameter for detailed information on how to set the inputttext parameter in the next call to USER_AUTHENTICATE_.

160 = Invalid dialog-id parameter, invalid protocol, or dialog has exceeded two minutes.

563 = The text to be returned in the displaytext parameter is longer than the length specified by the displaytext-maxlen parameter.

Bits 0-7 Reserved (specify 0). Bit 8 Echo is disabled by the caller (with a SETMODE 20) for password input. Bit 9 Send $CMON the Prelogon^msg message (-59). Bit 10 Send $CMON the Logon^msg message (-50). Bit 11 Do not allow the super ID (255,255) to log on. Bit 12 Do not allow a logon with a Guardian user ID. Bit 13 Require blind logon. Bit 14 Do not log on if $CMON has an error or timeout. Bit 15 Log on and update the process's attributes to reflect the user's attributes.

status Description0 No status.8 Password is valid but it is about to expire. Caller should return caution

message.

status Description1 User does not exist or password is incorrect.2 Cannot authenticate with Guardian user ID because options bit 12 is set to 1.3 $CMON rejected logon.5 Authentication record frozen.6 Authentication record expired.10 Password expired: User cannot log on.13 Password change request: New password is too short. New password is

rejected.

Guardian Programming Reference Summary for C—522630-0018-34

Page 215: Guardian Programming Ref for C

Functions Summary (R-Z)

Values returned for error = 70:

status-flags

14 Password change request: New password is too long. New password is rejected.

15 Password change request: New password does not conform to password history (password cannot be reused). New password is rejected.

16 Password change request: New password does not conform to password quality. New password is rejected.

17 Password change request: New password contains blank characters. New password is rejected.

18 Password change request: New password is not verified. The first new password provided is not the same as the second new password provided.

19 Password change request: Change cannot be made during the allowed time period. Password change request is rejected.

20 Password change request: Change is denied due to a system error. Retry later.

21 Cannot authenticate the super ID because options bit 11 is set to 1.

status Description4 Caller should set inputtext to a password in the next call to

USER_AUTHENTICATE_ to either log on or begin a password change. 9 Caller should set inputtext to a password in the next call to

USER_AUTHENTICATE_ to change the password.11 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.

12 Caller should set inputtext to a new password in the next call to USER_AUTHENTICATE_ to verify the new password.

Bits 0-14 Reserved. Bit 15 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-0018-35

Page 216: Guardian Programming Ref for C

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.

error

default-security

#include <cextdecs(USER_GETINFO_)>short USER_GETINFO_ ( [ char *user-name ] /* i */ ,[ short user-maxlen ] /* o:i */ ,[ short *user-curlen ] /* i,o */ ,[ long *user-id ] /* i,o */ ,[ short *is-alias ] /* o */ ,[ short *group-count ] /* o */ ,[ long *group-list ] /* o */ ,[ long *primary-group ] /* o */ ,[ char *volsubvol ] /* o */ ,[ short volsubvol-maxlen ] /* i */ ,[ short *volsubvol-len ] /* o */ ,[ char *initdir ] /* o */ ,[ short initdir-maxlen ] /* i */ ,[ short *initdir-len ] /* o */ ,[ char *initprog ] /* o */ ,[ short initprog-maxlen ] /* i */ ,[ short *initprog-len ] /* o */ ,[ short *default-security ] );/* o */

0 No error. Default user information is returned as requested. 11 Record not in use. The specified group name or group ID is undefined. 22 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.

29 Missing parameter. This procedure was called without specifying a required parameter.

590 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.

Bit 0-3 reservedBits 4-6 read

Guardian Programming Reference Summary for C—522630-0018-36

Page 217: Guardian Programming Ref for C

Functions Summary (R-Z)

where the legitimate fields are encoded with numbers that represent the following information:

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.

error

Bits 7-9 writeBits 10-12 executeBits 13-15 purge

0 A (any local user)1 G (any local group member)2 O (only the local owner)3 not used4 N (any network user)5 C (any network group/community user)6 U (only the network owner)7 - (only the local super ID)

#include <cextdecs(USER_GETNEXT_)>short USER_GETNEXT_ ( [ char *user-name ] /* i */ ,[ short user-maxlen ] /* o:i */ ,[ short *user-curlen ] /* i,o */ ,[ short *is-alias ] ); /* i,o */

0 No error. 11 Record not in use. The specified user name is undefined. 22 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.

29 Missing parameter. This procedure was called without specifying all the parameters.

590 Bad parameter value. Either 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.

Guardian Programming Reference Summary for C—522630-0018-37

Page 218: Guardian Programming Ref for C

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.

USERNAMETOUSERID (superseded by USER_GETINFO_) Returns the user ID, from $SYSTEM.SYSTEM.USERID, that is associated with a designated user name.

#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.

_status_eq (<returned_value>) The designated user name returned._status_gt (<returned_value>) The specified user ID is undefined.

#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.

_status_eq (<returned_value>) The designated user ID returned._status_gt (<returned_value>) The specified user name is undefined.

Guardian Programming Reference Summary for C—522630-0018-38

Page 219: Guardian Programming Ref for C

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++ Programmer’s 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.

logon

default

#include <cextdecs(VERIFYUSER)>_cc_status VERIFYUSER ( short _near *user-name-or-id /* i */ ,[ short logon ] /* i */ ,[ short _near *default ] /* o */ ,short default-len ); /* 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).

_status_eq (<returned_value>) Indicates a successful verification or logon, or both.

_status_gt (<returned_value>) There is no such user, or the password is invalid.

0 Verify the user but do not log on.<> 0 Verify the user and log on.

[0:3] Group name, blank-filled[4:7] User name, blank-filled[8] Bits 0-7

Bits 8-15 Group IDUser ID

[9:12] Default volume, blank-filled

Guardian Programming Reference Summary for C—522630-0018-39

Page 220: Guardian Programming Ref for C

Functions Summary (R-Z)

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.

error

[13:16] Default subvolume, blank-filledDefault file security, as follows:

[17] Bits 0-15 Bits 0-3 Bits 4-6 Bits 7-9Bits 10-12 Bits 13-15

UnusedReadWriteExecutePurge

0 A (any local user)1 G (any local group member)2 O (only the local owner)3 Not used4 N (any network user)5 C (any network group/community user)6 U (only the network owner)7 - (only the local super ID (255, 255))

#include <cextdecs(WAIT_FILE)>short WAIT_FILE ( short _near *file-fcb /* i */ ,[ short _near *count-read ] /* o */ ,[ long time-limit ] ); /* i */

0 No error.1 End of file.6 System message (only if user requested system messages through

SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGESMANY).40 Operation timed out (only if time-limit is supplied and is not -1D).111 Operation aborts because of BREAK (if BREAK is enabled).532 Operation restarted.

Guardian Programming Reference Summary for C—522630-0018-40

Page 221: Guardian Programming Ref for C

Functions Summary (R-Z)

time-limit

WRITE[X] Writes data from an array in the application program to an open file.

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.

<> 0D Wait for completion.0D Check for completion.0D (and error = 40) No completion.1D Willing to wait forever.

#include <cextdecs(WRITE)>_cc_status WRITE ( short filenum /* i */ ,short _near *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(WRITEX)>_cc_status WRITEX ( short filenum /* i */ ,const char *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) The WRITE[X] is successful.

#include <cextdecs(WRITE_FILE)>short WRITE_FILE ( short _near *file-fcb /* i */ ,short _near *buffer /* i */ ,short write-count /* i */ ,[ short reply-error-code ] /* i */ ,[ short forms-control-code ] /* i */ ,[ short nowait ] ); /* i */

Guardian Programming Reference Summary for C—522630-0018-41

Page 222: Guardian Programming Ref for C

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_.

error

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(WRITEEDIT)>short WRITEEDIT ( short filenum /* i */ ,[ long record-number ] /* i */ ,char *unpacked-line /* i */ ,short unpacked-length /* i */ ,[ short full-length ] /* i */ ,[ long *new-record-number ] );/* o */

10 File already includes a line with the specified record number.21 Specified record is too long to fit into EDIT packed line format. (The maximum

is 255 bytes of packed text.)45 All of the file’s possible extents are allocated and full. You can use

EXTENDEDIT to increase the file’s extent size and call WRITEEDIT again.

>= 0 Specifies 1000 times the EDIT line number of the line to be written. -1 Specifies that the line is written at the beginning of the file.-2 Specifies that the line is written at the end of the file.-3 Specifies that the line is written to the line represented by the file’s current

record number.

#include <cextdecs(WRITEEDITP)>short WRITEEDITP ( short filenum /* i */ ,[ long record-number ] /* i */ ,const char *packed-line /* i */ ,short packed-length ); /* i */

Guardian Programming Reference Summary for C—522630-0018-42

Page 223: Guardian Programming Ref for C

Functions Summary (R-Z)

error

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.

10 File already includes a line with the specified record number.45 All of the file’s possible extents are allocated and full. You can use

EXTENDEDIT to increase the file’s extent size and call WRITEEDIT again.

>= 0 Specifies 1000 times the EDIT line number of the line to be written. -1 Specifies that the line is written at the beginning of the file.-2 Specifies that the line is written at the end of the file.-3 Specifies that the line is written to the line represented by the file’s current

record number.

#include <cextdecs(WRITEREAD)>_cc_status WRITEREAD ( short filenum /* i */ ,short _near *buffer /* i,o */ ,short write-count /* i */ ,short read-count /* i */ ,[ short *count-read ] /* i */ ,[ long tag ] ); /* i */

#include <cextdecs(WRITEREADX)>_cc_status WRITEREADX ( short filenum /* i */ ,char *buffer /* i,o */ ,short write-count /* i */ ,short read-count /* i */ ,[ short *count-read ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (Call FILEINFO)._status_eq (<returned_value>) The WRITEREAD[X] is successful._status_gt (<returned_value>) CTRL-Y is pressed on the terminal.

Guardian Programming Reference Summary for C—522630-0018-43

Page 224: Guardian Programming Ref for C

Functions Summary (R-Z)

WRITEUPDATE[X] Transfers data from an array in the application program to a file.

WRITEUPDATEUNLOCK[X] Performs random processing of records in a disk file. This procedure operates only on Guardian objects.

#include <cextdecs(WRITEUPDATE)>_cc_status WRITEUPDATE ( short filenum /* i */ ,short _near *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(WRITEUPDATEX)>_cc_status WRITEUPDATEX ( short filenum /* i */ ,const char *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) WRITEUPDATE[X] was successful.

#include <cextdecs(WRITEUPDATEUNLOCK)>_cc_status WRITEUPDATEUNLOCK ( short filenum /* i */ ,short _near *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

#include <cextdecs(WRITEUPDATEUNLOCKX)>_cc_status WRITEUPDATEUNLOCKX ( short filenum /* i */ ,const char *buffer /* i */ ,short write-count /* i */ ,[ short *count-written ] /* o */ ,[ long tag ] ); /* i */

Guardian Programming Reference Summary for C—522630-0018-44

Page 225: Guardian Programming Ref for C

Functions Summary (R-Z)

XBNDSTEST (superseded by REFPARAM_BOUNDSCHECK_) Checks stack limits and/or parameter addresses.

status

flags

_status_lt (<returned_value>) An error occurred (call FILEINFO)._status_eq (<returned_value>) WRITEUPDATEUNLOCK[X] was

successful.

#include <cextdecs(XBNDSTEST)>short XBNDSTEST ( char *param /* i */ ,short bytelen /* i */ ,short flags /* i */ ,long long constants );/* i */

1 In bounds, but in a read-only segment or (on TNS/R systems only) in the system library.

0 In bounds and writeable.-1 Out of bounds or illegal address.-2 Incorrectly aligned on word boundary.-3 Undefined flag value.-4 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).

Bits 0-12 Must be zero.Bit 13 Use the extended-address limits from constants.Bit 14 The parameter must be word-aligned.Bit 15 Skip the bounds test and return 0.

Guardian Programming Reference Summary for C—522630-0018-45

Page 226: Guardian Programming Ref for C

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.

status

flags

#include <cextdecs(XSTACKTEST)>short XSTACKTEST ( short _near *firstparam /* i */ ,short stackwords /* i */ ,short flags /* i */ ,long long *constants ); /* o */

0 Adequate stack space available.2 Undefined flags value.21 The value of stackwords is less than 1.22 Bounds error on firstparm or constants.632 Insufficient stack space available.

Bits 0-13 Must be zero.Bit 14 Allow parameters that use privileged addresses.Bit 15 Skip the stack test and return 0.

Guardian Programming Reference Summary for C—522630-0018-46

Page 227: Guardian Programming Ref for C

9 CONTROL OperationsFor additional information about the CONTROL procedure call, refer to the Guardian Procedure Calls Reference Manual.

Table 9-1. CONTROL Operation 1

Description Subtype Description of <param>

Terminal or Line Printer Forms Control

0,2, or 3 0

1–15

16–79

form feed (send %014)

vertical tab (send %013)

skip <param> - 16 lines

Line Printer 6 or 32 0

1–15

16–79

form feed (send %014)

single space (send %6412)

skip <param> - 16 lines

Line Printer 1 or 5 0 skip to VFU channel 0 (top of form)

1 skip to VFU channel 1 (bottom of form)

2 skip to VFU channel 2 (single space, top-of form eject)

3 skip to VFU channel 3 (next odd-numbered line)

4 skip to VFU channel

5 skip to VFU channel 5 (next one-half page)

6 skip to VFU channel 6 (next one-fourth page)

7 skip to VFU channel 7 (next one-sixth page)

8 skip to VFU channel 8 (user-defined)

9 skip to VFU channel 9 (user-defined)

10 skip to VFU channel 10 (user-defined)

11 skip to VFU channel 11 (user-defined)

16-31 16–31skip <param> - 16 lines

Line Printer 7 0 select VFC channel 1 (top of form)

1 select VFC channel 2 (bottom of form)

2 select VFC channel 3 (single space)

3 select VFC channel 4 (skip to next double space line)

4 select VFC channel 5 (skip to next triple space line)

5 select VFC channel 6 (skip to next half page)

6 select VFC channel 7 (skip to next one-fourth page)

7 select VFC channel 8 (skip to next one-sixth page)

8 select VFC channel 9 (bottom of form)

Guardian Programming Reference Summary for C—522630-0019-1

Page 228: Guardian Programming Ref for C

CONTROL Operations

Line Printer 7 9 select VFC channel 10 (bottom of form - 1)

10 select VFC channel 11 (top of form - 1)

11 select VFC channel 12 (top of form)

16-31 skip <param> - 16 lines

Line Printer(default DAVFU)

4 0 skip to VFU channel 0 (top of form/line 1)

1 skip to VFU channel 1 (bottom of form/line 60)

2 skip to VFU channel 2 (single space/line 1-60, top-of-form eject

3 skip to VFU channel 3 (next odd-numbered line)

4 skip to VFU channel 6 (next third line: 1,4,7,10, and so forth)

5 skip to VFU channel 5 (next one-half page)

6 skip to VFU channel 6 (next one-fourth page)

7 skip to VFU channel 7 (next one-sixth page)

8 skip to VFU channel 8 (line 1)

9 skip to VFU channel 9 (line 1)

10 skip to VFU channel 10 (line 1)

11 skip to VFU channel 11(bottom of paper/line 63)

16-31 skip <param> - 16 lines

Table 9-1. CONTROL Operation 1

Description Subtype Description of <param>

Guardian Programming Reference Summary for C—522630-0019-2

Page 229: Guardian Programming Ref for C

CONTROL Operations

Table 9-2. CONTROL Operations 2 - 27

Operation Description Description of <param>

2 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.

None

3 Magnetic tape, rewind and unload, do not wait for completion.

None

4 Magnetic tape, take off line, do not wait for completion (treated as operation 3 for 5106 Tri-Density Tape Drive).

Not supported for 5130, 5160, 5170, and 5180 tape drives.

None

5 Magnetic tape, rewind, leave on line, do not wait for completion.

None

6 Magnetic tape, rewind, leave on line, wait for completion.

None

7 Magnetic tape, space forward files. number of files {0:255}

8 Magnetic tape, space backward files. number of files {0:255}

9 Magnetic tape, space forward records. number of records {0:255}

10 Magnetic tape, space backward records. number of records {0:255}

11 Terminal or serial-connected line printer, wait for modem connect.

None

12 Terminal or serial-connected line printer, disconnect the modem (that is, hang up).

None

13 Issue an SNA CHASE request. SNAX exception response mode must be enabled to use operation 13.

None

17 Terminal or serial-connected line printer, enable connection and initiate call to remote DTE in X.25 network.

None

20 Disk, purge data. (Write access is required.) None

Guardian Programming Reference Summary for C—522630-0019-3

Page 230: Guardian Programming Ref for C

CONTROL Operations

21 Disk, allocate or deallocate extents. (Write access is required.)

0: deallocate all extents past the end-of-file extent

1: <maximum-extents> number of extents to allocate for a nonpartitional file (for DP2 disk files only)

1:16* number of partitionsnumber of extents to allocate for a partitioned file

22 Cancel an AM3270 I/O operation. None

24 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.

None

26 Requests immediate completion of all outstanding I/O requests without loss of data by the recipient of the CONTROL 26 request.

None

27 Wait for DP2 disk file write.

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 Programmer’s Guide.

Table 9-2. CONTROL Operations 2 - 27

Operation Description Description of <param>

Guardian Programming Reference Summary for C—522630-0019-4

Page 231: Guardian Programming Ref for C

10 SET^FILE OperationsFor additional information about the SET^FILE procedure call, refer to the Guardian Procedure Calls Reference Manual.

SET^FILE Operations That Set Values

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

ASSIGN^ BLOCK BUFLEN or ASSIGN^ BLOCK LENGTH

Specifies the block length, in bytes, for the file.

new-blocklen

blocklen Closed

ASSIGN^ FILECODE

Specifies the file code for the file.

new-file-code

file-code Closed

ASSIGN^ OPENACCESS

Specifies the open access for the file. The following literals are provided for open-access:

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.

new-open-access

open-access

Closed

ASSIGN^ OPEN EXCLUSION

Specifies the open exclusion for the file. The following literals are provided for open-exclusion:

SHARE(0)

EXCLUSIVE (1)

PROTECTED(3)

new-open-exclusion

open-exclusion

Closed

ASSIGN^ PRIEXTor ASSIGN^ PRIMARY EXTENTSIZE

Specifies the primary extent size (in units of 2048-byte blocks) for the file.

new-pri-ext-size

pri-ext-size

Closed

Guardian Programming Reference Summary for C—522630-00110-1

Page 232: Guardian Programming Ref for C

SET^FILE Operations

ASSIGN^ RECORDLENor ASSIGN^ RECORD LENGTH

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 Programmer’s Guide.

new-recordlen

recordlen Closed

ASSIGN^ SECEXTor ASSIGN^ SECONDARY EXTENTSIZE

Specifies the secondary extent size (in units of 2048-byte blocks) for the file.

new-sec-ext-size

sec-ext-size

Closed

INIT^FILEFCB 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);

must be omitted

must be omitted

Closed

INIT^FILEFCB^ D00

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);

must be omitted

must be omitted

Closed

SET^ABORT^ XFERERR

Sets or clears abort-on-transfer error for the file. If on, and a fatal error occurs during a data-transfer 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.

new-state state Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-2

Page 233: Guardian Programming Ref for C

SET^FILE Operations

SET^ BREAKHIT

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.

new-state state

SET^ CHECKSUM

Sets or clears the checksum word in the FCB. This is useful after modifying an FCB directly (that is, without using the SIO procedures).

new-checksum-word

fcb-checksum-word

SET^ COUNTXFERRED

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 count-transferred parameter value returned from AWAITIO.

new-count count Open

SET^CRLF^ BREAK

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.

new-state state Open

SET^ EDITREAD^ REPOSITION

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 Programmer’s Guide.

must be omitted

must be omitted

Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-3

Page 234: Guardian Programming Ref for C

SET^FILE Operations

SET^ERROR 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.

new-error error Open

SET^ PHYSIOOUT

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.

new-state state Open

SET^PRINT^ ERR^MSG

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.

new-state state Open

SET^PROMPT Sets interactive prompt for the file. See the OPEN^FILE procedure.

new-prompt-char

prompt-char

Open

SET^RCVEOF 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 read-only access, the setting defaults to on for return EOF.

new-state state Open

SET^RCV OPENCNT

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-receive-open-count

receive-open-count

Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-4

Page 235: Guardian Programming Ref for C

SET^FILE Operations

SET^ RCVUSER OPENREPLY

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.

new-state state Open

SET^READ^ TRIM

Sets or clears read-trailing-blank-trim for the file. If on, the count-read parameter does not account for trailing blanks.

new-state state Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-5

Page 236: Guardian Programming Ref for C

SET^FILE Operations

SET^SYSTEM MESSAGES

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 C-series 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-sys-msg-mask

sys-msg-mask

Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-6

Page 237: Guardian Programming Ref for C

SET^FILE Operations

SET^SYSTEM MESSAGES (continued)

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^SYSTEMMESSAGESMANY.

new-sys-msg-mask

sys-msg-mask

Open

SET^TRACE BACK

Sets or clears the traceback feature. When traceback is active, the SIO facility appends the caller's P-relative address to all error messages.

new-state old-state

SET^ USERFLAG

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.

new-user-flag

user-flag-in-fcb

Open

SET^ WRITE^ FOLD

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 record-length bytes; no error message or warning is given.

new-state state

SET^ WRITE^ PAD

Sets or clears write-blank-pad for the file. If on, write^file operations of less than record-length bytes, including the last record if WRITE^FOLD is in effect, are padded with trailing blanks to fill out the logical record.

new-state state Open

SET^ WRITE^ TRIM

Sets or clears write-trailing-blank-trim for the file. If on, trailing blanks are trimmed from the output record before being written to the line.

new-state state Open

<operation> Parameter(Required)

Description of Operation Requested

new-valueParameterEntered (Optional)

old-value ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-7

Page 238: Guardian Programming Ref for C

SET^FILE Operations

SET^FILE Operations That Set Addresses

<operation> Parameter(Required)

Description of Operation Requested

<new-value>ParameterEntered (Optional)

<old-value> ParameterEntered (Optional)

State of File

ASSIGN^ FILENAME

Specifies the physical name of the file to be opened. For example:

CALL SET^FILE (in^file, ASSIGN^FILENAME,@in^ filename);

@filename filenameFOR 12 (2-byte) words

Closed

ASSIGN^ LOGICAL 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] logical-filename

len is the length of the logical file name {0:7}.

@logical-filename

@logical-filenameFOR 4 (2-byte) words

Closed

SET^DUPFILE 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);

@new-dup-file-fcb

@dup-file-fcb

Open

SET^ ERRORFILE

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.

@new-error-file-fcb

@error-file-fcb

Guardian Programming Reference Summary for C—522630-00110-8

Page 239: Guardian Programming Ref for C

SET^FILE Operations

SET^ OPENERS PHANDLE

Sets the allowable opener’s 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.

@openers-process handle

@openers- process handle

FOR 10 words

Open

SET^OPENERS PID

Sets the allowable opener’s 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.

@openers-pid

openers-pid

FOR 4 words

Open

<operation> Parameter(Required)

Description of Operation Requested

<new-value>ParameterEntered (Optional)

<old-value> ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-9

Page 240: Guardian Programming Ref for C

SET^FILE Operations

SET^SYSTEM MESSAGES MANY

Sets system message reception for the $RECEIVE file. sys-msg-mask-words is a four-word mask. Setting a bit in sys-msg-mask-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.

@new-sys-msg-mask-word

sys-msg-mask-words

Open

SET^SYSTEM MESSAGES MANY(continued: word 0)

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

<operation> Parameter(Required)

Description of Operation Requested

<new-value>ParameterEntered (Optional)

<old-value> ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-10

Page 241: Guardian Programming Ref for C

SET^FILE Operations

SET^SYSTEM MESSAGES MANY(continued: word 1)

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

@new-sys-msg-mask-word

sys-msg-mask-words

Open

SET^SYSTEM MESSAGES MANY(continued: word 2)

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

<operation> Parameter(Required)

Description of Operation Requested

<new-value>ParameterEntered (Optional)

<old-value> ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-11

Page 242: Guardian Programming Ref for C

SET^FILE Operations

SET^SYSTEM MESSAGES MANY(continued: word 3)

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-sys-msg-mask-word

sys-msg-mask-words

Open

<operation> Parameter(Required)

Description of Operation Requested

<new-value>ParameterEntered (Optional)

<old-value> ParameterEntered (Optional)

State of File

Guardian Programming Reference Summary for C—522630-00110-12

Page 243: Guardian Programming Ref for C

11 SETMODE OperationsFor additional information about the SETMODE procedure call, refer to the Guardian Procedure Calls Reference Manual.

<function> Parameters and Effect

1 Disk: Set file securityparam1

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 writingBits 10-12 = ID allowed for executionBits 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 Programmer’s 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

param1Bits 0-7 = group IDBits 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-00111-1

Page 244: Guardian Programming Ref for C

SETMODE Operations

3 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.

4 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.

<function> Parameters and Effect

Guardian Programming Reference Summary for C—522630-00111-2

Page 245: Guardian Programming Ref for C

SETMODE Operations

5 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.

6 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.

7 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

8 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.

9 Terminal: Set interrupt characters

param1Bits 0-7 = character 1Bits 8-15 = character 2

param2Bits 0-7 = character 3Bits 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 Programmer’s Guide.

<function> Parameters and Effect

Guardian Programming Reference Summary for C—522630-00111-3

Page 246: Guardian Programming Ref for C

SETMODE Operations

10 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.

11 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 Programmer’s Guide.

12 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 Programmer’s Guide.

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).

14 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.

15 Terminal: Set retry parameters

16 Terminal: Set line parameters

<function> Parameters and Effect

Guardian Programming Reference Summary for C—522630-00111-4

Page 247: Guardian Programming Ref for C

SETMODE Operations

SETMODEs 15, 16, 17, 18 and 19 are described in the EnvoyACP/XF Reference Manual.

17 Terminal: Set maximum frame size and secondary addresses

18 Terminal: Set statistics threshold, flag fill, and window size

19 Terminal: Set transaction parameters and set extended control field size

20 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.

<function> Parameters and Effect

Guardian Programming Reference Summary for C—522630-00111-5

Page 248: Guardian Programming Ref for C

SETMODE Operations

22 Line printer (subtype 3, 4, 6, and 32) or terminal: Set baud rate

param1 =

0 baud rate = 501 baud rate = 752 baud rate = 1103 baud rate = 134.54 baud rate = 1505 baud rate = 3006 baud rate = 6007 baud rate = 12008 baud rate = 18009 baud rate = 200010 baud rate = 240011 baud rate = 360012 baud rate = 480013 baud rate = 720014 baud rate = 960015 baud rate = 1920016 baud rate = 20017 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-00111-6

Page 249: Guardian Programming Ref for C

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 = 50129 TX baud rate = 75130 TX baud rate = 110131 TX baud rate = 134.5132 TX baud rate = 150133 TX baud rate = 300134 TX baud rate = 600135 TX baud rate = 1200136 TX baud rate = 1800137 TX baud rate = 2000138 TX baud rate = 2400140 TX baud rate = 4800141 TX baud rate = 7200142 TX baud rate = 9600143 TX baud rate = 19200144 TX baud rate = 200

param2 =

0 RX baud rate = 501 RX baud rate = 752 RX baud rate = 1103 RX baud rate = 134.54 RX baud rate = 1505 RX baud rate = 3006 RX baud rate = 6007 RX baud rate = 12008 RX baud rate = 18009 RX baud rate = 200010 RX baud rate = 240012 RX baud rate = 480013 RX baud rate = 720014 RX baud rate = 960015 RX baud rate = 1920016 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-7param1 value (TX)bits 8-15 param2 value (RX)last-params[1]undefined

23 Terminal: Set character size

param1 =

0 character size = 5 bits1 character size = 6 bits2 character size = 7 bits3 character size = 8 bits

Theparam2 parameter is not used with function 23.

Guardian Programming Reference Summary for C—522630-00111-7

Page 250: Guardian Programming Ref for C

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.

25 Line printer (subtype 3): Set form length

param1 = length of form in linesTheparam2 parameter is not used with function 25.

26 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.

27 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.

28 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:

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-00111-8

Page 251: Guardian Programming Ref for C

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).

30 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.

31 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.

32 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)

Guardian Programming Reference Summary for C—522630-00111-9

Page 252: Guardian Programming Ref for C

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)

36 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.

37 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:

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-00111-10

Page 253: Guardian Programming Ref for C

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-00111-11

Page 254: Guardian Programming Ref for C

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 outE03 03 Cover openE06 06 End of ribbonE07 07 BreakE11 11 Parity errorE12 12 Unprintable characterE22 22 Carrier lossE23 23 Buffer overflowE30 30 Printwheel motor faultE31 31 Carriage faultE32 32 Software faultE34 34 Hardware fault

Guardian Programming Reference Summary for C—522630-00111-12

Page 255: Guardian Programming Ref for C

SETMODE Operations

SETMODEs 40-49 are reserved for the Exchange products. Refer to the Exchange reference manuals for details.

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.

Guardian Programming Reference Summary for C—522630-00111-13

Page 256: Guardian Programming Ref for C

SETMODE Operations

50 Enable/disable 3270 COPY

param1

= 0 suppress COPY= 1 allow COPY

51 Get/set 3270 status

param1 status flags mask to setTheparam2 parameter is not used with function 51.

Refer to the Device-Specific Access Methods–AM3270/TR3271 manual for the flags mask information.

52 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:

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

54 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 = 0Bits 8-15 = subdevice number known by AM3270

[1]

Bits 0-7 = standard 3270 control-unit addressBits 8-15 = standard 3270 device address

Guardian Programming Reference Summary for C—522630-00111-14

Page 257: Guardian Programming Ref for C

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.

59 Return count of bytes read

param1 = count of actual bytes readparam2 = 0

66 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.

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.

68 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.

71 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.

Guardian Programming Reference Summary for C—522630-00111-15

Page 258: Guardian Programming Ref for C

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.

80 ($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.

90 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, file-system error 2 occurs.

Guardian Programming Reference Summary for C—522630-00111-16

Page 259: Guardian Programming Ref for C

SETMODE Operations

91 Disk: Set cache and sequential option (function 91 is not applicable for alternate-key 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 key-sequenced structure when multiple sequential records are inserted.

92 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, file-system error 2 occurs.

93 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, file-system error 2 occurs.

94 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

Guardian Programming Reference Summary for C—522630-00111-17

Page 260: Guardian Programming Ref for C

SETMODE Operations

SETMODEs 100-109 are reserved for customer use.

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 disk1 = broken file flag on, indicating some part of file is bad, possibly due to failed write of a dirty cache block

97 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.

99 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.

Guardian Programming Reference Summary for C—522630-00111-18

Page 261: Guardian Programming Ref for C

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

113 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

115 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.

116 Terminal: Establish extended address field for ADCCP (ABM only) combined stations.

See the Envoy ACP/XF Reference Manual.

Guardian Programming Reference Summary for C—522630-00111-19

Page 262: Guardian Programming Ref for C

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.

119 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.

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.

123 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.

Guardian Programming Reference Summary for C—522630-00111-20

Page 263: Guardian Programming Ref for C

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-00111-21

Page 264: Guardian Programming Ref for C

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-00111-22

Page 265: Guardian Programming Ref for C

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.

142 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:

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-00111-23

Page 266: Guardian Programming Ref for C

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-32772=not 3277 or 32763=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 DBCS2=IBMKANJI3=IBMMIXED5=JEFKANJI

146 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.

149 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 key-sequenced file using the generic locks feature, the lock established by automatic locking might not be released automatically at the end of the write processing.

Guardian Programming Reference Summary for C—522630-00111-24

Page 267: Guardian Programming Ref for C

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.

153 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:

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-00111-25

Page 268: Guardian Programming Ref for C

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-00111-26

Page 269: Guardian Programming Ref for C

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.

165 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.

Guardian Programming Reference Summary for C—522630-00111-27

Page 270: Guardian Programming Ref for C

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 Programmer’s Guide.

Guardian Programming Reference Summary for C—522630-00111-28

Page 271: Guardian Programming Ref for C

12 Completion CodesFor a more detailed description of the completion codes, refer to the Guardian Procedure Calls Reference Manual.

The following completion codes are reserved for Tandem use:

CompletionCode Definition

0 Normal, voluntary termination with no errors.

1 Normal, voluntary termination with WARNING diagnostics.

2 Abnormal, voluntary termination with FATAL errors or diagnostics.

3 Abnormal, voluntary, but premature termination with FATAL errors or diagnostics.

4 A process associated with a RUN statement never started.

5 Process calls PROCESS_STOP_ (with abnormal termination specified) or ABEND on itself.

6 PROCESS_STOP_, STOP, or ABEND was called to delete a process by an external, but authorized, process.

7 Restart this job.

8 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.

9 A OSS kill() or raise() function generated a signal that stopped the process.

Completion Code Definition

-1 A trap was detected.

-2 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.

-3 This code is returned by the system when a process terminating itself passed bad parameters to PROCESS_STOP_, STOP, or ABEND.

-4 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).

-5 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.

-6 An OSS process terminated when it caused a hardware exception.

Guardian Programming Reference Summary for C—522630-00112-1

Page 272: Guardian Programming Ref for C

Completion Codes

-7 An OSS process terminated as a result of a corrupted stack frame or register state.

-8 An OSS process terminated because of insufficient user stack space for signal recovery.

-9 An OSS process terminated because of insufficient PRIV stack space for signal recovery.

-10 An OSS process terminated because it was unable to obtain resources for signal delivery.

-11 An OSS process terminated because it attempted to resume from a nonresumable signal.

-12 One of the functions in the OSS exec or tdm_exec sets of functions executed successfully.

-13 The OSS open() or dup() function performed by the PROCESS_SPAWN_ procedure failed.

Completion Code Definition

Guardian Programming Reference Summary for C—522630-00112-2

Page 273: Guardian Programming Ref for C

13 TrapsFor a more detailed description of the traps, refer to the Guardian Procedure Errors and Messages Manual.

Trap Number Signal Name Trap Description

0 (%0) SIGSEGV Illegal address reference

1 (%1) SIGILL Instruction failure

2 (%2) SIGFPE Arithmetic overflow

3 (%3) SIGSTK Stack overflow

4 (%4) SIGTIMEOUT Process loop-timer timeout

5 (%5) SIGLIMIT Call from process with PIN greater than 255

11 (%13) SIGMEMMGR Memory manager read error

12 (%14) SIGNOMEM No memory available

13 (%15) SIGMEMERR Uncorrectable memory error

Guardian Programming Reference Summary for C—522630-00113-1

Page 274: Guardian Programming Ref for C

Traps

Guardian Programming Reference Summary for C—522630-00113-2

Page 275: Guardian Programming Ref for C

14 Interprocess MessagesInterprocess Command Interpreter Messages

For a complete description of the command interpreter interprocess messages, refer to the Guardian Programmer’s 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; /* always -1 */

struct { short volume[ 4 ]; short subVolume[ 4 ]; } defaults;

struct { short volume[ 4 ]; short subVolume[ 4 ]; short fileName[ 4 ]; } infile, outfile;

char param[1]; /* parameter string for */ /* the run command up to */ /* 530 */

} CIStartup;

Guardian Programming Reference Summary for C—522630-00114-1

Page 276: Guardian Programming Ref for C

Interprocess Messages

-2 ASSIGN

typedef struct CIAssign {

short messageCode; /* always -2 */

struct { char programNameLength; char programName[ 31 ]; /* blank-filled */ char fileNameLength; char fileName[ 31 ]; /* blank-filled */

} logicalUnit;

unsigned fileNameSpecified : 1; unsigned priExtSizeSpecified : 1; unsigned secExtSizeSpecified : 1; unsigned fileCodeSpecified : 1; unsigned exclusionSpecified : 1; unsigned accessSpecified : 1; unsigned recordSizeSpecified : 1; unsigned blockSizeSpecified : 1; unsigned filler1 : 8; unsigned filler2 : 16;

struct { short volume[ 4 ]; short subVolume[ 4 ]; } physicalUnit;

short priExtSize; short secExtSize; short fileCode; short exclusion; short access; short recordSize; short blockSize;

} CIAssign;

Guardian Programming Reference Summary for C—522630-00114-2

Page 277: Guardian Programming Ref for C

Interprocess Messages

-3 PARAM

The field “parameters” in the above message format is composed of “numparams” records of the following form (offsets are given in bytes):

-20 WAKEUP

-21 DISPLAY

typedef struct CIParam {

short messageCode; /* always -3 */ short numParams; /* number of parameters */ char params [1024];

} CIParam;

param [0] = length n, in bytes, of parameter-name

param [1] for n = parameter-name

param [n+1] = length v, in bytes, of parameter-value

param [n+2] for v = parameter-value

typedef struct CIWakeup {

short messageCode; /* always -20 */

} CIWakeup;

typedef struct CIDisplay {

short messageCode; /* always -21 */ char text [132]; /* n <= 132 */

} CIDisplay;

Guardian Programming Reference Summary for C—522630-00114-3

Page 278: Guardian Programming Ref for C

Interprocess Messages

-50 LOGON

-51 LOGOFF

-52 RUN

typedef struct CILogon {

short messageCode; /* always -50 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12];

} CILogon;

typedef struct CILogoff {

short messageCode; /* always -51 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12];

} CILogoff;

typedef struct CIRun {

short messageCode; /* always -52 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short progFileName [12]; short PRIParameter; short CPUParameter; short INParamFileName [12]; short OUTParamFileName [12]; short LIBParamFileName [12]; short SWAPParamFileName [12];

} CIRun;

Guardian Programming Reference Summary for C—522630-00114-4

Page 279: Guardian Programming Ref for C

Interprocess Messages

-53 ILLEGAL LOGON

-54 ADD USER

-55 DELETE USER

typedef struct CIIllegalLogon {

short messageCode; /* always -53 */ short userIllegalLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; char illegalLogonString[132]; /* n <= 132 bytes */

} CIIllegalLogon;

typedef struct CIAddUser {

short messageCode; /* always -54 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short newUserGroupName [4]; short newUserName [4]; short newUserGroupNum; short newUserNum;

} CIAddUser;

typedef struct CIDeleteUser {

short messageCode; /* always -55 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short delGroupName [4]; short delUserName [4];

} CIDeleteUser;

Guardian Programming Reference Summary for C—522630-00114-5

Page 280: Guardian Programming Ref for C

Interprocess Messages

-56 ALTER PRIORITY

-57 PASSWORD

-58 REMOTE PASSWORD

typedef struct CIAlterPriority {

short messageCode; /* always -56 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short processID [4]; /* ID of process to be */ /* altered */ short fileName [12]; /* file name of process */ /* to be altered */ short priority; /* the new priority */ short phandle; /* process handle of */ /* process to be altered */} CIAlterPriority;

typedef struct CIPassword {

short messageCode; /* always -57 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12];

} CIPassword;

typedef struct CIRemotePassword {

short messageCode; /* always -58 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short systemPassword;

} CIRemotePassword;

Guardian Programming Reference Summary for C—522630-00114-6

Page 281: Guardian Programming Ref for C

Interprocess Messages

-59 PRELOGON

-60 CONFIGURATION

typedef struct CIPrelogon {

short messageCode; /* always -59 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12]; short TACLLoggedOn; short attemptedUserID;

} CIPrelogon;

Note. Logon message sent to $CMON before VERIFYUSER or USER_AUTHENTICATE_ is performed.

typedef struct CIConfig {

short messageCode; /* always -60 */ short userLogonID; short TACLExecPriority; short TACLInputFile [12]; short TACLOutputFile [12];

} CIConfig;

Guardian Programming Reference Summary for C—522630-00114-7

Page 282: Guardian Programming Ref for C

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:

-3 CPU UP

-5 PROCESS DELETION (STOP)

There are two forms of the STOP message:

Word Description

sysmsg[0] -2

sysmsg[1] for 4 processor number

Word Description

sysmsg[0] -3

sysmsg[1] for 4 processor number

Word Description

sysmsg[0] -5

sysmsg[1] for 4 Process ID of deleted process

sysmsg[5] Header length (header ends at sysmsg[19])

sysmsg[6] for 4 Process processor time in microseconds (a FIXED value)

sysmsg[10] Job ID; 0 if process has no GMOM

sysmsg[11] Completion code

sysmsg[12] Termination information; 0 if user did not supply information

sysmsg[13] for 4 SPI subsystem organization name

sysmsg[17] SPI subsystem number

sysmsg[18] SPI subsystem version

sysmsg[19] Length of text in bytes

sysmsg[20] for n Text of length sysmsg[19] (80 byte maximum)

Guardian Programming Reference Summary for C—522630-00114-8

Page 283: Guardian Programming Ref for C

Interprocess Messages

If an external process caused the termination, the message is changed as follows:

Word Description

sysmsg[0] -5

sysmsg[1] for 3 Name of the deleted process

sysmsg[4] -1

sysmsg[5] Header length (header ends at sysmsg[19])

sysmsg[6] for 4 Process processor time in microseconds (a FIXED value)

sysmsg[10] Job ID; 0 if the process has no GMOM

sysmsg[11] Completion code

sysmsg[12] Termination information; 0 if user did not supply information

sysmsg[13] for 4 SPI subsystem organization name

sysmsg[17] SPI subsystem number

sysmsg[18] SPI subsystem version

sysmsg[19] Length of text in bytes

sysmsg[20] for n Text of length sysmsg[19] (80 byte maximum)

Word Description

sysmsg[11] Completion code defaults to 6

sysmsg[12] Creator access ID

sysmsg[13] for 4 Process ID of the process that caused the termination

Guardian Programming Reference Summary for C—522630-00114-9

Page 284: Guardian Programming Ref for C

Interprocess Messages

-6 PROCESS DELETION (ABEND)

There are two forms of the ABEND message:

If an external process caused the termination, the message is changed as follows:

Word Description

sysmsg[0] -6

sysmsg[1] for 4 Process ID of deleted process

sysmsg[5] Header length (header ends at sysmsg[19])

sysmsg[6] for 4 Process processor time in microseconds (a FIXED value)

sysmsg[10] Job ID; 0 if process has no GMOM

sysmsg[11] Completion code

sysmsg[12] Termination information; 0 if user did not supply information

sysmsg[13] for 4 SPI subsystem organization name

sysmsg[17] SPI subsystem number

sysmsg[18] SPI subsystem version

sysmsg[19] Length of text in bytes

sysmsg[20] for n Text of length sysmsg[19] (80 byte maximum)

Word Description

sysmsg[0] -6

sysmsg[1] for 3 $process-name of the deleted process

sysmsg[4] -1

sysmsg[5] Header length (header ends at sysmsg[19])

sysmsg[6] for 4 Process processor time in microseconds (a FIXED value)

sysmsg[10] Job ID; 0 if process has no GMOM

sysmsg[11] Completion code

sysmsg[12] Termination information; 0 if user did not supply information

sysmsg[13] for 4 SPI subsystem organization name

sysmsg[17] SPI subsystem number

sysmsg[18] SPI subsystem version

sysmsg[19] Length of text in bytes

sysmsg[20] for n Text of length sysmsg[19] (80 byte maximum)

Guardian Programming Reference Summary for C—522630-00114-10

Page 285: Guardian Programming Ref for C

Interprocess Messages

If a trap is encountered, the message is changed as follows:

TRAP NO=nn, S=nnnnnn, CS=nn, P=nnnnnn, ENV=nnnnnn, L=nnnnnn, OCT P=nnnnnnnn

-8 CHANGE IN STATUS OF NETWORK NODE

-9 JOB PROCESS CREATION

Word Description

sysmsg[11] Completion code defaults to 6

sysmsg[12] Creator access ID

sysmsg[13] for 4 Process ID of the process that caused the termination

Word Description

sysmsg[11] Completion code is -1

sysmsg[12] Termination information is 0

sysmsg[13] for 4 SPI subsystem organization name is blanks

sysmsg[17] SPI subsystem number is 0

sysmsg[18] SPI subsystem version is 0

sysmsg[19] Length of text in bytes

sysmsg[20] for n Text of length sysmsg[19] (maximum 76 bytes). Text follows:

Word Description

sysmsg[0] -8

sysmsg[1] Bits 0-7 System numberBits 8-15 Number of processors

sysmsg[2] Current processor-status bit mask

sysmsg[3] Previous processor-status bit mask

Word Description

sysmsg[0] -9

sysmsg[1] for 4 Job ID

sysmsg[5] Process ID

Guardian Programming Reference Summary for C—522630-00114-11

Page 286: Guardian Programming Ref for C

Interprocess Messages

-10 SETTIME

-11 POWER ON

-12 NEWPROCESSNOWAIT COMPLETION

-13 SYSTEM MESSAGE BUFFER OVERRUN

Word Description

sysmsg[0] -10

sysmsg[1] processor number

sysmsg[2] for 4 Signed change in microseconds (FIXED integer)

sysmsg[6] 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)

Word Description

sysmsg[0] -11

sysmsg[1] processor number

Word Description

sysmsg[0] -12

sysmsg[1] Bits 0-7, NEWPROCESS error; refer to “NEWPROCESS and NEWPROCESSNOWAIT Error Codes” for more informationBits 8-15, NEWPROCESS error or file-system error number

sysmsg[2] for 2 Tag passed to NEWPROCESSNOWAIT in filenames [36:37]

sysmsg[4] for 4 Process ID of the new process

sysmsg[8] NEWPROCESS error number

sysmsg[9] NEWPROCESS suberror number or file-system error number

Word Description

sysmsg[0] -13

Guardian Programming Reference Summary for C—522630-00114-12

Page 287: Guardian Programming Ref for C

Interprocess Messages

-20 BREAK ON DEVICE

-21 3270 DEVICE STATUS RECEIVED

-22 ELAPSED TIME TIMEOUT

-23 MEMORY LOCK COMPLETION

Word Description

sysmsg[0] -20

sysmsg[1] Logical device number, in binary, of device where BREAK was pressed. If a process called SENDBREAKMESSAGE, this field contains -1.

sysmsg[2] System number, in binary, of logical device number or SENDBREAKMESSAGE caller.

sysmsg[3] Most significant word of break tag.

sysmsg[4] Least significant word of break tag.

Word Description

sysmsg[0] -21

sysmsg[1] Response ID

sysmsg[2] Actual TR3271 status bytes, in which the sense byte is bits 0-7 and the status byte is bits 8-15

sysmsg[3] 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.

Word Description

sysmsg[0] -22

sysmsg[1] Parameter 1 supplied to SIGNALTIMEOUT (0 if none)

sysmsg[2] for 2 Parameter 2 supplied to SIGNALTIMEOUT (0D if none)

Word Description

sysmsg[0] -23

sysmsg[1] Parameter 1 supplied to LOCKMEMORY

sysmsg[2] for 2 Parameter 2 supplied to LOCKMEMORY (if none, OD)

Guardian Programming Reference Summary for C—522630-00114-13

Page 288: Guardian Programming Ref for C

Interprocess Messages

-24 MEMORY LOCK FAILURE

-26 PROCESS TIME TIMEOUT

-30 PROCESS OPEN

-31 PROCESS CLOSE

Word Description

sysmsg[0] -24

sysmsg[1] Parameter 1 supplied to LOCKMEMORY (if none, 0)

sysmsg[2] for 2 Parameter 2 supplied to LOCKMEMORY (if none, 0D)

Word Description

sysmsg[0] -26

sysmsg[1] Parameter 1 supplied to SIGNALPROCESSTIMEOUT (0 if none)

sysmsg[2] for 2 Parameter 2 supplied to SIGNALPROCESSTIMEOUT (0D if none)

Word Description

sysmsg[0] -30

sysmsg[1] Flags parameter to caller’s OPEN

sysmsg[2] Sync-or-receive-depth parameter to caller’s OPEN

sysmsg[3] for 4 0 if normal OPEN; or Process ID of primary process opened by a backup process

sysmsg[7] 0 if normal OPEN; or file number of file opened by a backup process

sysmsg[8] Process accessor ID of opener

sysmsg[9] for 4 Optional first qualified name of named process or blanks

sysmsg[13] for 4 Optional second qualified name of named process or blanks

sysmsg[17], bit 14

1 if the opener’s process access identification (given in the message) has not been verified in the receiver’s node (although it passes the remote password test)

sysmsg[17], bit 15

1 if the opener is on a different node from the receiving process

Word Description

sysmsg[0] -31

Guardian Programming Reference Summary for C—522630-00114-14

Page 289: Guardian Programming Ref for C

Interprocess Messages

-32 PROCESS CONTROL

-33 PROCESS SETMODE

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:

-34 PROCESS RESETSYNC

-35 PROCESS CONTROLBUF

Word Description

sysmsg[0] -32

sysmsg[1] Operation for CONTROL

sysmsg[2] Operation parameter for CONTROL

Word Description

sysmsg[0] -33

sysmsg[1] Function for SETMODE or SETMODENOWAIT

sysmsg[2] Function parameter 1 for SETMODE or SETMODENOWAIT

sysmsg[3] Function parameter 2 for SETMODE or SETMODENOWAIT

Word Description

sysmsg[4] Flags word:

Bit 13, 1 if param1 was supplied for SETMODEBit 14, 1 if param2 was supplied for SETMODEBit 15 1 if last-params was supplied for SETMODE

Word Description

sysmsg[0] -34

Word Description

sysmsg[0] -35

sysmsg[1] Operation parameter for CONTROLBUF

sysmsg[2] Length of buffer data for CONTROLBUF in bytes

sysmsg[3] for n Buffer data of length sysmsg[2] for CONTROLBUF

Guardian Programming Reference Summary for C—522630-00114-15

Page 290: Guardian Programming Ref for C

Interprocess Messages

-37 PROCESS SETPARAM

-38 QUEUED MESSAGE CANCELLATION

-40 DEVICE TYPE INQUIRY

-41 NOWAIT DEVICEINFO2 COMPLETION

Word Description

sysmsg[0] -37

sysmsg[1] Function parameter for SETPARAM

sysmsg[2] Flags word:

Bit 14, 1 if parameter array was suppliedBit 15, 1 if parameter array was returned

sysmsg[3] Length of parameter array in bytes

sysmsg[4:n] Parameter array of length sysmsg[3]

Word Description

sysmsg[0] -38

sysmsg[1] Message tag of canceled message

Word Description

sysmsg[0] -40

sysmsg[1:4] First qualifier name in internal format (blank padded)

sysmsg[5:8] Second qualifier name in internal format (blank padded)

Word Description

sysmsg[0] -41

sysmsg[1:2] Tag value from tag-or-timeout parameter

sysmsg[3] File-system error code

sysmsg[4] Devtype value

sysmsg[5] Physical-recordlen value

sysmsg[6] Diskprocess-version value

Guardian Programming Reference Summary for C—522630-00114-16

Page 291: Guardian Programming Ref for C

Interprocess Messages

-100 REMOTE CPU DOWN

-101 PROCESS DELETION

Word Description

sysmsg[0] -100

sysmsg[1] for 2 Node number

sysmsg[3] processor number

sysmsg[4] Length of node name, in bytes

sysmsg[5] for 3 Reserved

sysmsg[8] for n Node name (including the backslash “\”) of length sysmsg[4]

Word Description

sysmsg[0] -101

sysmsg[1] for 10 Process phandle of terminated process

sysmsg[11] for 4 Process processor time in microseconds (a FIXED value)

sysmsg[15] Process job ID; 0 if the process is not part of a job

sysmsg[16] Completion code

sysmsg[17] Termination information (0 if none supplied)

sysmsg[18] for 4 SPI subsystem organization name

sysmsg[22] SPI subsystem number

sysmsg[23] SPI subsystem version

sysmsg[24] for 10 Process phandle of external process causing termination; null if none

sysmsg[34] Length of termination text in bytes

sysmsg[35] Offset (from beginning of message) of process descriptor of terminated named process (pair) in bytes

sysmsg[36] Length of process descriptor of terminated named process or process pair in bytes (0 if no text)

sysmsg[37], bits 0-13

Reserved

sysmsg[37], bit 14 OSS system type: 1 if terminated process was an OSS process, 0 if terminated process was a Guardian process

sysmsg[37], bit 15 Abend: termination caused by ABEND if 1, STOP if 0

sysmsg[38] for 2 OSS process ID

Guardian Programming Reference Summary for C—522630-00114-17

Page 292: Guardian Programming Ref for C

Interprocess Messages

-102 NOWAIT PROCESS_CREATE_ COMPLETION

-103 PROCESS OPEN

sysmsg[40] Reserved

sysmsg[41] for n Termination text of length sysmsg[34] (80-byte limit).

sysmsg[ ] for n Process descriptor of terminated named process or process pair of length sysmsg[36]

Word Description

sysmsg[0] -102

sysmsg[1] for 2 Nowait-tag supplied to PROCESS_CREATE_

sysmsg[3] for 10 Process phandle of new process

sysmsg[13] Error

sysmsg[14] Error-detail

sysmsg[15] Length of process descriptor of new process in bytes

sysmsg[16] for 4 Reserved

sysmsg[20] for n Process descriptor of new process of length sysmsg[15]

Word Description

sysmsg[0] -103

sysmsg[1] Access mode (access FILE_OPEN_ parameter)

sysmsg[2] Exclusion mode (exclusion FILE_OPEN_ parameter)

sysmsg[3] Nowait depth (from the nowait FILE_OPEN_ parameter)

sysmsg[4] Sync depth (sync-or-receive-depth FILE_OPEN_ parameter)

sysmsg[5] Open options (from the options FILE_OPEN_ parameter)

sysmsg[6] User ID of opener (process access ID)

sysmsg[7] Miscellaneous:

Bit 15, backup open: this is an open by a backupBit 14, the opener is on a different node from the receiver.Bit 13, the opener’s user ID has not been verified locally (in the receiver’s node0); in any case it will have passed a remote password checkBits 0-12, currently undefined; subject to change

sysmsg[8] for 10

Backup open: contains process phandle of primary process Normal open: null process phandle

sysmsg[18] Length of qualifier name in bytes

Word Description

Guardian Programming Reference Summary for C—522630-00114-18

Page 293: Guardian Programming Ref for C

Interprocess Messages

-104 PROCESS CLOSE

-105 BREAK ON DEVICE

sysmsg[19] Offset in bytes from the beginning of the message to the beginning of the opener process name

sysmsg[20] Length of the opener process name in bytes

sysmsg[21] 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.

sysmsg[22] 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.

sysmsg[23] Offset from the beginning of the message to the beginning of the opener home terminal name in bytes

sysmsg[24] Length of the opener home terminal name in bytes

sysmsg[25] for 5

Reserved

sysmsg[30] for n

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.

sysmsg[ ] for n 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 opener’s process handle is available from FILE_GETRECEIVEINFO_. Begins at offset sysmsg[19] with length sysmsg[20].

sysmsg[ ] for n Opener’s home terminal name in external format. Begins at offset sysmsg[23] with length sysmsg[24].

Word Description

sysmsg[0] -104

sysmsg[1] Tape disposition parameter for FILECLOSE_

Word Description

sysmsg[0] -105

sysmsg[1] File number of the receiver’s open file of the terminal that indicated break (or -1 if unavailable).

sysmsg[2] for 2 Break tag value specified with SETPARAM

Word Description

Guardian Programming Reference Summary for C—522630-00114-19

Page 294: Guardian Programming Ref for C

Interprocess Messages

-106 DEVICE TYPE INQUIRY

-107 SUBORDINATE NAME INQUIRY

Word Description

sysmsg[0] -106

sysmsg[1] for 3 Reserved

sysmsg[4] Length of the qualifier part of the file name being inquired about in bytes (zero if none given)

sysmsg[5] for n Qualifier part of the file name being inquired about, in external format, of length sysmsg[4]

Word Description

sysmsg[0] -107

sysmsg[1] 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] Length of the start name in bytes (zero if no start name)

sysmsg[3] Offset from the beginning of the message to the beginning of the name pattern in bytes

sysmsg[4] Length of the name pattern in bytes

sysmsg[5] for 3 Reserved

sysmsg[8] for n Start name: the qualifier part of the file name, in external format, at which to start searching for a name for sysmsg[2].

sysmsg[ ] for n 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-00114-20

Page 295: Guardian Programming Ref for C

Interprocess Messages

-108 NOWAIT FILE_GETINFOBYNAME_ COMPLETION

-109 NOWAIT FILENAME_FINDNEXT_ COMPLETION

-110 LOSS OF COMMUNICATION WITH NETWORK NODE

Word Description

sysmsg[0] -108

sysmsg[1] for 2 Tag value from the timeout-or-tag parameter to FILE_GETINFOBYNAME_

sysmsg[3] File-system error code for the request

sysmsg[4] for 5 Type information (device type, and so on) having the same layout as described for the typeinfo parameter of FILE_GETINFOBYNAME_

sysmsg[9] Physical record length

sysmsg[10] 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

Word Description

sysmsg[0] -109

sysmsg[1] Search ID for the request

sysmsg[2] The file-system error code for the request

sysmsg[3] for 5 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.

sysmsg[8] Length of the returned name in bytes (zero if none present because of an error)

sysmsg[9] for 2 Tag parameter from FILENAME_FINDNEXT_

sysmsg[11] for 3 Reserved

sysmsg[14] for n Returned name, in external form of length sysmsg[8]

Word Description

sysmsg[0] -110

sysmsg[1] for 3 Reserved

sysmsg[4] for 2 Node identifier

sysmsg[6] Length of node name in bytes

sysmsg[7] for n Node name (including the backslash “\”)

Guardian Programming Reference Summary for C—522630-00114-21

Page 296: Guardian Programming Ref for C

Interprocess Messages

-111 ESTABLISHMENT OF COMMUNICATION WITH NETWORK NODE

-112 JOB PROCESS CREATION

-113 REMOTE CPU UP

-141 PROCESS SPAWN

Word Description

sysmsg[0] -111

sysmsg[1] for 3 Reserved

sysmsg[4] for 2 Node identifier

sysmsg[6] Length of node name in bytes

sysmsg[7] for n Node name (including the backslash “\”)

Word Description

sysmsg[0] -112

sysmsg[1] Job ID

sysmsg[2] for 10 Process handle of the newly created process

Word Description

sysmsg[0] -113

sysmsg[1] for 2 Node identifier

sysmsg[3] processor number

sysmsg[4] Length of node name in bytes

sysmsg[5] for 3 Reserved

sysmsg[8] for n Node name (including the backslash “\”)

Word Description

sysmsg[0] -141

sysmsg[1] for 13 Reserved

sysmsg[14] for 2 nowait-tag supplied to PROCESS_SPAWN_

sysmsg[16] for 2 ZSYS-DDL-PROCESSRESULTS.Z-LEN of process-results supplied to PROCESS_SPAWN_

sysmsg[18] for 10 ZSYS-DDL-PROCESSRESULTS.Z-PHANDLE of process-results (process handle of the new process)

Guardian Programming Reference Summary for C—522630-00114-22

Page 297: Guardian Programming Ref for C

Interprocess Messages

-147 CONFIG GETINFO (G-Series Only)

sysmsg[28] for 2 ZSYS-DDL-PROCESSRESULTS.Z-PID of process-results (OSS pid of the new process)

sysmsg[30] for 2 ZSYS-DDL-PROCESSRESULTS.Z-ERRNO of process-results (OSS errno)

sysmsg[32] ZSYS-DDL-PROCESSRESULTS.Z-TPCERROR of process-results (Guardian error)

sysmsg[33] ZSYS-DDL-PROCESSRESULTS.Z-TPCDETAIL of process-results (Guardian error detail)

Word Description

sysmsg[0] -147

sysmsg[1] Message version (must be equal to ZSYS-VAL-SMSG-CONFIGINFO-VERS)

sysmsg[2] for 4 Device name for which configuration info is needed; blank-filled (can be all blanks)

sysmsg[6] for 4 Subdevice name; blank-filled (can be all blanks)

sysmsg[10] for 4 Secondary subdevice name qualifier; blank-filled (can be all blanks)

Word Description

Guardian Programming Reference Summary for C—522630-00114-23

Page 298: Guardian Programming Ref for C

Interprocess Messages

Guardian Programming Reference Summary for C—522630-00114-24

Page 299: Guardian Programming Ref for C

15 Error CodesThis 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 Description

0 Operation successful

1 End-of-file

2 Operation not allowed on this type of file

3 Failure to open or purge a partition

4 Failure to open an alternate key file

5 Failure to provide sequential buffering

6 System message received

7 Process not accepting control or setmode

8 Operation successful (examine MCW for additional status)

9 Operation successful, the data returned was locked by another user

10 File/record already exists

11 File not in directory or record not in file, or the specified tape file is not present on a labeled tape

12 File in use

13 Illegal filename specification

14 Device does not exist

15 Volume specification supplied does not match name of volume on which file actually resides

16 File number has not been opened

17 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

18 System does not exist

19 No more devices in logical device table

20 Attempt to open network file with a name either too long or not acceptable

21 Illegal count specified

22 Application parameter or buffer address is out of bounds

23 Disk address is out of bounds

24 Privileged mode required for this operation

Guardian Programming Reference Summary for C—522630-00115-1

Page 300: Guardian Programming Ref for C

Error Codes

25 AWAITIO or CANCEL was attempted on a wait file

26 AWAITIO or CANCEL was attempted on a file with no outstanding operations

27 WAIT operation attempted when outstanding requests pending

28 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

29 Missing parameter

30 Unable to obtain main memory space for a message block

31 Unable to obtain file-system buffer space

32 Unable to obtain storage pool space (SYSPOOL)

33 I/O process is unable to obtain buffer space

34 Unable to obtain file-system control block

35 Unable to obtain I/O process control block

36 Unable to lock physical memory

37 I/O process is unable to lock physical memory

39 Server process received a request with a sync ID older than the set of saved replies

40 Operation timed out

41 CHECKSUM error on file synchronization block

42 Attempt to read from unallocated extent

43 Unable to obtain disk space for file extent

44 Disk directory is full or DCT is full

45 File is full

46 Invalid key specified

47 Key not consistent with file data

48 Security violation

49 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)

50 Directory error

51 Directory is marked bad

52 Error in disk free space table

53 File-system internal error or CP6100 file management interface error

54 I/O error in disk free space table or DP2 UNDO area

55 I/O error in directory

56 I/O error on volume label

Guardian Programming Reference Summary for C—522630-00115-2

Page 301: Guardian Programming Ref for C

Error Codes

57 Disk free space table is full

58 Disk free space table is marked bad

59 File is bad

60 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

61 No more file opens permitted on this volume or device

62 Volume has been mounted, but mount order has not been given, file open not permitted

63 Volume has been mounted and mount is in progress, file open not permitted

64 Volume has been mounted and mount is in progress, file open not permitted

65 Only special requests permitted or one device up, one device special and special request to both

66 Device down, LIU not yet downloaded, hard failure occurred on controller, disk and controller incompatible, or both halves of a mirrored disk are down

70 Continue file operation

71 Duplicate record

72 Attempted access to unmounted partition or structured access to secondary partition

73 File/record locked

74 Number of READUPDATES without replies exceeds receive-depth, or ACTIVATERECEIVETRANSID or reply called with an invalid message-tag

75 Requesting process has no current process transid

76 Transaction is in the process of ending

78 Transid is invalid or obsolete

79 Attempt by transaction to update or delete a record that it has not previously locked

80 Invalid operation on audited file or nonaudited disk volume

81 Operation invalid for transaction that still has nowait I/Os outstanding on a disk or process file

82 The TMF subsystem has not been started up

83 Attempt to begin more concurrent transactions than can be handled

84 The TMF subsystem has not been configured

85 Device has not been started up for the TMF subsystem

86 BEGINTRANSACTION has been disabled

87 Waiting on a read request and did not get it

88 A control read is pending, new read invalid

89 Remote device has no buffer available

90 Transaction aborted by system because its parent process died

Guardian Programming Reference Summary for C—522630-00115-3

Page 302: Guardian Programming Ref for C

Error Codes

91 Transaction aborted by system due to database ID inconsistency

92 Distributed transaction aborted by system due to network partition

93 Transaction spanning too many audit files aborted by system

94 Transaction aborted by operator command

95 Transaction aborted because of disk process takeover by BACKUP

96 Transaction aborted because it exceeded the AUTOABORT timeout duration

97 Transaction was aborted

98 Transaction monitor process’s network active transactions table is full

99 Attempt to use microcode option that is not installed

100 Device not ready or controller not operational

101 Tape write-protected

102 Paper out, bail open, or end of ribbon

103 Disk not ready due to power failure

104 No response from device

105 Invalid VFU buffer

106 A previously buffered write has failed

110 Only BREAK access permitted

111 Operation aborted because of BREAK

112 READ or WRITEREAD preempted by operator message or too many user console messages

113 DEFINE attributes not valid for attempted function

114 X.25 network line problem – restart failure

115 X.25 network problem – reset failure

119 Error code value was too large to fit into 8-bit container

120 Data parity error, or attempt to access a tape whose density is higher than the switch setting on the tape drive

121 Data overrun error

122 Request aborted due to possible data loss caused by reset of circuit, or due to CLB sequence error or a DP2 disk process takeover

123 Subdevice busy

124 Line reset is in progress

130 Illegal address to disk

131 Write check error from disk

132 Seek incomplete from disk

133 Access not ready on disk

134 Address compare error on disk

Guardian Programming Reference Summary for C—522630-00115-4

Page 303: Guardian Programming Ref for C

Error Codes

135 Write-protect violation with disk

136 Unit ownership error (dual-port disk)

137 Controller buffer parity error

138 Interrupt overrun

139 Controller error

140 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

148 Invalid read or write from/to an optical disk

150 End-of-tape marker detected

151 Runaway tape detected, or attempt to access a tape whose density is lower than the switch setting on the tape drive

152 Unusual end or tape unit went offline or CP6100 file closed while requests in progress

153 Tape drive power on

154 BOT detected during backspace files or backspace records

155 Only nine-track magnetic tape allowed

156 Tape command rejected or communication protocol violation detected

157 I/O process internal error

158 Invalid function requested for Hyper Link

159 Device mode wrong for request, or attempt to execute the PUP PRIMARY command while the tape drive is waiting for a labeled tape mount

160 Request is invalid for device state

161 Impossible event occurred for line state

162 Operation timed out

163 EOT received or power at auto-call unit is off

164 Disconnect received or data line is occupied (busy)

165 RVI received or data line not occupied after setting call request

166 ENQ received or auto-call unit failed to set “present next digit”

167 EOT received on line bid or “data set status” not set after dialing all digits

168 NAK received on line bid or auto-call unit failed to clear “present next digit” after “digit present” was set

169 WACK received on line bid or auto-call unit set “abandon call and retry” or station disabled or station not defined

170 No ID sequence received during circuit assurance mode or invalid MCW entry number on write

171 No response received on bid/poll/select, or reply invalid

172 Reply not proper for protocol

Guardian Programming Reference Summary for C—522630-00115-5

Page 304: Guardian Programming Ref for C

Error Codes

173 Maximum allowable NAKs received (transmission error) or invalid MCW on write or invalid request ID

174 WACK received or CLB frame aborted

175 Incorrect alternating ACK received or command reject

176 POLL sequence ended with no responder

177 Text overrun (insufficient buffer space for data transfer)

178 No address list specified

179 Application buffer is incorrect or control request pending or autopoll active

180 Unknown device status received

181 Status receipt currently enabled for subdevice

182 SNALU access method outbound RU error

183 SNA session has ended

187 Operation returning with no useful data

188 Damage to logical flow of events

189 Response not yet available

190 Device error

191 Device power on or terminal reset

192 Device in diagnose mode

193 Invalid or missing microcode file

194 Device use or mount request rejected by operator

195 Operation requires use of $ZSVR but it is not running

196 Tape label record missing or incorrect

197 An SQL error occurred

198 A DEFINE of the given name could not be found

199 Disk file is Safeguard protected

200 Device is owned by alternate port

201 Current path to the device is down or attempt was made to write to a nonexistent process or error in message system interface

210 Device ownership changed during operation

211 Processor performing operation failed during operation

213 Channel data parity error

214 Channel timeout

215 I/O attempted to absent memory page

216 Memory breakpoint encountered during this I/O

217 Memory parity error during this I/O

Guardian Programming Reference Summary for C—522630-00115-6

Page 305: Guardian Programming Ref for C

Error Codes

218 Interrupt timeout

219 Illegal device reconnect

220 Protect violation

221 Controller handshake violation

222 Bad channel status from EIO instruction

223 Bad channel status from IIO instruction

224 Controller error

225 No unit or multiple units assigned to same unit number

230 Processpr power failed, then restored

231 Controller power failed, then restored

232 Access denied, SMON communication error

233 SERVERCLASS_SEND_ error

240 Network line-handler error, operation not started

241 Network error, operation not started

246 External cluster bypass error, operation aborted

248 Network line-handler error, operation aborted

249 Network error, operation aborted

250 All paths to the system are down

251 Network protocol error

252 Required Expand class is not available

255 Too many interrupts or net line-handler flooded

300-511 Reserved for application processes

538 Extent size is greater than 65,535 pages

541 A data structure version is incompatible with the requested operation

549 Block mode is not currently allowed on this terminal

550 Illegal position or key value

551 Duplicate exists for insertion-ordered alternate key

560 A PIN greater than 255 was encountered

561 The system did not recognize an item code in a list

563 Buffer too small

564 The system detected an operation that is not allowed for this file type

565 Illegal request

566 Illegal reply

567 DEFINE used is incompatible for use with target system’s TOS version

573 Requested process handle cannot be returned

Guardian Programming Reference Summary for C—522630-00115-7

Page 306: Guardian Programming Ref for C

Error Codes

578 The block size specified is too large

579 The record size specified is too large for the given block size, file type, and format

580 An open failed because the file was oversize and the opener did not specify use of 64-bit primary keys

581 An operation involving 32-bit primary keys was attempted on an open which specified use of 64-bit keys

582 Alternate key information could not be returned because it cannot be expressed in the superseded format of the parameter

583 The extent size specified is too large for format 1 files

584 The operation could not be performed because a software component does not support format 2 disk files

590 Parameter value invalid or inconsistent with another

593 Request has been canceled

594 A DSM/TC error was returned to $ZSVR. Refer to the EMS log for detailed information

595 A ZSSI error was returned to $ZSVR. Refer to the EMS log for detailed information.

597 Required item code in a list is missing

632 Insufficient stack space

634 The system detected a device number greater than 16 bits long

635 Optical disk volume cannot be locked or cannot be accessed because other side is locked

638 Process cannot be stopped until process returns to stopmode 1

639 Process cannot be stopped until process goes to stopmode 0

640 DEBUGNOW is required instead of DEBUG for a privileged process

1091 Expiration date not reached

1163 Illegal operation attempted on a file having a system reserved filename.

4000-4999

Open System Services Error

5001 Request rejected: requestor executing on a non-SMF system. (device type: 3.36, 25.0, or 52.0)

5002 Creation of logical file rejected pending deletion of volume from storage pool. (device type: 3.36, 25.0, or 52.0)

5007 SMF access violation: insufficient SMF-privilege to access file. (device type: 3.36, 25.0, or 52.0)

5010 An error occurred during SMF lock manager processing. (device type: 3.36, 25.0, or 52.0)

5011 An error occurred during access of the ANT table. (device type: 3.36)

Guardian Programming Reference Summary for C—522630-00115-8

Page 307: Guardian Programming Ref for C

Error Codes

Sequential I/O Error Codes

5012 An error occurred during access of the PENDOPS table. (device type: 3.36, 25.0, or 52.0)

5013 The name range for a physical volume is exhausted. (device type: 3.36)

5014 No physical volumes are available. (device type: 3.36)

5015 The outcome for the request is unknown. (device type: 3.36, 25.0, or 52.0)

5017 Unable to read one of the SMF catalog tables. (device type: 3.36, 25.0, or 52.0)

5018 An error occurred during message processing. (device type: 3.36, 25.0, or 52.0)

5028 Unable to read a received message. (device type: 3.36, 25.0, or 52.0)

5034 Unable to start the thread manager. (device type: 3.36, 25.0, or 52.0)

5035 Unable to start a thread. (device type: 3.36, 25.0, or 52.0)

5043 An error occurred during a read of a SMF catalog file. (device type: 3.36, 25.0, or 52.0)

5048 BEGINTRANSACTION error. (device type: 3.36, 25.0, or 52.0)

5049 A memory allocation failed. (device type: 3.36, 25.0, or 52.0)

5050 An unexpected error occurred during request processing. (device type: 3.36, 25.0, or 52.0)

5053 The SMF lock manager reached its lock threshold. (device type: 3.36, 25.0, or 52.0)

5064 An error occurred during recovery processing. (device type: 3.36, 25.0, or 52.0)

5065 An error occurred during indeterminate outcome processing. (device type: 3.36, 25.0, or 52.0)

5072 Recovery processing was unable to initialize PENDOPS processing. (device type: 3.36, 25.0, or 52.0)

5073 A PENDOPS semaphore failed; the process that locked a SMF object could not be identified. (device type: 3.36, 25.0, or 52.0)

5076 An invalid operation code was found in the PENDOPS table; the PENDOPS entry is invalid. (device type: 3.36, 25.0, or 52.0)

5313 A virtual disk process encountered an error when trying to perform the requested operation. (device type: 3.36)

Code Description

512 Invalid parameter

513 Missing file name

514 Device not supported

515 Invalid access

516 Invalid buffer address

517 Invalid file code

Guardian Programming Reference Summary for C—522630-00115-9

Page 308: Guardian Programming Ref for C

Error Codes

DEFINE Error Codes

518 Buffer too small

519 Invalid block length

520 Invalid record length

521 Invalid EDIT file

522 File already open

523 EDITREAD or EDITREADINIT error occurred

524 File is closed; check, read, set, write, or wait error

525 Access violation

526 No stack space

527 Temporary buffer required

528 EDIT file ran out of space

529 Write error

530 Invalid write to $RECEIVE

531 Unable to open $RECEIVE

532 I/O started

533 An internal error occurred

534 Checksum error

535 Checksum error

536 Common FCB is in old format

537 Line number of EDIT file too long

Code Description

0 Successful completion

2049 A syntax error occurred in the DEFINE name

2050 The DEFINE name already exists

2051 The DEFINE name does not exist

2052 Unable to obtain file-system buffer space

2053 Unable to obtain physical memory

2054 There was a bounds error in a parameter

2055 An attribute is not allowed for the current CLASS

2056 An attribute is missing

2057 Required attribute missing from current CLASS in working set

2058 Working set inconsistent for current CLASS

2059 The working set for DEFINEs is invalid

Guardian Programming Reference Summary for C—522630-00115-10

Page 309: Guardian Programming Ref for C

Error Codes

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.

2060 No more DEFINEs are allowed

2061 No more attributes are allowed for the DEFINE

2062 The attribute is invalid for the DEFINE

2063 The name of the default subvolume has a syntax error in the SET DEFINE command

2064 Resetting a required DEFINE attribute is not allowed

2066 A required parameter is missing

2067 An invalid value was supplied for an attribute

2068 The CLASS name identifies a nonexistant CLASS

2069 Attempt to add a DEFINE that does not fall under current DEFMODE setting

2071 The DEFINE specifies a 7-character device name, which cannot be converted to a network name on a C-series system

2073 Replacing the =_DEFAULTS DEFINE with a DEFINE having the same name but a class other than DEFAULTS is not allowed

2074 Deleting the DEFINE is not allowed

2075 A DEFINE option is invalid

2076 The buffer is too small for the saved DEFINE

2077 An extended address parameter referred to an invalid segment

2078 The DEFINERESTORE buffer does not contain a valid saved DEFINE

2079 Cannot save the working set because the name is =_DEFAULTS and the working set is not CLASS DEFAULTS.

Code Description

0 No error

1 Undefined external(s)

2 No PCB available

3 File-system error on program-file

4 Unable to allocate map

5 File-system error on swap file

6 Illegal file format

7 Unlicensed privileged program

Guardian Programming Reference Summary for C—522630-00115-11

Page 310: Guardian Programming Ref for C

Error Codes

8 Process name error

9 Library conflict

10 Unable to communicate with system monitor process

11 File-system error on library file

12 Program file and library file are the same

13 Invalid segment size unable to set up the page tables

14 File-system error on initial setup of the swap file

15 Illegal home terminal

16 I/O error on home terminal

17 DEFINE context propagation error

18 Object file with an illegal device subtype

19 Process device subtype specified in backup process isn’t the same as primary’s

20 DSC error: bad ZZPIM file

21 DSC error: dynamic IOP error

22 PFS^SIZE is out of range

23 Cannot create PFS

24 An unknown error number was returned from a remote system

25 Unable to allocate a priv stack for the process

26 Unable to lock the priv stack for the process

27 Unable to allocate a main stack for the process

28 DSC error: unable to lock the main stack of a native IOP

29 Security inheritance failure

30 Unable to allocate native globals

31 Unable to lock native globals

32 Main stack maximum value too large

33 Heap maximum value too large

34 Space guarantee value too large

35 Duplicate shared run-time library (SRL)

36 Unknown SRL specified by program

37 Unknown SRL specified by another SRL

38 Too many SRLs

39 Program file requires fixup

40 SRL requires fixups

41 Program file security violation

42 SRL security violation

Guardian Programming Reference Summary for C—522630-00115-12

Page 311: Guardian Programming Ref for C

Error Codes

PROCESS_CREATE_ Error Codes

43 Program requires symbol from shared run-time library (SRL)

47 Cannot guarantee swap space

48 Mismatch on number of SRLs

49 Undefined externals in SRL

50 Incorrect number of SRLs in program file

51 Incorrect number of SRLs in library

52 SRL must be licensed

53 Unable to obtain global virtual space

54 Symbolic reference target/source type mismatch

55 External data reference not resolved to any user/system library

119 Error number returned is too large

3xx SRL has invalid file format

5xx File-system error on SRL number xx

Code Description

0 No error

1 Error while accessing program file

2 Parameter error

3 Bounds violation

4 Error while accessing library file

5 Error while accessing swap file

6 Error while accessing extended swap file

7 File-system error on PFS

8 Illegal home terminal

9 I/O error on home terminal

10 Unable to communicate with system monitor process

11 Process name error

12 Illegal program file format

13 Illegal library file format

14 Undefined externals

15 No PCB available

16 Unable to allocate map

17 Unlicensed privileged program

18 Library conflict

Guardian Programming Reference Summary for C—522630-00115-13

Page 312: Guardian Programming Ref for C

Error Codes

19 Program file and library file are the same

20 Object file with an illegal device subtype

21 Process device subtype specified in backup process is not the same as primary

22 Backup creation specified, but caller is unamed

24 DEFINE context propagation error

25 DSC error: invalid ZZPIM file

26 Dynamic IOP error

27 Invalid PFS size

29 Unable to allocate a priv stack for the process

30 Unable to lock the priv stack for the process

31 Unable to allocate a main stack for the process

32 DSC error: unable to lock the main stack of a native IOP

33 Security inheritance failure

35 Internal PROCESS_CREATE_ error

36 Child's PFS error

37 Unable to allocate global data for the process

38 Unable to lock global IOP data for the process

40 The main stack maximum value, specified either by the procedure call or by the object file, is too large.

41 The heap maximum value, specified either by the procedure call or by the object file, is too large.

42 The space guarantee value, specified either by the procedure call or by the object file, is too large.

43 The process creation request specifies two files that contain the same shared run-time library (SRL) names.

44 Unable to find a SRL specified by the program file

45 Unable to find a SRL specified by another SRL

46 The process creation request specifies too many SRLs

47 The program file requires fixups to a SRL but the program file is currently running

48 A SRL requires fixups to another SRL

49 Security violation. The program file is not licensed BUT a SRL containing instance data is licensed

50 Security violation. Either the program file or SRL is licensed but a SRL is not licensed

51 The program file requires a symbol from a SRL but the SRL is not exporting it

52 The specified version, Z^VERSION, of the ZSYS^DDL^PLAUNCH^PARMS structure is not supporteD

Guardian Programming Reference Summary for C—522630-00115-14

Page 313: Guardian Programming Ref for C

Error Codes

53 The specified version, Z^VERSION, of the ZSYS^DDL^PLAUNCH^PARMS structure is incompatible with the specified length, Z^LENGTH, of the structure

54 Internal process creation error

55 The specified space guarantee cannot be allocated

56 Internal process creation error

57 A shared run-time library (SRL) has undefined externals

58 Internal process creation error

59 Internal process creation error

60 Security violation; a SRL containing callable procedures must be licensed to be used by callable or privileged code

61 Unable to obtain global vitual space

62 Symbolic reference target/source type mismatch

63 External data references not resolved to any user/system library

104 Unable to create OSS process

106 OSS start interpreter error

107 OSS static variable error

108 Not running on an OSS system error

110 OSS current working directory error

111 OSS file descriptor dup error

112 OSS file descriptor open error

113 OSS file descriptor open timeout error

114 Cannot create OSS prive process

115 Unable to allocate global data or heap for the process (PROCESS_SPAWN_ only)

116 Unable to propagate SRL data (PROCESS_SPAWN_ ONLY)

3xx Invalid file format on SRL number xx

5xx File-system error on SRL number xx

Guardian Programming Reference Summary for C—522630-00115-15

Page 314: Guardian Programming Ref for C

Error Codes

PROCESS_GETINFOLIST_ Error Codes

Code Description

0 No error

1 A file-system error occurred

2 Parameter error

3 Bounds error

4 Specified process does not exist

5 Unable to communicate with CPU

6 Unable to connunicate with node

7 No more matches

9 Invalid search code

10 Invalid search value

11 Invalid return attribute code

12 Invalid search option

Guardian Programming Reference Summary for C—522630-00115-16

Page 315: Guardian Programming Ref for C

Error Codes

PROCESS_GETPAIRINFO_ Error Codes

PROCESS_SPAWN_ Open System Services (OSS) Errors

Code Description

0 No error

2 Parameter error

3 Bounds error

4 Single named process

5 Caller’s pair: caller is current primary

6 Caller’s pair: caller is current backup

7 Process is unamed

8 Search is complete

9 Process does not exist

10 Unable to communicate with node

11 Target is a process controlling a device or volume, but bit 15 was not set

13 Limited information is returned for a process that is not started

Code Description

0 NO ERROR

4002 NO SUCH FILE OR DIRECTORY

4005 I/O ERROR

4007 ARGUMENT LIST TOO LONG

4008 EXEC FORMAT ERROR

4009 BAD FILE DESCRIPTOR

4011 NO MORE PROCESSES

4012 INSUFFICIENT USER MEMORY

4013 PERMISSION DENIED

4014 BAD ADDRESS

4020 NOT A DIRECTORY

4022 INVALID FUNCTION ARGUMENT

4126 CONNECTION TIMED OUT

4131 FILE NAME TOO LONG

4203 OSS NOT RUNNING OR NOT INSTALLED

4212 AN ERROR OCCURRED DURING INVOCATION OF A DEFINE PROCEDURE

Guardian Programming Reference Summary for C—522630-00115-17

Page 316: Guardian Programming Ref for C

Error Codes

ALLOCATESEGMENT Error Codes

SEGMENT_ALLOCATE_ Error Codes

Code Description

0 No error

-1 Illegal segment ID

-2 Illegal segment size

-3 Bounds violation on swap file parameter

-4 Illegal combination of options

-5 Unable to allocate segment space

-6 Unable to allocate segment page table space

-7 Security violation

-8 PIN does not exist

-9 No segment allocated to PIN

-10 Trying to share segment with self

-11 Requested segment is currently being resized or is incompatible

Code Description

0 No error

1 Error creating or opening segment swap file

2 Parameter error

3 Bounds violation

4 Illegal segment ID

5 Illegal segment size

6 Unable to allocate segment space

7 Unable to allocate segment page table space

8 Security violation

9 PIN does not exist

10 No segment allocated to PIN

11 Trying to share segment with self

12 Requested shared segment is incompatible

13 Requested segment already allocated

14 Unable to allocate the PST

15 Requested address range already allocated

Guardian Programming Reference Summary for C—522630-00115-18

Page 317: Guardian Programming Ref for C

Error Codes

Subsystem Programmatic Interface (SPI) Error Codes

EDITREAD and EDITREADINIT Error Codes

Code Description

0 No error

-1 Invalid buffer format

-2 Illegal parameter value

-3 Missing parameter

-4 Illegal parameter address

-5 Buffer full

-6 Invalid checksum

-7 Internal error

-8 Token not found

-9 Illegal token code or map

-10 Invalid subsystem ID

-11 Operation not supported

-12 Insufficient stack space

-13 File-system error

-14 Guardian procedure error

-15 Invalid template file

-16 More text is available

-26 See Tandem representative

-27 No format ID available

Code Description

0 or greater No error

-1 End-of-file encountered

-2 I/O error

-3 Text file format error

-4 Sequence number error

-5 Checksum error

Guardian Programming Reference Summary for C—522630-00115-19

Page 318: Guardian Programming Ref for C

Error Codes

IOEdit Error Codes

In addition to the error codes shown here, the IOEdit procedures can also return file-system 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.

Formatter Error Codes

Code Description

-1 Inconsistent directory size value

-2 Record numbers in the directory are out of order

-3 A record number in the directory is beyond legal range

-4 A block number in the directory is outside the file

-5 Duplicate block numbers in the directory

-6 Numbers ran out

-7 Record numbers out of order

-8 Record length too large

-9 Record format inconsistent

-10 Cannot do renumbering

-13 Error accessing non-EDIT file line numbers

-14 Error accessing non-EDIT file change tags

-15 Change tag should be appended to record

-16 Both tag and record number error

-17 Change tag overlays text

Code Description

267 Buffer overflow

268 No buffer

270 Format loopback

271 Edit item mismatch

272 Illegal input character

273 Bad format

274 Numeric overflow

Guardian Programming Reference Summary for C—522630-00115-20

Page 319: Guardian Programming Ref for C

16 ASCII Character Set

Character Left Right Hexa-decimal Decimal Meaning

NUL 000000 000000 00 0 Null

SOH 000400 000001 01 1 Start of heading

STX 001000 000002 02 2 Start of text

ETX 001400 000003 03 3 End of text

EOT 002000 000004 04 4 End of transmission

ENQ 002400 000005 05 5 Enquiry

ACK 003000 000006 06 6 Acknowledge

BEL 003400 000007 07 7 Bell

BS 004000 000010 08 8 Backspace

HT 004400 000011 09 9 Horizontal tabulation

LF 005000 000012 A 10 Line feed

VT 005400 000013 B 11 Vertical tabulation

FF 006000 000014 C 12 Form feed

CR 006400 000015 D 13 Carriage return

SO 007000 000016 E 14 Shift out

SI 007400 000017 F 15 Shift in

DLE 010000 000020 10 16 Data link escape

DC1 010400 000021 11 17 Device control 1

DC2 011000 000022 12 18 Device control 2

DC3 011400 000023 13 19 Device control 3

DC4 012000 000024 14 20 Device control 4

NAK 012400 000025 15 21 Negative acknowledge

SYN 013000 000026 16 22 Synchronous idle

ETB 013400 000027 17 23 End of transmission block

CAN 014000 000030 18 24 Cancel

EM 014400 000031 19 25 End of medium

SUB 015000 000032 1A 26 Substitute

ESC 015400 000033 1B 27 Escape

FS 016000 000034 1C 28 File separator

GS 016400 000035 1D 29 Group separator

Guardian Programming Reference Summary for C—522630-00116-1

Page 320: Guardian Programming Ref for C

ASCII Character Set

RS 017000 000036 1E 30 Record separator

US 017400 000037 1F 31 Unit separator

SP 020000 000040 20 32 Space

! 020400 000041 21 33 Exclamation point

" 021000 000042 22 34 Quotation mark

# 021400 000043 23 35 Number sign

$ 022000 000044 24 36 Dollar sign

% 022400 000045 25 37 Percent sign

& 023000 000046 26 38 Ampersand

' 023400 000047 27 39 Apostrophe

( 024000 000050 28 40 Opening parenthesis

) 024400 000051 29 41 Closing parenthesis

* 025000 000052 2A 42 Asterisk

+ 025400 000053 2B 43 Plus

, 026000 000054 2C 44 Comma

- 026400 000055 2D 45 Hyphen (minus)

. 027000 000056 2E 46 Period (decimal point)

/ 027400 000057 2F 47 Right slash

0 030000 000060 30 48 Zero

1 030400 000061 31 49 One

2 031000 000062 32 50 Two

3 031400 000063 33 51 Three

4 032000 000064 34 52 Four

5 032400 000065 35 53 Five

6 033000 000066 36 54 Six

7 033400 000067 37 55 Seven

8 034000 000070 38 56 Eight

9 034400 000071 39 57 Nine

: 035000 000072 3A 58 Colon

; 035400 000073 3B 59 Semicolon

< 036000 000074 3C 60 Less than

= 036400 000075 3D 61 Equals

> 037000 000076 3E 62 Greater than

? 037400 000077 3F 63 Question mark

@ 040000 000100 40 64 Commercial at sign

Guardian Programming Reference Summary for C—522630-00116-2

Page 321: Guardian Programming Ref for C

ASCII Character Set

A 040400 000101 41 65 Uppercase A

B 041000 000102 42 66 Uppercase B

C 041400 000103 43 67 Uppercase C

D 042000 000104 44 68 Uppercase D

E 042400 000105 45 69 Uppercase E

F 043000 000106 46 70 Uppercase F

G 043400 000107 47 71 Uppercase G

H 044000 000110 48 72 Uppercase H

I 044400 000111 49 73 Uppercase I

J 045000 000112 4A 74 Uppercase J

K 045400 000113 4B 75 Uppercase K

L 046000 000114 4C 76 Uppercase L

M 046400 000115 4D 77 Uppercase M

N 047000 000116 4E 78 Uppercase N

O 047400 000117 4F 79 Uppercase O

P 050000 000120 50 80 Uppercase P

Q 050400 000121 51 81 Uppercase Q

R 051000 000122 52 82 Uppercase R

S 051400 000123 53 83 Uppercase S

T 052000 000124 54 84 Uppercase T

U 052400 000125 55 85 Uppercase U

V 053000 000126 56 86 Uppercase V

W 053400 000127 57 87 Uppercase W

X 054000 000130 58 88 Uppercase X

Y 054400 000131 59 89 Uppercase Y

Z 055000 000132 5A 90 Uppercase Z

[ 055400 000133 5B 91 Opening bracket

\ 056000 000134 5C 92 Back slash

] 056400 000135 5D 93 Closing bracket

^ 057000 000136 5E 94 Circumflex

_ 057400 000137 5F 95 Underscore

` 060000 000140 60 96 Grave accent

a 060400 000141 61 97 Lowercase a

b 061000 000142 62 98 Lowercase b

c 061400 000143 63 99 Lowercase c

Guardian Programming Reference Summary for C—522630-00116-3

Page 322: Guardian Programming Ref for C

ASCII Character Set

d 062000 000144 64 100 Lowercase d

e 062400 000145 65 101 Lowercase e

f 063000 000146 66 102 Lowercase f

g 063400 000147 67 103 Lowercase g

h 064000 000150 68 104 Lowercase h

i 064400 000151 69 105 Lowercase i

j 065000 000152 6A 106 Lowercase j

k 065400 000153 6B 107 Lowercase k

l 066000 000154 6C 108 Lowercase l

m 066400 000155 6D 109 Lowercase m

n 067000 000156 6E 110 Lowercase n

o 067400 000157 6F 111 Lowercase o

p 070000 000160 70 112 Lowercase p

q 070400 000161 71 113 Lowercase q

r 071000 000162 72 114 Lowercase r

s 071400 000163 73 115 Lowercase s

t 072000 000164 74 116 Lowercase t

u 072400 000165 75 117 Lowercase u

v 073000 000166 76 118 Lowercase v

w 073400 000167 77 119 Lowercase w

x 074000 000170 78 120 Lowercase x

y 074400 000171 79 121 Lowercase y

z 075000 000172 7A 122 Lowercase z

{ 075400 000173 7B 123 Opening brace

| 076000 000174 7C 124 Vertical line

} 076400 000175 7D 125 Closing brace

~ 077000 000176 7E 126 Tilde

DEL 077400 000177 7F 127 Delete

Guardian Programming Reference Summary for C—522630-00116-4

Page 323: Guardian Programming Ref for C

17 TNS Instruction Set

TNS Alphabetical List of InstructionsThe 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 Octal Code Description

ADAR 00016- Add A to Register

ADDI 104--- Add Immediate

ADDS 002--- Add to S

ADM -74--- Add to Memory

ADRA 00014- Add Register to A

ADXI 104--- Add to Index Immediate

ALS 0302-- Arithmetic Left Shift

ANG 000044 AND to Memory

ANLI 007--- AND Left Immediate

ANRI 006--- AND Right Immediate

ANS 000034 AND to SG Memory

ANX 000046 AND to Extended Memory

ARS 0303-- Arithmetic Right Shift

ASPT 000470 Address of Segment Page Table Header *

BANZ -154-- Branch on A

BAZ -144-- Branch on A Zero

BCLD 000452 Bus Cold Load *

BEQL -12--- Branch if Equal

BFI 000030 Branch Forward Indirect

BGEQ -13--- Branch if Greater or Equal

BGTR -11--- Branch if Greater

BIC -10--- Branch if Carry

BIKE 000464 Bicycle While Idle *

BLEQ -16--- Branch if Less or Equal

Guardian Programming Reference Summary for C—522630-00117-1

Page 324: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

BLSS -14--- Branch if Less

BNDW 000450 Bounds Test Words *

BNEQ -15--- Branch if Not Equal

BNOC -17--- Branch if No Carry

BNOV -164-- Branch if No Overflow

BOX -1-4-- Branch on X

BPT 000451 Instruction Breakpoint Trap

BSUB -174-- Branch to Subprocedure

BTST 000007 Byte Test

BUN -l04-- Branch

CAQ 000262 Convert ASCII to Quad

CAQV 000261 Convert ASCII to Quad with Initial Value

CCE 000016 Condition Code Equal to

CCG 000017 Condition Code Greater than

CCL 000015 Condition Code Less than

CDE 000334 Convert Doubleword to Extended Float

CDF 000306 Convert Doubleword to Float

CDFR 000326 Convert Doubleword to Float (Round)

CDG 000366 Count Duplicate Words

CDI 000307 Convert Doubleword to Integer

CDQ 000265 Convert Doubleword to Quad

CDX 000356 Count Duplicate Words Extended

CED 000314 Extended Float to Doubleword

CEDR 000315 Extended Float to Doubleword (Round)

CEF 000276 Extended Float to Float

CEFR 000277 Extended Float to Float (Round)

CEI 000337 Extended Float to Integer

CEIR 000337 Extended Float to Integer (Round)

CEQ 000337 Extended Float to Quadrupleword

CEQR 000323 Extended Float to Quadrupleword (Round)

CFD 000312 Floating to Doubleword

CFDR 000313 Floating to Doubleword (Round)

CFE 000325 Floating to Extended Float

CFI 000311 Floating to Integer

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-2

Page 325: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

CFIR 000310 Floating to Integer (Round)

CFQ 000320 Floating to Quadrupleword

CFQR 000321 Floating to Quadrupleword (Round)

CID 000327 Convert Integer to Doubleword

CIE 000332 Convert Integer to Extended Float

CIF 000331 Convert Integer to Floating

CIQ 000266 Convert Integer to Quad

CLQ 000267 Convert Logical to Quad

CMBX 000422 Compare Bytes Extended

CMPI 001--- Compare Immediate

CMRW 000432 Correctable Memory Error Read/Write *

COMB 1262-- Compare Bytes

COMW 0262-- Compare Words

CQA 000260 Convert Quad to ASCII

CQD 000247 Convert Quad to Doubleword

CQE 000336 Convert Quad to Extended

CQER 000335 Convert Quad to Extended (Round)

CQF 000324 Convert Quad to Floating

CQFR 000330 Convert Quad to Floating (Round)

CQI 000264 Convert Quad to Integer

CQL 000246 Convert Quad to Logical

CRAX 000423 Convert Relative to Absolute Extended *

DADD 000220 Double Add

DALS 1302-- Double Arithmetic Left Shift

DARS 1303-- Double Arithmetic Right Shift

DCMP 000225 Double Compare

DDIV 000223 Double Divide

DDTX 000456 DDT Request *

DDUP 000006 Double Duplicate

DFG 000367 Deposit Field in Memory

DFS 000357 Deposit Field in System

DFX 000416 Deposit Field in Extended Memory

DISP 000073 Dispatch *

DLEN 000070 Disk Record Length **

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-3

Page 326: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

DLLS 1300-- Double Logical Left Shift

DLRS 1301-- Double Logical Right Shift

DLTE 000054 Delete Element from List *

DMPY 000222 Double Multiply

DNEG 000224 Double Negate

DOFS 000057 Disk Record Offset **

DPCL 000032 Dynamic Procedure Call

DPF 000014 Deposit Field

DSUB 000221 Double Subtract

DTL 000207 Determine Time Left for Element *

DTST 000031 Double Test

DXCH 000005 Double Exchange

DXIT 000072 DEBUG Exit *

EADD 000300 Extended Floating-Point Add

ECMP 000305 Extended Floating-Point Compare

EDIV 000303 Extended Floating-Point Divide

EIO 000060 Execute I/O *

EIOC 000512 Exchange EIOC Table Entries *

EMPY 000302 Extended Floating-Point Multiply

ENEG 000304 Extended Floating-Point Negate

ESUB 000301 Extended Floating-Point Subtract

EXCH 000004 Exchange

EXIT 125--- Exit Procedure

FADD 000270 Floating-Point Add

FCMP 000275 Floating-Point Compare

FDIV 000273 Floating-Point Divide

FMPY 000272 Floating-Point Multiply

FNEG 000274 Floating-Point Negate

FRST 000405 Firmware Reset *

FSUB 000271 Floating-Point Subtract

FTL 000206 Find Position in Time List *

HALT 000074 Processor Halt *

HIIO 000062 High-Priority Interrogate I/O *

IADD 000210 Integer Add

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-4

Page 327: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

ICMP 000215 Integer Compare

IDIV 000213 Integer Divide

IDX1 000344 Calculate Index, 1 Dimension

IDX2 000345 Calculate Index, 2 Dimension

IDX3 000346 Calculate Index, 3 Dimension

IDXD 000317 Calculate Index, Bounds in Data Space

IDXP 000347 Calculate Index, Bounds in Code SpaceIDXP

IIO 000061 Interrogate I/O *

IMPY 000212 Integer Multiply

INEG 000214 Integer Negate

INSR 000055 Insert Element into List *

ISUB 000211 Integer Subtract

IXIT 000071 Interrupt Exit *

LADD 000200 Logical Add

LADI 003--- Logical Add Immediate

LADR -7---- Load AddressLADR

LAND 000010 Logical AND

LBA 000364 Load Byte via A

LBAS 000354 Load Byte via A from System

LBP -2-4-- Load Byte from Program

LBX 000406 Load Byte Extended

LBXX 0256--, 0266-- Load Byte Extended, Indexed

LCKX 000430 Lock Down Extended Memory *

LCMP 000205 Logical Compare

LDA 000362 Load Double via A

LDAS 000352 Load Double via A from System

LDB -5---- Load Byte

LDD -6---- Load Double

LDDX 000412 Load Double Extended

LDI 100--- Load Immediate

LDIV 000203 Logical Divide

LDLI 005--- Load Left Immediate

LDRA 00013- Load Register to A

LDX -3---- Load X

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-5

Page 328: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

LDXI 10---- Load X Immediate

LLS 0300-- Logical Left Shift

LMPY 000202 Logical Multiply

LNEG 000204 Logical Negate

LOAD -4---- Load

LOR 000011 Logical OR

LQAS 000445 Load Quadrupleword via A from SG *

LQX 000414 Load Quadrupleword Extended

LRS 0301-- Logical Right Shift

LSUB 000201 Logical Subtract

LWA 000360 Load Word via A

LWAS 000350 Load Word via A from System

LWP -2---- Load Word from Program

LWUC 000342 Load Word from User Code Space

LWX 000410 Load Word Extended

LWXX 0254--, 0264-- Load Word Extended, Indexed

MAPS 000042 Map In a Segment *

MBXR 000420 Move Bytes Extended, Reverse

MBXX 000421 Move Bytes Extended, and Checksum

MNDX 000227 Move Words while Not Duplicate, Extended

MNGG 000226 Move Words while Not Duplicate

MOND 000001 Minus One Double

MOVB 126--- Move Bytes

MOVW 026--- Move Words

MRL 000075 Merge onto Ready List *

MVBX 000417 Move Bytes Extended

MXFF 000041 Mutual Exclusion Off *

MXON 000040 Mutual Exclusion On *

NOP 000000 No Operation

NOT 000013 Not

NSAR 00012- Nondestructive Store A in a Register

NSTO -34--- Nondestructive Store

ONED 000003 One Double

ORG 000045 OR to Memory

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-6

Page 329: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

ORLI 0044-- OR Left Immediate

ORRI 004--- OR Right Immediate

ORS 000035 OR to SG Memory

ORX 000047 OR to Extended Memory

PCAL 027--- Procedure Call

POP 124--- Pop from Stack

PSEM 000076 “P” a Semaphore *

PUSH 024--- Push to Stack

QADD 00024 Quad Add

QCMP 000245 Quad Compare

QDIV 000243 Quad Divide

QDWN 00025- Quad Scale Down

QLD 00023- Quad Load

QMPY 000242 Quad Multiply

QNEG 000244 Quad Negate

QRND 000263 Quad Round

QST 00023- Quad Store

QSUB 000241 Quad Subtract

QUP 00025- Quad Scale Up

RCHN 000447 Reset I/O Channel *

RCLK 000050 Read Clock

RCPU 000051 Read Processor Number

RDE 000024 Read ENV Register

RDP 000025 Read P Register

RIBA 000440 Read INTA and INTB Registers *

RIOC 000510 Read EIOC table entry *

RIR 000063 Reset Interrupt *

RPT 000442 Read Process Timer *

RSMT 000436 Read From Operations & Service Processor *

RSPT 000424 Read Segment Page Table Entry *

RSUB 025--- Return from Subprocedure

RSW 000026 Read Switches

RUS 000461 Read Micro State *

RWCS 000402 Read LCS *

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-7

Page 330: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

RXBL 000426 Read Extended Base and Limit *

SBA 000365 Store Byte via A

SBAR 00017- Subtract A from a Register

SBAS 000355 Store Byte via A into System

SBRA 00015- Subtract Register from A

SBU 1266-- Scan Bytes Until

SBW 1264-- Scan Bytes While

SBX 000407 Store Byte Extended

SBXX 0257--, 0267-- Store Byte Extended, Indexed

SCMP 000454 Set Code Map

SCPV 000463 Set Current Process Variables *

SCS 000444 Set Code Segment

SDA 000363 Store Double via A

SDAS 000353 Store Double via A into System

SDDX 000413 Store Double Extended

SEND 000065 Send *

SETE 000022 Set ENV Register

SETL 000020 Set L Register

SETP 000023 Set P Register

SETS 000021 Set S Register

SFRZ 000053 System Freeze *

SIOC 000460 Store Entry to IOC *

SMAP 000067 Set Map *

SMBP 000404 Set Memory Breakpoint *

SNDQ 000052 Signal a Send Is Queued *

SPT 000443 Set Process Timer *

SQAS 000446 Store Quadrupleword via A to SG *

SQX 000415 Store Quadrupleword Extended

SRST 000455 Soft Reset *

SSW 000027 Set Switches

STAR 00011- Store A in Register

STB -54--- Store Byte

STD -64--- Store Double

STOR -44--- Store

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-8

Page 331: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

STRP 00010- Set RP

SVMP 000441 Save Map Entries *

SWA 000361 Store Word via A

SWAS 000351 Store Word via A into System

SWX 000411 Store Word Extended

SWXX 0255--, 0265 Store Word Extended, Indexed

SXBL 000427 Set Extended Base and Limit *

TOTQ 000056 Test OUTQ **

TRCE 000217 Add Entry to Trace Table *

ULKX 000431 Unlock Extended Memory *

VSEM 000077 "V" a Semaphore *

WIOC 000511 Write EIOC table entry *

WSMT 000437 Write to Operations and Service Processor *

WSPT 000425 Write Segment Page Table Entry *

WWCS 000400 Write to LCS *

XCAL 127--- External Call

XIOC 000462 Exchange IOC entries *

XMSK 000064 Exchange Mask *

XOR 000012 Exclusive OR

XSMG 000343 Compute Checksum in Current Data

XSMX 000333 Checksum Extended Block

ZERD 000002 Zero Double

Mnemonic Octal Code Description

Guardian Programming Reference Summary for C—522630-00117-9

Page 332: Guardian Programming Ref for C

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 000210 Integer Add

LADD 000200 Logical Add

ISUB 000211 Integer Subtract

LSUB 000201 Logical Subtract

IMPY 000212 Integer Multiply

LMPY 000202 Logical Multiply

IDIV 000213 Integer Divide

LDIV 000203 Logical Divide

INEG 000214 Integer Negate

LNEG 000204 Logical Negate

ICMP 000215 Integer Compare

LCMP 000205 Logical Compare

CMPI 001--- Integer Compare Immediate

ADDI 104--- Integer Add Immediate

LADI 003--- Logical Add Immediate

Guardian Programming Reference Summary for C—522630-00117-10

Page 333: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

32-Bit Signed Arithmetic

16-Bit Signed Arithmetic (Register Stack Environment)

Decimal Arithmetic Load and Store

Decimal Integer Arithmetic

CDI 000307 Convert Double to Integer

CID 000327 Convert Integer to Double

DADD 000220 Double Add

DSUB 000221 Double Subtract

DMPY 000222 Double Multiply

DDIV 000223 Double Divide

DNEG 000224 Double Negate

DCMP 000225 Double Compare

DTST 000031 Double Test

MOND 000001 (Load) Minus One Double

ZERD 000002 (Load) Zero Double

ONED 000003 (Load) One Double

ADRA 00014- Add Register to A

SBRA 00015- Subtract Register from A

ADAR 00016- Add A to Register

SBAR 00017- Subtract A from Register

ADXI 104--- Add to Index Immediate

QLD 00023- Quadruple Load

QST 00023- Quadruple Store

QADD 000240 Quadruple Add

QSUB 000241 Quadruple Subtract

QMPY 000242 Quadruple Multiply

QDIV 000243 Quadruple Divide

QNEG 000244 Quadruple Negate

QCMP 000245 Quadruple Compare

Guardian Programming Reference Summary for C—522630-00117-11

Page 334: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Decimal Arithmetic Scaling and Rounding

Decimal Arithmetic Conversions

Floating-Point Arithmetic

Extended Floating-Point Arithmetic

QUP 00025- Quadruple Scale Up

QDWN 00025- Quadruple Scale Down

QRND 000263 Quadruple Round

CQI 000264 Convert Quad to Integer

CQL 000246 Convert Quad to Logical

CQD 000247 Convert Quad to Double

CQA 000260 Convert Quad to ASCII

CIQ 000266 Convert Integer to Quad

CLQ 000267 Convert Logical to Quad

CDQ 000265 Convert Double to Quad

CAQ 000262 Convert ASCII to Quad

CAQV 000261 Convert ASCII to Quad with Initial Value

FADD 000270 Floating-Point Add

FSUB 000271 Floating-Point Subtract

FMPY 000272 Floating-Point Multiply

FDIV 000273 Floating-Point Divide

FNEG 000274 Floating-Point Negate

FCMP 000275 Floating-Point Compare

EADD 000300 Extended Floating-Point Add

ESUB 000301 Extended Floating-Point Subtract

EMPY 000302 Extended Floating-Point Multiply

EDIV 000303 Extended Floating-Point Divide

ENEG 000304 Extended Floating-Point Negate

ECMP 000305 Extended Floating-Point Compare

Guardian Programming Reference Summary for C—522630-00117-12

Page 335: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Floating-Point Conversions

Floating-Point Functionals

CEF 000276 Convert Extended to Floating

CEFR 000277 Convert Extended to Floating, Rounded

CFI 000311 Convert Floating to Integer

CFIR 000310 Convert Floating to Integer, Rounded

CFD 000312 Convert Floating to Double

CFDR 000313 Convert Floating to Double, Rounded

CED 000314 Convert Extended to Double

CEDR 000315 Convert Extended to Double, Rounded

CEI 000337 Convert Extended to Integer

CEIR 000316 Convert Extended to Integer, Rounded

CFQ 000320 Convert Floating to Quad

CFQR 000321 Convert Floating to Quad, Rounded

CEQ 000322 Convert Extended to Quad

CEQR 000323 Convert Extended to Quad, Rounded

CFE 000325 Convert Floating to Extended

CIF 000331 Convert Integer to Floating

CDF 000306 Convert Double to Floating

CDFR 000326 Convert Double to Floating, Rounded

CQF 000324 Convert Quad to Floating

CQFR 000330 Convert Quad to Floating, Rounded

CIE 000332 Convert Integer to Extended

CDE 000334 Convert Double to Extended

CQE 000336 Convert Quad to Extended

CQER 000335 Convert Quad to Extended, Rounded

IDX1 000344 Calculate Index, 1 Dimension

IDX2 000345 Calculate Index, 2 Dimensions

IDX3 000346 Calculate Index, 3 Dimensions

IDXP 000347 Calculate Index, Bounds in Code Space

IDXD 000317 Calculate Index, Bounds in Data Space

Guardian Programming Reference Summary for C—522630-00117-13

Page 336: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Register Stack Manipulation

Boolean Operations

Bit Shift and Deposit

EXCH 000004 Exchange A with B

DXCH 000005 Double Exchange

DDUP 000006 Double Duplicate

STAR 00011- Store A in a Register

NSAR 00012- Nondestructive Store A in a Register

LDRA 00013- Load A from a Register

LDI 100--- Load Immediate

LDXI 10---- Load Index Immediate

LDLI 005--- Load Left Immediate

LAND 000010 Logical AND

LOR 000011 Logical OR

XOR 000012 Exclusive OR

NOT 000013 NOT

ORRI 004--- OR Right Immediate

ORLI 0044-- OR Left Immediate

ANRI 006--- AND Right Immediate

ANLI 007--- AND Left Immediate

DPF 000014 Deposit Field

LLS 0300-- Logical Left Shift

DLLS 1300-- Double Logical Left Shift

LRS 0301-- Logical Right Shift

DLRS 1301-- Double Logical Right Shift

ALS 0302-- Arithmetic Left Shift

DALS 1302-- Double Arithmetic Left Shift

ARS 0303-- Arithmetic Right Shift

DARS 1303-- Double Arithmetic Right Shift

Guardian Programming Reference Summary for C—522630-00117-14

Page 337: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

BYTE Test

Memory Stack to/from Register Stack

BTST 000007 Byte Test

LWP -2---- Load Word from Program

LBP -2-4-- Load Byte from Program

PUSH 024--- Push Registers to Memory

POP 124--- Pop Memory to Registers

LWXX 0254--, 0264-- Load Word Extended, Indexed

SWXX 0255--, 0265-- Store Word Extended, Indexed

LBXX 0256--, 0266-- Load Byte Extended, Indexed

SBXX 0257--, 0267-- Store Byte Extended, Indexed

LDX -3---- Load Index

NSTO -34--- Nondestructive Store

LOAD -4---- Load Word

STOR -44--- Store Word

LDB -5---- Load Byte

STB -54--- Store Byte

LDD -6---- Load Double

STD -64--- Store Double

LADR -7---- Load Address of Variable

ADM -74--- Add to Memory

Guardian Programming Reference Summary for C—522630-00117-15

Page 338: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Load and Store via Address on Register Stack

ANS 000034 AND to SG Memory

ORS 000035 OR to SG Memory

ANG 000044 AND to Current Data

ORG 000045 OR to Current Data

ANX 000046 AND to Extended Memory

ORX 000047 OR to Extended Memory

LWUC 000342 Load Word from User Code Segment

LWAS 000350 Load Word via A from System

LWA 000360 Load Word via A

SWAS 000351 Store Word via A into System

SWA 000361 Store Word via A

LDAS 000352 Load Double via A from System

LDA 000362 Load Double via A

SDAS 000353 Store Double via A into System

SDA 000363 Store Double via A

LBAS 000354 Load Byte via A from System

LBA 000364 Load Byte via A

SBAS 000355 Store Byte via A into System

SBA 000365 Store Byte via A

DFS 000357 Deposit Field into System Data

DFG 000367 Deposit Field in Current Data

LBX 000406 Load Byte Extended

SBX 000407 Store Byte Extended

LWX 000410 Load Word Extended

SWX 000411 Store Word Extended

LDDX 000412 Load Doubleword Extended

SDDX 000413 Store Doubleword Extended

LQX 000414 Load Quadrupleword Extended

SQX 000415 Store Quadrupleword Extended

DFX 000416 Deposit Field Extended

SCS 000444 Set Code Segment

LQAS 000445 Load Quadrupleword via A from SG *

SQAS 000446 Store Quadrupleword via A to SG *

Guardian Programming Reference Summary for C—522630-00117-16

Page 339: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Branching

Moves, Compares, Scans, and Checksum Computations

BIC -10--- Branch if Carry

BUN -104-- Branch Unconditionally

BOX -1-4-- Branch on Index

BGTR -11--- Branch if CC Greater

BEQL -12--- Branch if CC Equal

BGEQ -13--- Branch if CC Greater or Equal

BLSS -14--- Branch if CC Less

BAZ -144-- Branch if A Zero

BNEQ -15--- Branch if CC Not Equal

BANZ -154-- Branch if A Not Zero

BLEQ -16--- Branch if CC Less or Equal

BNOV -164-- Branch if no Overflow

BNOC -17--- Branch if no Carry

BFI 000030 Branch Forward Indirect

MNGG 000226 Move Words While Not Duplicate

CDG 000366 Count Duplicate Words

MOVW 026--- Move Words

MOVB 126--- Move Bytes

COMW 0262-- Compare Words

COMB 1262-- Compare Bytes

SBW 1264-- Scan Bytes While

SBU 1266-- Scan Bytes Until

MNDX 000227 Move Words While Not Duplicate, Extended

XSMX 000333 Checksum Extended Block

XSMG 000343 Compute Checksum in Current Data

CDX 000356 Count Duplicate Words Extended

MVBX 000417 Move Bytes Extended

MBXR 000420 Move Bytes Extended Reverse

MBXX 000421 Move Bytes Extended, and Checksum

CMBX 000422 Compare Bytes Extended

Guardian Programming Reference Summary for C—522630-00117-17

Page 340: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Program Register Control

Routine Calls/Returns

Interrupt System

Bus Communication

SETL 000020 Set L Register

SETS 000021 Set S Register

SETE 000022 Set ENV Register

SETP 000023 Set P Register

RDE 000024 Read ENV Register

RDP 000025 Read P Register

STRP 00010- Set Register Pointer

ADDS 002--- Add to S Register

CCL 000015 Set CC Less

CCE 000016 Set CC Equal

CCG 000017 Set CC Greater

PCAL 027--- Procedure Call

XCAL 127--- External Procedure Call

SCMP 000454 Set Code Map

DPCL 000032 Dynamic Procedure Call

EXIT 125--- Exit from Procedure

DXIT 000072 DEBUG Exit *

BSUB -174-- Branch to Subprocedure

RSUB 025--- Return from Subprocedure

RIR 000063 Reset INT Register *

XMSK 000064 Exchange MASK Register *

IXIT 000071 Exit from Interrupt Handler *

DISP 000073 Dispatch *

RIBA 000440 Read INTA and INTB Registers *

TOTQ 000056 Test Out Queues **

SEND 000065 Send Packet *

Guardian Programming Reference Summary for C—522630-00117-18

Page 341: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Input/Output

Miscellaneous

RSW 000026 Read Switch Register

SSW 000027 Set Switch Register

EIO 000060 Execute I/O *

IIO 000061 Interrogate I/O *

HIIO 000062 High-Priority Interrogate I/O *

RCHN 000447 Reset I/O Channel *

LIOC 000457 Load IOC *

SIOC 000460 Store IOC *

XIOC 000462 Exchange IOC entries *

RIOC 000510 Read EIOC table entry *

WIOC 000511 Write EIOC table entry *

EIOC 000512 Exchange EIOC table entries *

NOP 000000 No Operation

RCLK 000050 Read Clock

RCPU 000051 Read Processor Number

BPT 000451 Instruction Breakpoint Trap

RUS 000461 Read Micro State *

BIKE 000464 Bicycle While Idle *

Guardian Programming Reference Summary for C—522630-00117-19

Page 342: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Resource Management

MXON 000040 Mutual Exclusion On *

MXFF 000041 Mutual Exclusion Off *

SNDQ 000052 Signal a Send Is Queued *

SFRZ 000053 System Freeze *

DOFS 000057 Disk Record Offset **

DLEN 000070 Disk Record Length **

HALT 000074 Processor Halt *

PSEM 000076 "P" a Semaphore *

VSEM 000077 "V" a Semaphore *

VWCS 000401 Verify LCS *

WWCS 000400 Write LCS *

RWCS 000402 Read LCS *

FRST 000405 Firmware Reset *

RSMT 000436 Read from Operations & Service Processor *

WSMT 000437 Write to Operations & Service Processor *

RPT 000442 Read Process Timer *

SPT 000443 Set Process Timer *

BCLD 000452 Bus Cold Load *

SRST 000455 Soft Reset *

DDTX 000456 DDT Request *

Guardian Programming Reference Summary for C—522630-00117-20

Page 343: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Memory Management

List Management

Trace and Breakpoints

MAPS 000042 Map In a Segment *

SMAP 000067 Set Map *

CRAX 000423 Convert Relative to Absolute Extended *

RSPT 000424 Read Segment Page Table Entry *

WSPT 000425 Write Segment Page Table Entry *

RXBL 000426 Read Extended Base and Limit *

SXBL 000427 Set Extended Base and Limit *

LCKX 000430 Lock Down Extended Memory *

ULKX 000431 Unlock Extended Memory *

CMRW 000432 Correctable Memory Error Read/Write *

SVMP 000441 Save Map Entries *

BNDW 000450 Bounds Test Words *

SCPV 000463 Set Current Process Variables *

ASPT 000470 Address of Segment Page Table Header *

DLTE 000054 Delete Element from List *

INSR 000055 Insert Element into List *

MRL 000075 Merge onto Ready List *

FTL 000206 Find Position in Time List *

DTL 000207 Determine Time Left for Element

TRCE 000217 Add Entry to Trace Table *

SMBP 000404 Set Memory Breakpoint *

Guardian Programming Reference Summary for C—522630-00117-21

Page 344: Guardian Programming Ref for C

TNS Instruction Set TNS Alphabetical List of Instructions

Guardian Programming Reference Summary for C—522630-00117-22