Skip to main content

Full text of "DTIC ADA227826: Geometric Modeling Application Interface Program"

See other formats


LOAN DOCUMENT 

S PHOTOGRAPH THIS SHEET 


OTIC f'LE COPY 


INVENTORY 


I •>. vi f j*' 


NTIJ GRAM 

JS 

DTIC TRAC 

3 

UNANNOUNCED 

JUSTIFICATION 




BY 


.VAllABIUTY CODES 


DISTRIBUTION/ 


DISTRIBUTION STAMP 


DOCUMENT IDENTIFICATlONi 

A!0V / 


DATE ACCESSIONED 



DATE RETURNED 


90 1 : 


130 


DATE RECEIVED IN DTIC 


REGISTERED OR CERTIFIED NUMBER 


PHOTOGRAPH THIS SHEET AND RETURN TO DTIC-FDAC 


OTK£X > nA 


fraanouuHm 


LOAN DOCUMENT 


w po > n a h « & w r o z > K 
















AD-A227 826 


WRDC-TR-90-8024 


GEOMETRIC MODELING APPLICATION INTERFACE PROGRAM 


MODEL ACCESS SOFTWARE USER'S MANUAL 


United Technologies Corporation 
Pratt and Whitney 
Government Products Division 
P.0. Box 9600 

West Palm Beach, Florida 33410-9600 


NOVEMBER 1990 


Final Report For Period August 1985 - March 1989 


Approved for public release; distribution unlimited 


MANUFACTURING TECHNOLOGY DIRECTORATE 
WRIGHT RESEARCH AND DEVELOPMENT CENTER 
AIR FORCE SYSTEMS COMMAND 

WRIGHT-PATTERSON AIR FORCE BASE, OHIO 45433-6533 





NOTICE 


When Government drawings, specifications, or other data are used for 
any purpose other than in connection with a definitely Government-related 
procurement, the United States Government incurs no responsibility or any 
obligation whatsoever. The fact that the government may have formulated or 
in any way supplied the said drawings, specifications, or other data, is not 
to be regarded by implication, or otherwise in any manner construed, as 
licensing the holder, or any other person or corporation; or as conveying 
any rights or permission to manufacture, use, or sell any patented invention 
that may in any way be related thereto. 


This report is releasable to the National Technical Information Service 
(NTIS). At NTIS, it will be available to the general public, including 
foreign nations. 


This technical report has been reviewed and is approved for publica¬ 
tion. 

Charles Gilman 

Project Manager Computer-Integrated Mfg. Branch 


FOR THE COMMANDER 



BRUCE A. RASMUSSEN 

Chief, Integration Technology Division 
Manufacturing Technology Directorate 



If your address has changed, if you wish to be removed from our mailing 
list, or if the addressee is no longer employed by your organization please 
notify WRPC/ M T! , WPAFB, OH 45433 - 6533 to help us maintain a current 
mailing list. 


Copies of this report should not be returned unless return is required by 
security considerations, contractual obligations, or notice on a specific 
document. 






■ UNCLASSIFIED 


SC 




■ rm TU* T .l ( 1 TOK- 


Unclassified 


REPOST DOCUMENTATION PAGE 




'fTjiT^TTr*.T?r<TTTff/Tn«^W:T^ 


MI 

FR 20359 


T NUMB 


Approved for public release; distribution 
is unlimited 




r^rsr*T3* j J:Ti > r :Tn i (•:: 


United Technologies Corporation 

Pratt i Whitney 

Government Products Division 




(If applicable) 
(PBW) 


c. ADORE 


ty. State and 


uttnr.’ 


(If applicable) 


P.0. Box 9600 
West Pal* Beach, 
Florida 33410-9600 


•. NAME OF FUND1NG/SP0NS0R1 
ORGANIZATION 


8c. ADDRESS (City, State and ZIP 


11. TITLE (Include Security Classification) 

GEOMETRIC MODELING APPLICATIONS INTERFACE PROGRAM 


WRDC-TR-90-8024 


I : rT r *JTO 4 M.I C’-N-: m i w 


Wright Research and Development Center 
Manufacturing Technology Directorate 


irwiiirjii 


ADDRESS (City, State and ZIP Code) 

Wright-Patterson AFB OH 45433-6533 


UREMENT INSTRUMENT IDENTIFICATION NUMBER 
F33615-85-C-5122 



■rr'T-T<TTT4BI«TgaTMrTcgr»l-f 


PROGRAM 
ELEMENT NO. 


PROJECT 

NO. 

■H 

5602 

6 


WORK UNIT 
NO. 


12. PERSONAL AUTHOR(S) 

D. Emerson, C. Magnuson, 

C. Van Wie, R. Heldoefe. P. I 

)orr 



. TYPE OF 

Final 


13b. TIME COVEREO 

FROM 1 Auo 85 TO 31 Mar 89 

14. DATE OF REPORT (Yr., Mo., Oay) 

November 1990 

15. PAGE COUNT 
195 


UPPLEMENTARY NOTATION 




OSATI CODE 


GROUP SUB. GR. 


BJECT TERMS (Continue on reverse if necessary and identify 
by block number) 

Geometric Modeling Applications Interface Program 
Product Definition Data Interface 
Turbine Blades and Disks 


19. ABSTRACT (Continue on reverse if necessary and identify by block number) 

This User's Manual provides a guide for the use of Model Access Software for the Computer Program Configuration 
Item (CPCI) Identified as the GMAP (Geometric Modeling Applications Interface Program), U.S. Air Force 
Contract F33615-85-C-5122. It Includes descriptions of the Model Access Software and Naaie Value Interface 
capabilities. 


no f.ro jrcnranro-i n hitta i 


UWTi}rna«.T«r;ii r»*Fvuijr.ri irr: 


UNCLASSIF1E0AINLIMITED JL SAME AS RPT. 


a. NAME OF RESPONSIBLE INDIVIDUAL 


- UNCLASSIFIED 


David Judson 


DO FORM 1473 , 83 APR 


OTIC USERS 


COITION OF 1 JAN 73 IS OBSOLETE. 



22c. OFFICE SYMBOL 

WRDC/MTI 


UNCLASSIFIED _ 

SECURITY CLASSIFICATION OF THIS PAGE 



































UNCLASSIFIED 


Security classification of this page 


18. Subject Terms (Continued) 


Product Life Cycle 
Engineering 
Manufacturing 
Interface 
Exchange Format 


CAO 

CAM 

CIM 

IBIS 

RFC 


System Translator 
Schema Manager 
Model Access Software 
Name/Value Interface 








r 


Cl UM560240031U* 
July 1989 


EQREWflBB 


This Model Access Software User's Manual describes work performed under 
Air Force Contract F33615-85-C-5122, Geometric Modeling Applications 
Interface Program (GMAP), covering the period 1 August 1985 to 31 July 1988. 
This User's Manual provides a guide for the use of Model Access Software 
under this contract which is sponsored by the Computer Integrated 
Manufacturing Branch, Materials Laboratory, Air Force Systems Command, Wright 
Air Force Base, Ohio 45433-6533. The GMAP Project Manager for the Air Force 
is Mr. Charles Gilman. 

The primary contractor is Pratt & Whitney, an operating unit of United 
Technologies Corporation. Mr. Richard Lopatka is managing the GMAP project 
at Pratt & Whitney. Ms. Linda Phillips is the Program Integrator. Mr. John 
Hamill is the Deputy Program Manager. 

McDonnell Aircraft Company is the subcontractor responsible for the Model 
Access Software work. Mr. Jerry Weiss is the GMAP Program Manager at 
McDonnell Aircraft and Mr. Herb Ryan is the Deputy Program Manager. 


HOTE: The number and date in the upper right corner of each page in this 
document indicate that It has been prepared in accordance to the 
ICAM CM Life Cycle Documentation requirements for a Configuration 
Item (Cl). 


ui 




Cl UM560240031U 
July 1989 

TABLE OF CONTENTS 

Pars 

SECTION 1. SCOPE. 1-1 

1.1 Identification... 1-1 

1.2 Introduction. 1-1 

1.3 Other System Manuals. 1-1 

1.4 Approach. 1-2 

SECTION 2. REFERENCES. 2-1 

2.1 Reference Documents. 2-1 

2.1.1 Military. 2-1 

2.1.2 Commercial......... 2-3 

2.1.3 Standards Organizations..... 2-4 

2.2 Terms and Acronyms....... 2-4 

2.2.1 Terms Used In GMAP. 2-4 

2.2.2 Acronyms Used In GMAP. 2-18 

SECTION 3. SYSTEM OVERVIEW. 3-1 

3.1 System Architecture. 3-1 

3.1.1 System Interfaces.. 3-1 

3.1.2 System Environment... 3-1 

3.2 Schema Manager. 3-3 

3.2.1 Physical Schema. 3-3 

3.3 EF. 3-3 

3.4 System Translator. 3-3 

3.5 Model Access Software. 3-3 

3.5.1 Data Item... 3-4 

3.5.1.1 Entity. 3-4 

3.5.1.2 List. 3-6 

3.5.2 Interface Parameters... 3-6 

3.5.2.1 Data-Name Parameters. 3-6 

3.5.2.2 Data-Type Parameters. 3-7 

3.5.2.3 Formal Data Types. 3-7 

3.5.3 Memory Manager. 3-8 

3.6 NVI. 3-8 

SECTION 4. MODEL ACCESS SOFTWARE (MAS) OPERATIONS 

AND ENVIRONMENT. 4-1 

4.1 Introduction. 4-1 

4.2 Initialization/Deletion of the 

MAS Working Form (WF). 4-2 

4.3 Entity Operations. 4-5 

4.3.1 Create Operations..... 4-5 

4.3.2 Query Operations. 4-8 

4.3.3 Update Operations. 4-12 

4.3.4 Delete Operations. 4-14 


iv 


OOKTBOW 













































Cl UM560240031U 
July 1989 


TABLE OF CONTENTS (contd.) 


Bu s 


4.3.5 Activate Operations. 4-21 

4.3.6 Application Flag Operations. 4-25 

4.4 List Operations. 4-38 

4.4.1 Create Operations - Application Lists. 4-39 

4.4.2 Query Operations - Application Lists 

and Constituent Lists. 4-54 

4.4.3 Update Operations - Application Lists 

and Constituent Lists. 4-61 

4.4.4 Update Operations - Application Lists Only. 4-68 

4.4.5 Boolean Operations - Application Lists 

and Constituent Lists..... 4-73 

4.4.6 Delete Operations - Application Lists Only. 4-77 

4.5 Execute Operations. 4-82 

4.6 General Purpose Utilities. 4-94 

4.7 Special Purpose Utilities. 4-99 ' 

4.8 IBM/MVS Environment. 4-105 

4.8.1 Compiling Considerations. 4-105 

4.8.2 Considerations When Using the XEQ 

Soutines (MAEXEQ, MALXEQ, MAKXEQ, 

MAECXQ, MAEUXQ, MALSRT). 4-105 

4.8.3 Linking Considerations. 4-106 

4.9 VAX/VMS Environment. 4-106 

4.9.1 Compiling Considerations. 4-106 

4.9.2 Considerations When Using the XEQ 

Soutines (MAEXEQ, MALXEQ, MAKXEQ, 

MAECXQ, MAEUXQ, MALSST). 4-107 

4.9.3 Linking Considerations. 4-108 

SECTION 5. NAME VALUE INTERFACE. 5-1 

5.1 Overview... 5-1 

5.2 Direct Query/Store.. 5-1 

5.2.1 Function... 5-1 

5.2.2 Direct Query Format. 5-3 

5.2.3 Direct Store Format. 5-4 

5.3 Procedural Query. 5-4 

5.3.1 Function. 5-4 

5.3.2 Format... 5-6 

5.4 Utilities. 5-7 

5.4.1 Function... 5-7 

5.4.2 Attribute Data Type Query Format. 5-7 

5.5 IBM/MVS Environment. 5-9 

5.5.1 Compiling Considerations. 5-9 

5.5.2 Include Files. 5-9 










































Cl UM560240031U 
July 1989 


5.5.3 Linkage Considerations. 5-10 

5.5.4 Processing Considerations. 5-10 

5.6 VAX/VMS Environment. 5-12 

5.6.1 Compiling Considerations. 5-12 

5.6.2 Include Files. 5-12 

5.6.3 Linkage Considerations. 5-13 

5.6.4 Processing Considerations. 5-14 

APPENDIX A MODEL ACCESS SOFTWARE (MAS) CALLING 

PARAMETER TYPE I*DEX. A-l 

APPENDIX B ALPHABETICAL MODEL ACCESS SOFTWARE (MAS) 

ROUTINE INDEX. B-l 

APPENDIX C MODEL ACCESS SOFTWARE (MAS) RETURN CODE INDEX. C-l 

APPENDIX D GENERAL TECHNIQUES/GUIDELINES. D-l 

APPENDIX E RUN-TIME ENVIRONMENT. E-l 

APPENDIX F SAMPLE PROGRAMS. F-l 
















Cl UM560240031U 
July 1989 


LIST OF ILLUSTRATIONS 

Figure Title Page 

3-1 GMAP/PDDI System Architecture. 3-2 

3- 2 LINE: An Entity With Constituents. 3-5 

4- 1 MAS Interface Operations. 4-1 

4-2 Execute Operation. 4-83 








Cl UM560240031U 
July 1989 


LIST OF TABLES 


Table Title Pa ge 

4-1 CREATE ROUTINES. . . 4-5 

4-2 QUERY ROUTINES. 4-8 

4-3 UPDATE OPERATIONS. 4-12 

4-4 DELETE RULES. 4-15 

4-5 DELETE ROUTINES. 4-16 

4-6 ACTIVATE ROUTINES. 4-21 

4-7 APPLICATION FLAG OPERATIONS. 4-25 

4-8 CREATE ROUTINES. 4-39 

4-9 QUERY OPERATIONS - APPLICATION AND 

CONSTITUENT LISTS. 4-54 

4-10 UPDATE OPERATIONS - APPLICATION AND CONSTITUENT LISTS. 4-61 

4-11 UPDATE OPERATIONS - APPLICATION LISTS. 4-68 

4-12 BOOLEAN ROUTINES. 4-73 

4-13 DELETE ROUTINES. 4-77 

4-14 EXECUTE ROUTINES. 4-84 

4-15 GENERAL PURPOSE UTILITIES. 4-94 

4-16 SPECIAL PURPOSE UTILITIES. 4-99 



viii 


















Cl UM560240031U 
July 1989 


SECTION 1 
SCOPE 


1.1 Identification 

This User’s Manual provides a guide for the use of Model Access Software 
developed for the Product Definition Data Interface (Project 5601) and the 
Name Value Interface software developed for the Geometric Modeling 
Applications Interface Program. The Product Definition Data Interface 
project was developed under Air Force Contract F33516-82-C-5036 and the 
Geometric Modeling Applications Interface Program was developed \ .der Air 
Force Contract F33615-85-C-5122. 

1.2 Introduction 

Model Access Software capabilities documented in this manual include: 
o Access Software Initialization 
o Entity Operations 
o List Operations. 


NVI capabilities documented in this manual include: 
o Direct Query/Store 
o Procedural Query. 


This software was developed on IBM 43xx and 308xx computers and migrated 
to DEC VAX 11/780 and other computers. The environmental requirements are 
described in Section 3. 

This manual does not address local (native) system or computing 
environment documentation. 

This manual addresses IBM procedures and terminology only. 

1.3 Other System Manuals 

An associated Operator’s Manual (0M560240001U) describes the system 
operation and installation procedures. Procedures are also Included for 


l-l 


ommioum 







Cl UM560240031U 
July 1989 


migrating the software from IBM/MVS to other computer systems (i.e., VAX). 

The Operator’s Manual is intended for use by computer operators and 
programming personnel. 

An associated Translator User's Manual (UM560240021U) is provided for 
users of the System Translator, and a Schema Manager Users Manual 
(UM560240011U) is provided for users of the Schema Manager. 

The Software Components Product Specification (PS560240032U) provides 
routine descriptions, data dictionary listings and system messages for system 
maintenance purposes. 


1.4 Appro ac h 

This User's Manual is divided into five main sections and six 
appendices: 

Section 1 - Scope of this document. 

Section 2 - Reference documentation applicable to GMAP and this 
document. 

Section 3 - The PDDI/GMAP architecture at a high level and 
introduction to the use of the Model Access Software. 

Section 4 - Entity and List Operations needed to access the data 
structures passed back to the Application program. 

Section 5 - Description of the use of the Name Value Interface. 


Ap pend i ces : 


Appendix A 
Appendix B 
Appendix C 
Appendix D 
Appendix E 
Appendix F 


Model Access Software Calling Parameter Index 
Alphabetical Model Access Software Routine Index 
Model Access Software Return Code Index 
General Techniques/Guidelines 
Run Time Environment 
Sample Programs. 


12 





Cl UM560240031U 
July 1989 


SECTION 2 
REFERENCES 


2.1 Reference Documents 

The following technical reports, specifications, standards, and other 
documents have been referred to or are relevant to this Model Access 
Software User's Manual. 

2.1.1 Militaryi 

Integrated Computer Aided Manufacturing (ICAM) Architecture, Vol. 4, 
Function Modeling Manual (IDEF0), USAF Report No. AFWAL-TR-81-4023, 

June 1981. 

Integrated Computer Aided Manufacturing (ICAM) Architecture, Vol. 5, 
Information Modeling Manual (IDEF1), USAF Report No. AFWAL-TR-81-4023, 
June 1981. 

Integrated Computer Aided Manufacturing (ICAM) Documentation Standards, 
IDS 150120000C, September 1983. 

PDDI System Specification, Product Definition Data Interface (PDDI) 
Project 5601, Contract F33516-82-5036, July 1984. 

PDDI System Specification-Draft Standard, Product Definition Data 
Interface (PDDI), Project 5601, Contract F33516-82-5036, July 1984. 

Information Modeling Manual IDEF-Extended (IDEF1X) Integrated 
Information Support System (IISS), ICAM Project 6201, Contract 
F33615-80-C-5155, December 1985. 

Interim Technical Report No. 1 (ITR560240001U) 

"Geometric Modeling Applications Interface Program" February 1986 
(Period 1 August 1985 - 31 October 1985). 

Interim Technical Report No. 2 (ITR560240002U) 

"Geometric Modeling Applications Interface Program" May 1986 
(Period 1 November 1985 - 31 January 1986). 

Geometric Modeling Applications Interface Program (GMAP) Scoping 
Document, Cl SD560240001U, May 1986. 

Interim Technical Report No. 3 (ITR560240003U) 

"Geometric Modeling Applications Interface Program" August 1986 
(Period 1 February 1986 - 30 April 1986). 


2-1 


COMlWMyW 




Cl UM560240031U 
July 1989 


Interim Technical Report No. 4 (ITR560240004U) 

"Geometric Modeling Applications Interface Program" November 1986 
(Period 1 May 1986 - 31 July 1986). 

Geometric Modeling Applications Interface Program (GMAP) Needs Analysis 
Document, Cl NAD560240001U, November 1986. 

Interim Technical Report No. 5 (ITR560240005U) 

"Geometric Modeling Applications Interface Program" January 1987 
(Period 1 August 1986 - 31 October 1986). 

Geometric Modeling Applications Interface Program (GMAP) System 
Requirements Document, Cl SRD560240001U, February 1987. 

Geometric Modeling Applications Interface Program (GMAP) State of the 
Art Document, Cl SAD560240001U, March 1987. 

Interim Technical Report No. 6 (ITR560240006U) 

"Geometric Modeling Applications Interface Program" May 1987 
(Period 1 November 1986 - 31 January 1987> 

Geometric Modeling Applications Interface Program (GMAP) System 
Specification (Volumes I-IV), Cl SS560240001U, July 1987 

Interim Technical Report No. 7 (ITR560240007U) 

"Geometric Modeling Applications Interface Program," August 1987 
(Period 1 February 1987 - 30 April 1987). 

Geometric Modeling Applications Interface Program (GMAP) System Design 
Specification, Cl SDS560240001U, November 1987. 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface Development Specification, Cl DS560240011U, November 
1987. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface Development Specification, Cl 
DS560240021U, November 1987. 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface As-designed Product Specification, Cl FS560240011U, 
December 1987. 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface Unit Test Plan, Cl UTP560240011U, December 1987. 


2-2 






Cl UM560240031U 
July 1989 


Interim Technical Report No. 8 (ITR560240008U) 

"Geometric Modeling Applications Interface Program," December 1987 
(Period 1 May 1987 - 31 July 1987). 

Interim Technical Report No. 9 (ITR560240009U) 

"Geometric Modeling Applications Interface Program," March 1988 
(Period 1 August 1987 - 31 October 1987). 

Geometric Modeling Applications Interface Program (GMAP) System Test 
Plan, Cl STP560240001U, March 1988. 

Product Definition Data Interface (PDDI)/Geometric Modeling Applications 
Interface Program (GMAP) Deliverables Roadmap Document, March 1988. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface Unit Test Plan, Cl UTP560240021U, 

March 1988. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface As-designed Product Specification, Cl 
PS560240021U, March 1988. 

Geometric Modeling Applications Interface Program (GMAP) System 
Component As-designed Product Specification, Cl PS560240031U, March 1988 

Interim Technical Report No. 10 (ITR560240010U) 

"Geometric Modeling Applications Interface Program," August 1988 
(Period 1 November 1987 - 31 January 1988). 

Interim Technical Report No. 11 (ITR560240010U) 

"Geometric Modeling Applications Interface Program," August 1988 
(Period 1 February 1988 - 30 April 1988). 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface User Operator Manual, Cl U/OM560240011U, August 1988 

Interim Technical Report No. 12 (ITR560240012U) 

"Geometric Modeling Applications Interface Program" October 1988 
(Period 1 May 1988 - 31 July 1988). 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface Unit Test Report, Cl UTR560240011U, November 1988. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface Unit Test Report, Cl UTR5602421U, 
November 1988. 


2-3 


COKTHOIV** 





Cl UM560240031U 
July 1989 


Geometric Modeling Applications Interface Program (OIAP) System 
Translator User Manual, Cl UM560240021U, November 1988. 

Geometric Modeling Applications Interface Program (GMAP) to Retirement 
for Cause Interface As Built Product Specification, Cl PS560240012U, 
February 1989. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface As-built Product Specification, Cl 
PS560240022U, February 1989. 

Geometric Modeling Applications Interface Program (GMAP) System 
Components Operator's Manual, Cl OMS60240001U, February 1989. 

Geometric Modeling Applications Interface Program (GMAP) to Integrated 
Blade Inspection System Interface User/Operator Manual, Cl 
U/OM560240021U, February 1989. 

Geometric Modeling Applications Interface Program (GMAP) Schema Manager 
User's Manual, Cl UM560240011U, February 1989. 

Interim Technical Report No. 13 (ITR560240013U) 

"Geometric Modeling Applications Interface Program" February 1989 
(Period 1 August 1988 - 31 October 1988). 

Interim Technical Report No. 14 (ITR560240014U) 

"Geometric Modeling Applications Interface Program" July 1989 
(Period 1 November 1988 - 31 January 1989). 

Geometric Modeling Applications Interface Program (GMAP) Model Access 
Software User Manual, Cl UM560240031U, July 1989. 

Geometric Modeling Applications Interface Program (GMAP) PDD Editor 
User/Operator Manual, Cl U/OM560240031U, July 1989. 

Demonstration Model Descriptions for Geometric Modeling Applications 
Interface Program (GMAP), Cl TTD560240001U, July 1989. 

Product Information Exchange System (PIES) User Manual for Geometric 
Modeling Applications Interface Program (GMAP), Cl TTD560240002U, July 
1989. 


2.1.2 Cwwmclal 

A Practical Guide to Splines . C. de Boor, Applied Mathematical Sciences, 
Vol. 27, Springer-Verlag. 


2-4 





Cl UM560240031U 
July 1989 


Design of Database Structures. T. J. Teorey and J. P. Fry, 

Prentice-Hall, Inc., Englewood Cliffs, R.J. 

Differenti al Geometry of Curves and Surfaces. M. P. de Carmo, 
Prentice-Hall, Inc., 1976. 

IDEF1X Readers Reference . D. Appleton Company, December 1985. 

Identification of Product Definition Data Ina Manufacturing-Enterprise 
— A Case Study . S. Lessard, United Technologies Research Center and R. 
Disa, Pratt & Whitney, March 1986. 

Use of Product Models in a CIM Environment . D. Koziol Emmerson and K. 
Perlotto, Pratt & Whitney, March 1987. 

Technical Issues in Product Data Transfer . Richard Lopatka, Pratt & 
Whitney, September 1987. 

Implementation of GMAP Technologies for Logistic Support Applications . 
Donald L. Deptovicz, Pratt & Whitney, January 1988. 

Barriers to PDES Approval . Anthony Day, Sikorsky, and Richard Lopatka, 
Pratt & Whitney, April 1988. 

PDD; Implementation Issues . Diane Emmerson and Priscilla Blasko, United 
Technologies Corporation, Proceedings of AUTOFACT '88, October 1988. 

Geometric. Modeling-Applications Interface Program; A Prototype for 
Active File Exchange . Linda Phillips and Diane Emmerson, United 
Technologies Corporation, Rational Computer Graphics Association 
Conference, April 1989. 


2.1.3 Standards Organizations 

ANSI Y14.5M, Dimensioning and Tolerancing. 

"The ANSI/X3/SPARC DBMS Framework Report of the Study Group on Database 
Management Systems," Information Systems . Vol. 3, pp. 173-191, 1978. 

The Second Draft Report of the Ad Hoc Committee on the Content and 
Methodology of the IGES Version 3 (The Second PDES Report), K. Brauner 
and D. Briggs, Rovember 1984. 

EXPRESS - A Language for Information Modeling, ISO, TC184/SC4/WG1, 
January 1986. 


2-5 


OOKTWBUW* 





Cl UM560240031U 
July 1989 


The STEP File Structure, ISO, TC184/SC4/WG1, January 1987. 

Mapping from EXPRESS to Physical File Structure, ISO, TC184/SC4/WG1, 
January 1987. 


2.2 Terms and Acronyms 

A glossary of terms frequently used in GMAP which may be included in 
this Model Access Software User's Manual is provided below. Some reference 
notes applicable to these definitions are presented after the glossary. A 
list of acronyms and abbreviations used in GMAP is also included in this 
section. 

2.2.1 Terms Used in GMAP 


Accept/Reject/Incomplete Hotice — A display on the cell computer that 
indicates the final status of the engine disk. 

Accept = Acceptable within tolerance specified by engine 

manufacturer 

Reject = Rejected because of flaw(s) outside the range of 

acceptable tolerances 

Incomplete * Part cannot be inspected 

Access Software — A set of routines for creating, managing and querying 
an incore Working Form model. 

Angular — An angular size tolerance is used to tolerance the size of an 
angular feature independent of its angular location along an arc. 

Application — A method of producing a specific result. 

Application Request — A request initiated by an application program, 
either through batch or interactive processing, which will interrogate the 
model through the PDDI Access Software to obtain or operate on specific 
information regarding the model and its components or elements. 

Application Requested Data — The data which fulfills the application's 
original request and which is in the proper format and readable by the 
application. 

Architecture — A design or orderly arrangement. 

ASCII — American Standard Code for Information Interchange. 


2-6 





Cl UM560240031U 
July 1989 


As-ls — The present condition. 

Attribute — A quality of characteristics element of any entity having a 
name and a value. 

B-Spline — A spline defined by a control polygon, B-spline basis 
functions, and an associated knot vector. A Bezier curve is a special case 
of a B-spline; a nurb is the most general case of a B-spline. 

Bezier Curve — A type of curve defined by a set of vertices called a 
control polygon and a set of basis functions. The basis functions are known 
as Bernstein polynomials. K vertices define a curve of order K-l. 

Binding — Establishing specific physical references to data structures 
for an application program; may be performed at compile time or at run time. 

Blend — A smooth, continuous transition from one surface to another. 

Boundary Representation — A topology imposed on 3-D geometric entities to 
yield a general solid model. That model describes an object by describing 
its boundary area. 

Body of Revolution (BOR) Representation — A topology in which an object 
is represented as the volume swept by a curve rotated about a line. This is 
a boundary representation in which the curve represents the surface area of 
the object. 

Bounded Geometry — Geometry that has limits defined by its mathematical 
domain or range. 

Calibration Block Parameters (Scale Factors) — Nondestructive test 
parameters used to adjust a specific cell. These parameters are obtained 
from the calibration blocks located at each cell. 

Circumferential — A circumferential tolerance specifies the tolerance 
zone within which the average diameter of a circular feature must lie. The 
average diameter is the actual circumference divided by pi (3.14159). A 
circumferential tolerance is a specific example of a peripheral or perimeter 
tolerance for a general curve. 

Class — A collection of entities that are alike in some manner. 

CLIST — IBM Command lists. 

Composite Curve — A group of curve segments that are C° continuous. 


2-7 





Cl UM560240031U 
July 1989 


Compound Feature Kepresentation — An enumerative feature representation 
In which at least one component is itself a feature. For example, a bolt 
hole circle might be represented as a list of individual hole features. 

Concentricity (Generic) — A concentricity tolerance specifies a 
cylindrical tolerance zone within which the axis of a feature oust lie, 
where the axis of the zone coincides with the axis of the datum. 

Conceptual Schema — Formally specified global view that is processing 
independent, covering information requirements and formulation of 
independent information structures. A neutral view of data, usually 
represented in terms of entities and relations. 

Conic — A quadratic curve represented in the most general case by the 
equation: 


Ax 2 4 Bxy + Cy 2 + Dx + Ey + F = 0. 

A conic may be a circle, line, ellipse, parabola, or a hyperbola 
depending on the coefficients, A, B, C, D, E, and F. 

Constraints (Generic) — An assertion to explicitly specify data meaning 
or semantics. 1 (Notes appear at the end of this section.) 

Context-Free Grammar — The syntax of the language gives a precise 
specification of the data without interpretation of it. 

Constituent — A specific instance of an entity that is used in the 
definition of some other entity. 

Data Dictionary — A catalog of all data elements in a design, giving 
their name, definition, format, source, and usage. May also include data 
types and value limits. 

Defining Airfoil Sections — A planar or conical section that depicts an 
airfoil profile. Defining airfoil sections are those that meet aerodynamic 
requirements. Other intermediate sections are added for Manufacturing 
purposes. 

Dimension — A part dimension is a quantifiable value expressing size, 
form, or location. 

Domain — The set of values permissible in a given context. 

Dynamic Allocation — The allocation (and de-allocation) of memory 
resources as required by the application. The opposite is static allocation 
where a fixed size segment of memory is available to the application. 


2-8 


cokthoww 









Cl UM560240031U 
July 1989 



Eddy Current Cell — Hardware used to perform an Eddy current inspection 
operation (surface flaws). 

Eddy Current Inspection — An Inspection method used to detect internal 
potential flaws on a disk. It is based on the principle of sending 
electromagnetic signals to a target area on a part and 
detecting/interpreting reflection (Eddy current) from the target. 

Eddy Current Scan Flan — An interpreter code program controlling the Eddy 
current inspection of a particular geometry. 

Eddy Current/Ultrasonic Flaw Data Printout — A printout containing size 
and location information about specific flaw(s) (both critical and 
noncritical) associated with a particular part. 

Entity — A description of a person, place, or thing, about which 
information is kept. 

External Beference — A reference to some quantity of data that exists 
somewhere outside the scope of the immediate body of information. 

Feature — A part feature in the dimensioning and tolerancing context is a 
feature in the sense of ANSI Y14.5M, that is, a physical component portion 
of a part, such as a surface, hole, slot, and so on, that is used in a 
tolerancing situation. In the dimensioning and tolerancing context, a 
feature consists of individual or groups of basic shape elements used to 
define the physical shape of an item. This general dimensioning and 
tolerancing use of features is to be distinguished from Features. The word 
"features" alone implies dimensioning and tolerancing features. The term 
"form feature" is described below. 

Feature Pattern — A geometric pattern of occurrences of similar form 
features, for example, a circular pattern of scallops, a rectangular array 
of holes. 

Feature Bepresentation (Generic) — A description of a form feature within 
the context of a geometric model. 

Feature Type — A name applied to a form feature that is suggestive of its 
shape and size, for example, hole, slot, web. 

Feature of Size (Generic) — A feature of size provides a geometric 
location capable of being referenced for use with datums and tolerances. A 
feature of size can be a GMAP feature, or other referenceable shape elements 
of a part model that are symmetric about a point, line, plane, axis, curve, 
and so on. When a feature of size is used in a relationship with a 
tolerance or datum, its feature of symmetry is the implied reference. 




Cl UM560240031U 
July 1989 


Flat Pattern Bepresentation (Extrusion Representation) — A topology in 
which an object is represented as the volume swept by a planar polygon 
moving in a direction normal to its plane. The polygon may have internal 
polygon represent the surface area of the object. 

Flaw Characteristics — Location, length, width, depth, and nondestructive 
test parameters associated with a specific flaw. 

Flaw Data Packet — Packet containing nonevaluated flaw data. Rote that 
the packet can contain zero flaws. 

Flaw Orientation — The direction of the major characteristic of the flaw 
with respect of the part coordinate system. (See the notes section at the 
end of this glossary.) 

Flaw Suspect Location — The coordinate location of a possible flaw 
detected during a survey mode inspection (six-axis position of ultrasonic 
cell, seven-axis position of Eddy current cell). 

Form Feature — A portion of a part's geometry that is useful to regard as 
an entity. In a boundary representation context, this is a subset of the 
part's surface area. 

Form Tolerance — Form tolerances are used to control the form of model 
features. A form tolerance specifies the amount that an actual features 
form may vary from nominal. Form tolerance include straightness tolerance, 
flatness tolerance, roundness/circularity tolerance, cylindricity tolerance, 
perpendicularity tolerance, parallelism tolerance, angularity tolerance, 
profile-of-a-line tolerance, profile-of-a-surface tolerance, circular-runout 
tolerance, true-direction tolerance, and mismatch tolerance. 

Functionality — (1) To show that the configuration item has fulfilled the 
specified requirements. (2) The receiving and sending systems can operate 
on the entity in the same manner with the same results within a pre-defined 
tolerance. 

Function Modeling — A description of a system in terms of a hierarchy of 
functions or activities, each level decomposing higher ones into greater 
detail. Functions are named by verbs; nouns related are declared as inputs, 
controls, outputs, and mechanisms. 

Geometric Element (Generic) — An instance of a geometric entity. 

Geometric Group — A group of geometric entities with a name. 

Geometric Model — A part description in terms of its underlying geometric 
elements. The model may be a wireframe, surface, or solid model. 


2-10 


CONTNH/m 





Cl UM560240031U 
July 1989 


Geometric Pattern — A circular or rectangular pattern of geometric 
entities. 

Group Technology Code — An alphanumeric string identifying significant 
characteristics of a product, enabling group technology applications. Also 
known as Part Classification Code. 

Include File — PASCAL source code from another file or library included 
on the compilation of a PASCAL source file. 

Input Data — That information which the application needs to supply in 
order to interrogate or operate on the model. This data may assume only 
these forms prescribed by the PDDI Access Software specification. 

Inspection Cycle — A period for which nondestructive testing inspection 
requirements are defined. 

Inspection Cycle Zone — An entity that is composed of a unique 
combination of zone and inspection cycle. 

Inspection Module Operator — Refers to personnel operating RFC cell(s). 

Instrument Setting Adjustments — Nondestructive testing parameter 
adjustments automatically accomplished via pre- and post-calibration 
operations. These adjustments have to be accomplished within a 
predetermined tolerance. 

Internal Flaw — A subsurface anomaly. 

Internal Flaw Major Characteristic — A vector determined by an agreed 
upon method. 

Example (1): The vector of greatest magnitude from the centroid to a 
boundary of the anomaly. 

Example (2): A vector representing the major axis of the minimum 
ellipsoidal envelope encompassing the anomaly. 

Internal Flaw Tolerance — A unique combination of: 

(a) Internal flaw orientation range. 

(b) Serviceable internal flaw tolerance limits. 

(c) Repairable internal flaw tolerance limits. 


2-11 


OONTAOL/M 






Cl UM560240031U 
July 1989 


Internal Flaw Tolerance Limit — A unique combination of: 

7(a) Maximum diameter. 

(b) Maximum depth below surface. 

(c) Maximum thickness. 

Interpreted Request — Input data which has been appropriately modified 
to conform to the PDOI Access Software's internal data representation so 
that it may be further processed. 

Key Attribute — An attribute or combination of attributes having values 
that uniquely identify each entity instance.2 

Laminates Representation (Generic) — A topology in which an object is 
represented as layers of flat material of known thickness. 

Location Tolerance — Location tolerances specify the allowable variation 
in position of model features. Location tolerances include various forms of 
position tolerancing conventions. These are (true) position, concentricity, 
alignment, rectilinear location, and angular location. 

Logistics Support — The function of procuring, distributing, maintaining, 
replacing, and repairing material in support of a delivered product. 

Machine Coordinate Positions — The probe location with respect to machine 
coordinates. 

Machine Preset Data — Machine coordinate adjustments automatically 
accomplished via pre- and post-calibration operations. These adjustments 
have to be accomplished within predetermined tolerance. 

Metadata — Data about data. Defines the physical schema and record 
formats of the part data. 

Metamodel — A body of data that defines the characteristics of a data 
model or structure. 

Model — A collection of PDD that is transferable, displayable, 
accessible, and equivalent to a Part. The internal representation of the 
application data, as initiated and organized by the user. The model is also 
referred to as the Working Form. 

Model Network Definition — The set of rules and definitions which outline 
in detail the data structure whereby higher order entities may be composed 
of lower order entitles, or constituents, and the lowe* order entities may 
be constituents of one or more higher order entities. 


2-12 


cwmoww 


Cl UM560240031U 
July 1989 


Native System — The PDD and applications in a format that is unique to 
the database of a CAD system. 

Nondestructive Testing Parameters — Parameters used by the Eddy current 
and ultrasonic instruments (examples: amplitude, phase angle, gain, 
threshold, and so on). 

Nonconstructive Feature Representation (Explicit Feature Representation) 

— A feature representation that at least partially depends on a declaration 
that a face, or portion of a face, it "in" the feature. 

Nondestructive Testing Personnel — Personnel responsible for the 
generation of scan plans and derivation of applicable nondestructive testing 
instrument settings used in the scan plans. 

Nonshape Data — Produce definition data that cannot be represented by 
shape elements. 

Normal Forms — Conditions reflecting the degree of refinement and control 
over the relationships and entities in an information model. 

Numerical Control Program (Complete and Proposed) — Set of program 
instructions used to generate a probe path. 

Orientation Range — An envelope in which the major flaw characteristic 
must lie. 

Parse — The process of analyzing input strings (records) to identify 
fields and to verify that the data has a valid format. 

Part Blueprint — A blueprint provided by the engine manufacturer of a 
particular F100 engine disk. 

Physical Schema — Internal representation of data; the computer view that 
includes stored record format and physical ordering of stored records. 

PID File — A PID File is a copy of the Working Form filed to disk for 
temporary storage. The software that produces this capability (PID Code) is 
provide* as an interim solution while a translator to the native database is 
in development. 

Polynomial Spline — A parametric spline of order 1, 2, or 3 defined by a 
set of N+l points. The spline is CX, CY, or CZ continuous and defined by 
coefficients such that: 


2-13 


C0N1MWW 




Cl UM560240031U 
July 1989 


x(i) = AX (i) + BX (i) * S + 

y(i) = AY (i) + BY (i) * S + 

z(i) = AZ (i) + BZ (i) * S + 

and a parameter space (Tq, 
where 


CX ( i) * 
CY (i ) * 
CZ(i) * 

Ti, ... 


S**2 + DX(i) 
S**2 + DY(i) 
S**2 + DZ(i) 

T n ) 


* s**3 

* s**3 

* S**3 


T (i) < = u < = T (i+1) 
S = u - T (i) 


Position Tolerance — A position tolerance (true position) specifies a 
tolerance zone within which the feature may vary in any direction. 

Post-processor — A phase of the translator where data is received from 
the Exchange Format and is converted to the Working Form. 

Pre-processor — A phase of the translator where data is taken from the 
Working Form and is converted to the Exchange Format. 

Primitive Constructive Feature Representation (Generic) — A constructive 
representation that is noncompound and that does not incorporate another 
feature. Such a representation must consist solely of overt construction 
information. Representation of a through hole by centerline and diameter is 
an example. 

Probe Blueprint — Blueprint of Eddy current probe supplied by the probe 
manufacturer. 

Product Definition Data — Those data "explicitly representing all 
required concepts, attributes, and relationships" normally communicated from 
Design throughout Manufacturing and Logistics Support. The data include 
both shape and nonshape information required to fully represent a component 
or assembly so that it can be analyzed, manufactured, inspected, and 
supported. They enable downstream applications, but do not include process 
Instructions. These data are not always finalized at the design release; 
the manufacturing process can also add to the product model or generate 
derived manufacturing product models. 

Product Life Cycle — Includes design, analysis, manufacturing, 
inspection, and product and logistics support of a product. 


2-14 


cowmoiyw 




Cl UM560240031U 
July 1989 


Product Model — A computer representation of a product. 

Product Support — The function that interprets customer requests for 
information and can provide the technical responses to the customer in the 
form of technical orders and instructions. 

Proprietary Part Flaw Data — Formatted dataset containing proprietary 
data defining size(s), maximums, and location(s) of critical flav(s) 
(dimensional and locational tolerance). 

KAW.O File — A data file that uses a bi-cubic patch surface 
representation to define the surfaces of an airfoil. 

Beady Status — Go/No-Go decision. 

Relation — A logical association between entities. 3 

Remount Decision — Decision to remount an engine disk. 

Replicate Feature Representation (Generic) — A description of a feature 
as being identical to another feature except for location. Mathematically, 
a replicate feature representation consists of tht identification of another 
(necessarily constructive) feature plus a transformation. 

Robot Initialization Parameters — A set of nondestructive testing 
parameters used to initialize the robot on an Eddy current or ultrasonic 
cell. 

Rotational Sweep — A sweep in which the swept curve is rotated about a 
line (the "centerline" of the sweep). 

Ruled Surface (Generic) — A surface defined by a linear blend of two 
curves. 

Run System — The Translator subpackage which provides the communication 
interface between the user and the pre/Post-processors. 

Run-Time Subschema — A subset of the data dictionary information used at 
run-time by the access software to provide field data and check data. 

Scan Plan — Instructions that drive an inspection; these include 
Inspection area geometry, ordered inspection path points, inspection probe 
selection, inspection path for each probe, mechanical commands that allow 
mechanical manipulator positioning, instrument setting, and all the 
variables needed for signal processing and flaw data acquisition during 
inspection. 


2-15 


oormovn 






Cl UM560240031U 
July 1989 


Scan Plan Specifications — Standards and procedures used in creating Eddy 
current and ultrasonic scan plans for the RFC system. 

Schema — Formal definition of information structure. See Conceptual 
Schema, Physical Schema, Run-time Schema. 

Shape — The physical geometry of a mechanical part, as distinguished from 
a computer description of that geometry. Where the difference is 
significant, the attitude is taken that shape is nominal or basic, with 
shape variations of tolerances grafted thereon. 

Shape Data — Include the geometric, topological description of a product 
along with the associated dimensional tolerances and feature descriptions. 

Single Spatial Probe/Transducer Path — The starting and ending location 
of a single probe movement. 

Size Tolerance — Size tolerances specify the allowable variation in 
size-of-model features, independent of location. Size tolerances include 
circumferential, rectilinear size, and angular size. 

Solid Geometric Model (Shape Representation) — A computer description of 
shape. The description may be partial in the sense that not all aspects of 
part shape are indicated. For example, a body of revolution representation 
of a turned part may not describe the nonaxisymmetric^ aspects of part 
geometry. A solid model must be complete and unambiguous in the sense that 
it describes a single volume in 3-D space. 

Solid Modeling — The creation of an unambiguous and complete 
representation of the size and shape of an object. 

Source Code — A computer program written in some language which is 
processed to produce machine code. 

Spline — A piecewise polynomial of order K, having continuity up to order 
K-l at the segment joints. 

Squirter Blueprint — Blueprint of the squirter head that houses the 
ultrasonic transducer. 

Subface — A subface is a bounded portion of a face. It is defined by an 
underlying face, exactly one periphery closed curve and zero, one, or more 
internal closed curves that represent cutouts or holes in the region. The 
internal closed curve must not touch or intersect each other or the 
periphery closed curve and must be entirely contained within the periphery 
closed curve. 


2-16 


aotmovm 





Cl UM560240031U 
July 1989 


Surface Flaw — A surface anomaly. 

Surface Flaw Major Characteristic — A vector determined by an agreed upon 
method. 

Example: A vector representing the major axis of the minimum elliptical 
envelope encompassing the anomaly in the plane of the surface. 

Surface Flaw Tolerance — A unique combination of: 

(a) Surface flaw orientation range. 

(b) Serviceable surface flaw tolerance limits. 

(c) Repairable surface flaw tolerance limits. 

Surface Flaw Tolerance Limit — A unique combination of: 

(a) Maximum length. 

(b) Maximum width. 

(c) Maximum depth. 

Sweep Surface — Surfaces formed by extruding or revolving a planar 
profile in space. 

Syntax — Grammar: A set of rules for forming meaningful phrases and 
sentences from words in a vocabulary. 

System Computer — VAX 11/780 and supporting peripheral hardware. 

System Constraints — Those hardware and software environmental 
constraints which will be imposed upon the PDDI Access Software that will 
limit its implementation and application. An example of such constraints 
might be the particular compiler used to compile the P0D1 Access Software 
package. 

To-Be — The future condition possible, given a proposed capability. 

Tolerance (Generic) — The total amount by which something may vary. For 
mechanical product definition, tolerances can be shape tolerances, weight 
tolerances, finish tolerances and so on. In the context of GMAP, the term 
"tolerance" used alone implies shape tolerance. Other forms of tolerance 
(nonshape) are explicitly stated, for example, "finish tolerance." In a 
GMAP product model, tolerances occur without dimensions. As in the Product 
Definition Data Interface Program, model dimensions are implicit in the 
model geometry. Therefore, application of a tolerance implies a specific 
underlying dimension or geometric condition. 

Topology — A data structure that assembles geometric entitles (points, 
curves, surfaces) into a solid geometric model. 


2-17 


cotrmovioi 







Cl UM560240031U 
July 1989 


Transducer Blueprint — Blueprint of ultrasonic transducer supplied by the 
transducer manufacturer. 

Transfer Data — The data required to make an exchange of data between 
systems (i.e., delimiters, record counts, record length, entity counts, 
numeric precision). 

Translator — A software MECHANISM that is used for passing data between 
the Exchange Format and Working Form of the PDD. 

Ultrasonic Cell — Hardware used to perform ultrasonic inspection 
operation (internal flaws). 

Ultrasonic Inspection — An inspection method used to detect surface flaws 
on a disk. It uses ultrasonic waves through a stream of water to send and 
collect signals concerning an area targeted for inspection. 

Ultrasonic Scan Plan — Interpreter code program controlling the 
ultrasonic inspection of a particular geometry. 

Unbounded Geometry — Geometry represented parametrically, without limits, 
usually by coefficients to a defining equation. 

Unigraphics (UG) — A computer graphics system. 

User Function (UFUNC) — An interface to the UG database. 

Working Form — Product definition data information in machine-dependent 
data formats; an a memory resident network model. 

Zone — A physical area of the disk composed of zone components. 

Zone Component — A subface, face, or feature that constitutes a zone or 
element of a zone. 


NOTES: 

1 T.J. Teorey and J.P. Fry, Design of Database Structures, 1st 
edition, Prentice-Hall, Inc., Englewood Cliffs, N.J., p. 463. 

3 Integrated Computer Aided Manufacturing (ICAM) Architecture, Vol. 
5, Information Modeling Manual (IDEF1), USAF Report NO. AFWAL-TR-81-4023, 
June 1981, p. 212. 

3 Ibid., p. 214. 

4 Ibid., p. 211. 


2-18 




Cl UM560240031U 
July 1989 



2 . 2.2 Acronyms Used In GMAP 


AJDB 

AIMS 

ANSI 

ANT 

APT 

ATP 

BOM 

BOP 

BPI 

BREP 

CAD 

CAE 

CAEDS 

CALS 

CAM 

CAM-I 

CAPP 

CAS 

CDM 

CDR 

CDT 

CFSR 

Cl 

CIM 

CLIST 

CM 

CMM 

C/SSR 

CWBS 

DBMS 


- Application Data Block (also referred to as Attribute Data 

Block). 

— Automated 1DEF Methodology System. 

— American National Standards Institute. 

— Abstract of Nev Technology. 

— Automatically Programmed Tools. 

— Automation Technology Products. 

— Bill of Materials. 

— Body of Revolution. 

— Bits per Inch. 

— Boundary Representation. 

— Computer Aided Design. 

— Computer Aided Engineering. 

— Computer Aided Engineering Design System. 

— Computer Aided Acquisition and Logistics Support. 

— Computer Aided Manufacturing. 

— Computer Aided Manufacturing—International. 

— Computer Aided Process Planning. 

— Cooled Airfoil System. 

— Common Data Model. 

— Critical Design Review. 

— Component Design Technology. 

— Contract Fund Status Report. 

— Configuration Item. 

— Computer Integrated Manufacturing. 

— IBM command list. 

— Configuration Management. 

— Coordinate Measuring Machine. 

— Cost/Schedule Status Report. 

— Contract Work Breakdown Structure. 

— Data Base Management System. 


2-19 


CONTOW 









Cl UM560240031U 
July 1989 


DCL 

DDL 

DEA 

DEC 

DES0 

DJR 

DoD 

DS 

DSM 

EBCDIC 

EC 

ECO 

EDM 

EF 

Eli 

EMD 

EPCS 

ESA 

ESP 

FEDD 

FEM 

FOF 

FOS 

FPIM 

FSCM 

GE 

GMAP 

GSE 

HCF 

IBIS 

IBM 


— DEC Command Language. 

— Data Definition Language. 

— Digital Equipment Automation. 

— Digital Equipment Corporation. 

— (ICAM) Architecture of Design. 

— Design Job Request; Drafting Job Request. 

— Department of Defense. 

— Design Specification. 

— Design Substantiation Memo, 

— Extended Binary Coded Decimal Interchange Code (IBM character 

set). 

— Eddy Current. 

— Engineering Change Order. 

— Electrical Discharge Machining. 

— Exchange Format. 

— Engineering Information Index. 

— Engineering Master Drawing. 

— Engine Product Configuration Support. 

— Engineering Source Approval. 

— Experimental Solids Proposal. 

— For Early Domestic Dissemination. 

— Finite-Element Modeling. 

— Factory of the Future. 

— Feature of Size. 

— Fluorescent Penetrant Inspection Module. 

— Federal Supply Code for Manufacturers. 

— General Electric. 

— Geometric Modeling Applications Interface Program. 

— Ground Support Equipment. 

— High-Cycle Fatigue. 

— Integrated Blade Inspection System. 

— International Business Machines. 


2-20 




Cl UM560240031U 
July 1989 


I CAM 

— 

Integrated Computer Aided Manufacturing. 

ICOM 

— 

Input/Controi/Output/Mechanism. 

ICS 

— 

Information Computer System. 

IDEF 

— 

ICAM Definition. 

IDEF0 

— 

IDEF Function Modeling. 

IDEF1 

— 

IDEF Information Modeling. 

IDEF1X 

— 

IDEF Extended Information Modeling. 

IDEF2 

— 

IDEF Dynamics Modeling. 

IDSS 

— 

Integrated Decision Support System. 

IEEE 

— 

Institute of Electrical and Electronics Engineers. 

IEN 

— 

Internal Engineering Notice. 

IFS 

— 

Interface Specification. 

IGES 

— 

Initial Graphics Exchange Specification. 

IISS 

— 

Integrated Information Support System. 

ILC 

— 

Improved Life Core. 

IMS 

— 

Information Management System. 

IPGS 

— 

(IBIS) Inspection Plan Generation System. 

IRB 

— 

Industry Review Board. 

IRIM 

— 

Infrared Inspection Module. 

ISO 

— 

International Standards Organization. 

ITA 

— 

Intelligent Task Automation. 

ITI 

— 

International TechneGroup Incorporated. 

ITR 

— 

Interim Technical Report. 

LCF 

— 

Low-Cycle Fatigue. 

MAS 

— 

Model Access Software. 

MCAIR 

— 

McDonnell Douglas Corporation/McDonnell Aircraft Company. 

MFG0 

— 

(ICAM) Architecture of Manufacturing. 

MRP 

— 

Materials Requirements Planning. 

RAD 

— 

Heeds Analysis Document. 

NBS 

— 

Rational Bureau of Standards. 

R/C 

— 

numerical Control. 

RDE 

_ 

Nondestructive Evaluation. 


2-21 


coKmoun 






Cl UM560240031U 
July 1989 


NDML 

— 

Heutral Data Manipulation Language. 

NDT 

— 

Nondestructive Test. 

NTSB 

— 

National Transportation Safety Board. 

NVI 

— 

Name/Value Interface. 

OGP 

— 

Optical Gaging Products, Inc. 

PA/QA 

— 

Product Assurance/Quality Assurance. 

PD 

— 

Product Data. 

PDD 

— 

Product Definition Data. 

PDDI 

— 

Product Definition Data Interface Program. 

PDES 

— 

Product Data Exchange Specification. 

PDL 

— 

Program Design Language. 

PED 

— 

Preliminary Engine Design. 

PI 

— 

Principal Investigator. 

PID 

— 

PDDI Interim Database. 

PIES 

— 

Product Information Exchange System. 

PMP/PMS 

— 

Program Management Plan/Project Master Schedule. 

PROCAP 

— 

Process Capability. 

PS 

— 

Product Specification. 

RFC 

— 

Retirement for Cause. 

RPM 

— 

Revolutions per Minute. 

SA-ALC 

— 

San Antonio-Air Logistics Center. 

SAD 

— 

State-of-the-Art Document. 

SD 

— 

Scoping Document. 

SDL 

— 

Source Data List. 

SDS 

— 

System Design Specification. 

SL 

— 

Salvage Layout. 

SML 

— 

Source Material Log. 

SOA 

— 

State-of-the-Art (Survey). 

SOR 

— 

Surface of Revolution. 

SPC 

— 

Statistical Process Control. 

SPF 

— 

System Panel Facility. 

SQA 

— 

Software Quality Assurance. 


2-22 


counovn 






Cl UM560240031U 
July 1989 


SQAP 

— 

Software Quality Assurance Plan. 

SRD 

— 

System Requirements Document. 

SSL 

— 

Systems Research Laboratories. 

SS 

— 

System Specification. 

STEP 

— 

Standard for the Exchange of Product Model Data. 

STP 

— 

System Test Plan. 

TCTO 

— 

Time Compliance Technical Order. 

TD 

— 

Technical Data. 

TDCR 

— 

Turbine Design Cost Reduction. 

TDR 

— 

Tool Design Request. 

TechMod 

— 

Technology Modernization. 

TO 

— 

Technical Order. 

TOP 

— 

Technical and Office Protocol. 

TSO 

— 

Time-Sharing Option (IBM term). 

UFUNC 

— 

User Function. 

UG 

— 

Unigraphics. 

UGFM 

— 

Unigraphics File Manager. 

USA 

— 

Unified System for Airfoils. 

USAF 

— 

United States Air Force. 

UTC 

— 

United Technologies Corporation. 

UTP 

— 

Unit Test Plan. 

UTR 

— 

Unit Test Report. 

UTRC 

— 

United Technologies Research Center. 

VAX 

— 

Virtual Architecture Extended. 

VMS 

— 

Virtual Memory System. 

WBS 

— 

Work Breakdown Structure. 

WF 

— 

Working Form. 

WPAFB 

— 

Wright-Patterson Air Force Base. 

XIM 

— 

X-Ray Inspection Module. 


2-23 




Cl UM560240031U 
July 1989 


SECTION 3 
SYSTEM OVERVIEW 


3.1 System Architecture 

The purpose of the GMAP/Product Definition Data Interface (PDDI) 

Software System is to provide a prototype for the communication of complete 
Product Definition Data (PDD) between dissimilar CAD/CAM Systems. This 
system will serve as the information interface between engineering and 
manufacturing functions. As shown in Figure 3-1, it is composed of the 
Conceptual Schema, Schema Manager, Exchange Format (EF), the System 
Translator, and Model Access Software (MAS) with Name Value Interface (NVI). 

The Conceptual Schema is a data dictionary that defines the data needed 
to define a CAD/CAM model. The Schema Manager is a software tool that will 
be used to manage all aspects of the creation and interrogation of the 
Conceptual Schema, and will be used to generate a physical schema. The EF 
is a neutral physical sequential format for passing data between dissimilar 
systems. The System Translator is the software mechanism for passing this 
data between the EF and the Working Form (WF) of the PDD. The MAS is a set 
of callable utility programs that will allow applications to manipulate and 
query PDD WF models. The NVI frees applications programmers from the need 
to be concerned with the physical location of attribute values for entities 
within the WF. 

3.1.1 System Interfaces 

The GMAP/PDDI software must interface with the computer system on which 
it is installed, the local (native) CAD/CAM database, the EF, the WF, and 
the user (application). It does this via MAS, the System Translator and 
local (native) developed software packages. 

3.1.2 System Environment 

The GMAP/PDDI system was developed in the following computing 
environment: 

Computer/Qperatlng System 

IBM 43XX/MVS with TSO and associated tape drives, disk drives and 
terminals. 

DEC VAX 11/780 VMS with associated tape drives, disk drives and 
terminals. 


3-1 


OONTDOWle* 




Cl UM560240031U 
July 1989 



Figure 3-1. GMAP/PDDI System Architecture 
Storage (Corel Requirements 

The minimum core requirements for the PDDI software and database is 1.0M 
plus the size of the model. (The PDDI Machined Rib model required 0.57M) 

COTPllSXS 

IBM-PASCAL/VS Release 2.2 
DEC-PASCAL V3.3, FORTRAN 77 VA.4 


3-2 


coN-mown 








Cl UM560240031U 
July 1989 


Terminals 

E&S PS300 (or equivalent for graphics applications) 

IBM 3270 (or equivalent) 

The PDDI/GMAP software system is transportable to other computing 
systems. However, appropriate local (native) interfaces (translator) must 
be provided. The Operator's Manual (0M 56024001U) provides information on 
migration to other systems. 

3.2 Schema Manager 


The Schema Manager enables the data administrator to create and maintain 
entity definitions in a Conceptual Schema model, analyze the defined 

entities, and generate physical schema from the Conceptual Schema. 

/ 

3.2.1 Physical Schemas 

The WF physical schema is determined t h ro u gh a data dictionary or PASCAL 
include files. The EF physical schema is defined by the Conceptual Schema 
and the specification for the neutral file format. 

3.3 EE 

The EF is a neutral data format. This physical, sequential format is 
used to for passing data between dissimilar CAD/CAM systems. 

3.4 System Translator 

The System Translator is the software package used to format PDD for 
transmission between different CAD/CAM systems. The Translator has a 
"Preprocessor" which collects data from the sending system and formulates it 
into an EF file; and a "Postprocessor" which collects the EF file and 
formulates it into the receiving system internal WF. 

3.5 Model Acc ess Software 

The MAS is a set of PASCAL procedures that maintains the physical 
structure of related user data in computer memory. This user data is 
referred to as the WF model. The MAS provides an interface to the WF model 
for application programs ta create, relate, and access elements of user data 

The application programs are independent of the physical structure of 
the stored data elements. This independence ensures that as different 
structure techniques are implemented, the application programs need not 
change. 


3-3 


onmot/a* 




Cl UM560240031U 
July 1989 


3.5.1 Pata Items 

The MAS manages two types of data: entities and lists. An entity is an 
element of data supplied by the application to be stored in the WF. A list 
is a collection of entity keys. A list is a collection of entity keys 
created by the application in the WF. 

3.5.1.1 Entity 

An entity is the principle data item managed by the MAS, and is: 

o Defined by the conceptual schema in the application creating the 
entity 

o Accessed by a unique key return from the create entity function 

o A node in the WF structure containing an Attribute Data Block 
(ADB), and references to other entities in Constituent 
Relationships and/or User Relationships 

ATTRIBUTE DATA BLOCK 

An ADB is a collection of data embedded in a single contiguous block 
of memory. Individual pieces of data within an ADB are called 
attributes. MAS manages only the first three items in the structure 
of an ADB. These three attributes, KIND, LENGTH, and SYSUSE, are 
required in every entity. Each attribute is described below: 

KIND - Must be the first item defined in the ADB. The KIND defines 
the entity type code. This code c ann ot- be changed. 

LENGTH - Must be the second item defined in the ADB. The LENGTH 
defines the number of bytes in the ADB including KIND. LENGTH, and 
SYSUSE. ’ 

SYSUSE - One full word of system use data reserved for internal 
purposes. These data are never used by the application, and should 
never be inspected or modified. 

NOTE. All other attribute data in the ADB is managed by the 
application program. 

The MAS allows the structuring of the user data. The entities can be 
related in user/constituent order. An entity may be related to multiple 
user entities, creating a network structure in the WF. An entity may also 
contain multiple constituent entities. 


3-4 


OtormoL/v* 



Cl UM560240031U 
July 1989 


CONSTITUENT RELATIONSHIP 

A constituent entity is used in the definition of the user entity. 
Inclusive constituents of an entity encompass all descendants, their 
descendants, and so forth until there are no more descendants. For 
example in Figure 3-2, Point 0 (PO) and Point 1 (PI) are constituents 
of Line 1. 

LINE = ENTITY(5008); 

IDENT : KEY T_IDENT; 

DISPLA : TJ3ISPLAY; 

PO : POINT; 

PI : POINT; 

END_ENTITY; 



Figure 3-2. LINE: An Entity With Constituents 


3-5 


OQMTMOWW 




Cl UM560240031U 
July 1989 


USER RELATIONSHIPS 

A user entity uses constituent entitles in its definition. Inclusive 
users of an entity include all ancestors, their ancestors, and so 
forth until there are no more ancestors. For example in Figure 3-2, 
Line 1 is a user of Point 0 (PO) and Point 1 (PI). 


3.5.1.2 List 

A list is a collection of entity keys which is: 
o Created by the application program 

o Accessed by a unique list key returned from the Creace list 
Function's 

o Used by the Application to store selected entity keys for 
subsequent processing. 


3.5.2 Interface Parameters 

The MAS is a set of PASCAL routines which provides an interface to the 
WF model. These routines contain input and output arguments referred to 
here as "interface parameters." Each interface parameter has a name and a 
type. This information is shown as follows: 

DATA-HAME:DATA-TYPE. 

3.5.2.1 Data-Kame Parameters 

The following conventions are used to name parameters: 

o Keys are named KEY1, KEY2,...KEYN. 

o The ADB is named ERTDEF. 

o Text parameters are named according to their purpose. 

o Integer parameters are named according to their purpose. 

o A return code is produced by every interface routine/operation. 
This parameter is a full word integer and is always named IRC. 
(See Appendix C for a return code list.) 


3-6 


CONTOL/IM 




Cl UM560240031U 
July 1989 


3.5.2.2 Data-Tvoe Parameters 

Data-Type parameters may be one of the following: 

ANYKEY - Access key of an entity or list. 

ENTBLOCK - Entity data block definition. 

- In PASCAL, probably declared as a record. 

- In FORTRAN, declared as a common or dimension array. 

CHARACTER - A single character as defined by the system. 

INTEGER - A full word integer. 


3.5.2.3 Formal Data Types 


The following is a reference list of data-types for interface calls in 
this HAS document. 


ANYKEY 

LISTKEY 

ENTKEY 

ORDJCIND 

EXT_RET_CODE 

LISTPSTN 

LISTINDX 

LISTSIZE 

ROUTINE 

NAMTYP 


INTEGER 

ANYKEY 

ANYKEY 

INTEGER 

INTEGER 

INTEGER 

INTEGER 

INTEGER 

ARRAY(1...8) OF CHARACTER 
ARRAY(1...6) OF CHARACTER 


(ADB) ENTBLOCK 
KIND 
SIZE 
SYSUSE 
DATA 


- RECORD OF 
= 0RD_KIND 
= INTEGER 
= INTEGER 
= (USER DEFINED) 


The formal declarations for the MAS interface routines are maintained in 
the member APL TYP of the library "CAD5.GMAP.V33.MASINC" 

3-5.3 Memory Manager 

A Model Access Memory Manager was developed to replace the PASCAL 
run-time memory manager. It reduces the number of bytes of overhead 
required for free-space collection, and isolates the WF model from all other 
PASCAL dynamic allocations. 




Cl UM560240031U 
July 1989 


This memory manager is currently in the HAS package and requires no user 
intervention for utilization. 

3.6 EVI 

The RVI frees applications programmers from concern for the physical 
location of attributes for entities in the WF of the HAS. The NVI provides 
the ability to alter the physical data structure vithout impacting program 
source code and removes the need to program and maintain attribute data 
structures and access algorithms by applications programmers. Section 5 
provides detailed information on this feature. 


3-8 


eomxHv** 




Cl UM560240031U 
July 1989 


S ECT ION 4 

MODEL ACCESS SOFTWARE (MAS) OPERATIONS AND ENVIRONMENT 


4.1 Introduction 

The Entity Operations and List Operations sections provide the 
applications programmer with the interface operations needed to access the 
data structures passed bade to the application program. 

Figure 4-1 illustrates the interrelationships of the MAS interface 
operations shown in these sections. 



Figure 4-1. MAS Interface Operations 


4-1 







Cl UM560240031U 
July 1989 


4.2 Initlalization/Deletion of the MAS Working Form (WF) 

Two routines provide the interface used to initialize the MAS. 

The basic initialization operation (MAINIT) creates a working model and 
enables MAS. 

The MAKILL function is used to destroy the working model and disable MAS. 

An application does not have to install a data dictionary. It can 
create and use entities on an gd hoc basis. If a data dictionary is not 
installed, the following limitations are imposed: 

1. Any entity type will be permitted. 

2. The interface routines will not validate any operation other than 
outright errors; i.e., defining an ADB with a negative length. The 
application is - "on its own". 

3. There will be no provision for organization of entities by class. 


Included with the initialization and deletion operations descriptions 
that follow are the error and warning messages that may be returned. 
Appendix C contains a complete list of these messages along with their 
numeric codes. 


4-2 


omrmoww 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

ERRORS: 


NOTE : 


Cl UM560240031U 
July 1989 


mmi 


Initialize the working model. 

MAINIT (IRC) 

INPUT: 

NONE 


OUTPUT: 

IRC : INTEGER 

The procedure return code. 

The working model will be initialized. 

Model Access Software is enabled. 


Message 


Explanation 


MAS_INIT_FAILED 

MAINIT_ALREADY_DONE 

NOT_ENOUGH_ROOM 


Could not create schema and its 
root. 

Root already created. 

No more core memory. 


Do not call MAINIT twice in succession. Use a MAKILL to 
delete the current environment before initializing another. 


4-3 


OONIWOLfl* 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

ERRORS: 


Cl UM560240031U 
July 1989 


HAKILL 

Delete the current working model. 

MAKILL (IRC) 

INPUT: 

NONE 

OUTPUT: 

IRC : INTEGER 

The procedure return code. 

The entire working model is destroyed. 

Model Access Software is disabled. 

None. 


4-4 






Cl UM560240031U 
July 1989 


4.3 Entity Operations 

The basic entity operations can be categorized by the following 
functions: 

Create 

Query 

Update 

Delete 

Activate 

Application Flags 

All operations performed on entity constituent lists are done by list 
operations, with the exception of creating an entity with constituents. 

Included with the entity operations descriptions presented on the pages 
that follow are the error and warning messages that may be returned. 
Appendix C contains a complete list of these messages along with their 
numeric codes. 

4.31 Create Operations 

These operations allow the creation of entities in the MAS WF model. 

The application creates the entity attribute data block in its local memory 
space. This includes the fields required by MAS (KIND, LENGTH, and SYSUSE) 
as well as the attributes defined by the application. 

The create routines are shown in Table 4-1, and the following pages, 

TABLE 4-1 

CREATE ROUTINES 


DESCRIPTION ROUTINE 


Create an entity. MAECR 


Create an entity with a constituent 

list of specified size. MAECRN 





Cl UM560240031U 
July 1989 


MAECR 


FUNCTION: Create an entity. 

FORMAT: MAECR(ENTDEF,KEY1,KEY2,IRC) 

INPUT: 

ENTDEF : ENTBLOCK 

The application data structure which contains 
the entity definition. 

KEY1 : ANYKEY 

The entity or list of entities to be made 
constituents of the entity being created. 

OUTPUT: 

KEY2 : ENTKEY 

The key of the newly created entity. 

IRC : INTEGERS 

The return code. 

DESCRIPTION: The entity is added to the model. Constituent entities are 

connected to the entity. If KEY1 is an entity key, then only 
that entity will become a constituent. If KEY1 is an 
application list key, then all entities in the application 
list will become constituents. 

KEY1 may be nil if the entity being created is to have no 
constituents (a full word Integer zero can be used as a nil 
key). 

NOTE: The application is responsible for the format of the 
ADB data after the first three items (KIND, SIZE, SYSUSE). 

The KIND is a positive integer. The length is a positive 
integer representing the length of the ADB (including the 
three items required by MAS) in bytes. 

The possible return code values are: 

0 « Success: 

7 « Failure: Invalid KIND value 

10 * Failure: Invalid KEY1 

39 ■ Failure: No more core memory. 

No entity is created for the return codes of failure (7, 10, 39). 


4-6 






Cl UM560240031U 
July 1989 


MAECRN 


FUNCTION: Create an entity with a constituent list of a given size. 

FORMAT: MAECRN(ENTDEF,KEYC,KEYE,NUM,IRC) 


INPUT: 

ENTDEF 

: 

ENTDATA 

The application data block that contains the 
entity definition. 

KEYC 

• 

• 

ANYKEY 

The entity or list of entities to be made 
constituents of the entity being created. 

NUM 

• 

• 

INTEGER 

The size of the constituent list of the 
entity being created. 

OUTPUT: 

KEYE 

• 

• 

ENTKEY 

The key of the newly created entity. 

RC 

• 

• 

INTEGER 

The return code. 


DESCRIPTION: The entity is added to the model. A constituent list of the 
given size is created and the constituent entities are added. 

A nil key may be used if the entity being created is to have 
no constituents at this time. A full word integer zero can be 
used as a nil key. 

The possible return code values are: 

0 * Success 

7 * Failure: Illegal KIND value or model 

corrupted. 

9 * Failure: Constituent key is not an entity 

or an application list. 

38, 39, 40 = Failure: No more core memory. 


No entity is created for failures (7, 


9, 38, 39, 40). 







Cl UM560240031U 
July 1989 


4.3.2 Query Operations 

These operations are used to retrieve information for a specified entity 
and load it into the application memory area. 

The query routines are shovn in the Table 4-2, and the following pages. 

TABLE 4-2 

QUERY ROUTINES 


DESCRIPTION 

ROUTINE 

Get the KIND value of a specific entity. 

MAEGKN 

Get the ADB of a specific entity. 

MAEGTK 

Determine the number of users. 

MAEUSR 


4-8 


CONTMOWa* 







Cl UM560240031U 
July 1989 


MAEGKN 


FUNCTION: Get the KIND value of a specific entity. 

FORMAT: MAEGKN(KEY1.KIND,IRC) 

INPUT: 

KEY1 : ENTKEY 

The entity whose kind is to be retrieved. 

OUTPUT: 

KIND : INTEGER 

The KIND value of the specified entity. 

IRC : INTEGER 

The return code. 

DESCRIPTION: The stored ADB is located. The KIND value in the ADB is 
retrieved. 

The possible return code values are: 

0 » Success 

18 = Failure: KEY1 is nil or not an entity. 





Cl UM560240031U 
July 1989 


MAEGTK 

FUNCTION: Get the ADB of a specific entity. 

FORMAT: MAEGTK(KEY1,ENTDEF,IRC) 


INPUT: 

KEY1 : 

ENTKEY 



The key of 
copied. 

the entity whose ADB is to 

OUTPUT: 

ENTDEF : 

ENTBLOCK 



The ADB to 

receive the stored entity. 

IRC : 

INTEGER 



The return 

code. 


DESCRIPTION: The stored ADB is located and copied into the application data 
block. If KEY1 is nil, then a nil KIND and a zero length is 
returned. 

The possible return code values are: 

0 = Success 

18 = Failure: KEY1 is nil or not an entity. 





Cl UM560240031U 
July 1989 


MAEUSR 


FUNCTION: 


FORMAT: 


Determine the number of users for an entity or application 
list of entities. 

MA£USR(KEY1,UEXIST,IRC) 


INPUT: 

KEY1 : 

ANYKEY 

The entity or application list of entities 
whose users will be counted. 

OUTPUT: 

UEXIST : 

INTEGER 

The value number of users. 

IRC : 

INTEGER 

The return code. 


DESCRIPTION: KEY1 may be either an entity key or an application list key. 

If KEY1 is an entity, the number of users of the entity is 
returned. If KEY1 is an application list, the number of 
direct users of the entities on the list is returned. 

The possible return code values are: 


0 = Success 

17 = Failure 

18 * Failure 


KEY1 is not a valid ENTKEY OR 
LISTKEY. 

KEY1 is nil. 


4-11 




Cl UM560240031U 
July 1989 


4.3.3 Update Operations 

Update operations, presented in Table 4-3, and the following pages, are 
used to update the ADB for specified entities. In general, the application 
should use the MAEGTK function to get the ADB before the update function is 
used. 


TABLE 4-3 
UPDATE OPERATIONS 


DESCRIPTION 

ROUTINE 

Update the attribute data block of an entity. 

MAEUD 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAEUD 


Update the attribute data block of an entity. 
MAEUD(KEY1.ENTDEF,IRC) 


INPUT: 

KEY1 : 

ENTKEY 

The key of the entity to be updated. 

ENTDEF : 

ADB 

The ADB supplying the update values. 

OUTPUT: 

IRC : 

INTEGER 

The return code. 


The ADB of KEY1 will be updated with the given ADB values. 
The value of KIND must agree with the working form copy. 
Otherwise, an error will result. If the length is greater 


than the current length, then 
more space. 

return code values are: 

0 * Success 
1 * Failure 
6 = Failure 
18 = Failure 
AO * Failure 


a new ADB will be created with 


Kind or given key is undefined. 
Cannot update entity. 

KEY1 is nil. 

No more core memory. 


4-13 




Cl UM560240031U 
July 1989 


4.3.4 Delete Operations 

These operations address how you delete entities from the MAS WF model. 
The entities in the working model currently are grouped into the following 
classifications: 

o Dependent 

o Support 

o Primary 

o Secondary. 

Delete rules have been established for the entities in these 
classifications. For a new entity kind, the default classification is 
"Dependent" unless it is otherwise defined. 

Delete Rules - The delete rules, shown in Table 4-4, apply to the 
constituent relationships with which entities are defined. They 
determine whether a constituent entity can be deleted by checking each 
of its user entities. For example, the delete rules applied to entity 
(A) in relation to a specific user entity (B) may be different than the 
delete rules for that same entity (A) in relation to another specific 
user entity (C). 

The action taken for the IDBMAS delete classifications are determined by 
the combinations of yesno (YN) answers to the following conditions, posed as 
questions: 

1. Can this constituent entity be deleted from a specific user entity? 

2. Does the deletion of this (constituent) entity cause deletion of a 
specific user? 

3. Does deletion of a specific user cause deletion of this entity 
(constituent)? 


4-14 


omnaown 







Cl UM560240031U 
July 1989 


TA B L S_4- 4 
DELETE RULES 


CONDITION 

DELETE CLASSIFICATION 

(1) 

(2) 

(3) 

N 

N 

N 

Dependent 

N 

N 

Y 

Support 

N 

Y 

N 

Primary 

Y 

- J 

N 

» -< 

N 

Secondary 


The delete classifications are defined as follows: 


Dependent - Constituent entity cannot be deleted because the user 

entity is dependent on its existence. The user entity may 
be deleted without deleting the constituent entity. 


Support - Constituent entity cannot be deleted because the user 

entity is dependent on its existence. The user entity may - 
be deleted; however, the constituent entity will also be 
deleted unless another user entity does not permit the 
deletion of the constituent entity. 

Primary - Constituent entity can be deleted, but only if the user 

entity can, and will, also be deleted. The user entity may 
be deleted without the constituent entity being deleted. 


Secondary - If the number of constituents falls below an established 
minimum, the constituent entity can be deleted and, if 
possible, the user entity will also be deleted. If the 
user entity cannot be deleted, none of the minimum 
constituents can be deleted. If the number of constituents 
is greater than or equal to the minimum, the constituent 
entity can be deleted. 


Test routines are provided to return the entities or lists that would be 
deleted if actual delete routines were used. 


Delete Routines - The IDB/MAS delete routines are presented in Table 
4-5, and the following pages. The first two routines actually delete 
entities (MAED, MAEDI). The third and fourth routines test the delete 
function, allowing the programmer to see the results of a potential delete 
without modifying the stored data (MAEDT, MAEDTI). 


4-15 


CONTOL/Bt 





Cl UM560240031U 
July 1989 


When deleting a list of entitles that Includes users and constituents, 
the list should be ordered so that the users are processed before the 
constituents. The routines MALROR and MALRORI perform this function on an 
application list. (An entity constituent list should never be reordered.) 

TABLE 4-5 
DELETE ROUTINES 


DESCRIPTION 


ROUTINE 

Delete an entity or list 

of entities. 

MAED 

Delete an entity or list 
constituents. 

of entities and the inclusive 

MAEDI 

Delete test an entity or 

list of entities. 

MAEDT 

Delete test an entity or 
inclusive constituents. 

list of entities and the 

MAEDTI 


4-16 


comot/M 






FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


HAEE 


Delete an entity or list of entities. 
MAED(KEY1,KEY2,IRC) 


INPUT: 

KEY1 

: ANYKEY 



The entity 
deleted. 

or list of entities to be 

OUTPUT: 

KEY2 

: LISTKEY 



The list of 

entities marked for deletion. 

IRC 

: INTEGER 



The return 

code. 


KEY1 nay be either an entity key or a list key, and the order 
of the entities in the list may be important. KEY2 vill list 
any entities from the KEY1 list that were not deleted. If all 
entities are deleted, the mark list will be empty. 


return code values are: 


0 * Success 
17 « Failure 

40 * Failure 
42 > Failure 
-3 « Warning 
-7 » Warning 


KEY1 is not a valid entity key or 
list key. 

No more core memory. 

Delete rules defined incorrectly. 
KEY1 is nil. 

No entities marked for delete. 


No mark list is created for failures or warnings. 


4-17 


CONTHOL/W 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAEDI 


Delete an entity or list of entities and their inclusive 
constituents. 

MAEDI(KEY1.KEY2,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be 
deleted. 

OUTPUT: 

KEY2 : LISTKEY 

The list of entities marked for delete. 

IRC : INTEGER 

The return code. 

KEY1 may be either an entity key or a list key, and the order 
of the entities in the list may be important. KEY2 will list 
any entitles from the KEY1 list that were not deleted. If all 
entities are deleted, the mark list will be empty. 


return code values are: 

0 * Success 
17 - Failure 

40 « Failure 
42 « Failure 
-3 * Warning 


-7 * Warning 


KEY1 is not a valid entity key or 
list key. 

No more core memory. 

Delete rules defined incorrectly. 
No entities to be tested for 
delete, or no entities would be 
deleted. 

No entities marked for delete. 


No mark list is created for failures or warnings 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


M AEEI 


Delete test an entity or list of entities. 
MAEDT(KEY1,KEY2,KEY3,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be tested. 

OUTPUT: 

KEY2 : LISTKEY 

The list containing entities that would be 
deleted by MAED. 

KEY3 : LISTKEY 

The list containing entities that would be 
Barked by MAED. 

IRC : INTEGER 

The return code. 

The MAEDT delete routine simulates the output of the MAED 
routine without actually deleting the entities or marking them 
Inactive. 


return code values are: 

0 « Success 
17 « Failure 

AO « Failure 
42 * Failure 
-3 ■ Warning 


-7 * Warning 


KEY1 is not a valid entity key or 
list key. 

Ro more core memory. 

Delete rules defined incorrectly. 
No entities to be tested for 
delete or no entitles would be 
deleted. 

No entities marked for delete. 


4-19 





Cl UM560240031U 
July 1989 


ttASPTI 


FUNCTION: Delete test an entity or list of entities and their inclusive 

constituents. 

FORMAT: MAEDTI(KEY1,KEY2,KEY3,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be tested. 

OUTPUT: 

KEY2 : LISTKEY 

The list containing entities that would be 
deleted by MAEDI. 

KEY3 : LISTKEY 

The list containing entitles that would be 
marked by MAEDI. 

IRC : INTEGER 

The return code. 

DESCRIPTION: The MAEDTI delete routine simulates the output of the MAEDI 
routine without actually deleting the entities or rendering 
them inactive. 

The possible return code values are: 

0 * Success 

17 * Failure KEY1 is not a valid entity key o 

list key. 

38, 39, 40 * Failure No more core memory. 

42 * Failure Delete rules defined Incorrectly 

-3 = Warning No entities to be tested for 

delete or no entities would be 
deleted. 

-7 * Warning No entities would be marked for 

delete. 


4-20 


ooNiwxva* 




Cl UM560240031U 
July 1989 


4.3.5 Activate Operations 

These operations are used to activate an entity. An entity is 
deactivated when a delete was attempted, but was not completed because of 
the user's dependency condition on the entity. (See Delete Operations 
Section.) 

The activate routines are shown in Table 4-6 and the following pages. 

TABLE 4-6 
ACTIVATE ROUTINES 


DESCRIPTION ROUTINE 

Activate an entity or list of entities. MAEA 

Activ; e an entity or list of entities and their MAEAI 

inclusive constituents. 

Find the present value of the activation setting for MAEAV 

an entity. 


NOTE : 

o Activation is not the same as rejection after a delete. If an entity 
was deleted, then it cannot be recovered with these functions. 

o Activation functions will activate any entity regardless of when or how 
it was made inactive. 


4-21 





FUNCTION: 

FORMAT: 

activated. 

DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 




Activate an entity or list of entities. 

MAEA (KEY1,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be 


OUTPUT: 

IRC : INTEGER 

The return code. 

KEY1 nay be either an entity key or a list key. If KEY1 is an 
entity key then only that entity will be activated. If KEY1 
is a list key then all entities in the list will be 
activated. 

return code values are: 


0 = Success 

17 « Failure 

18 * Failure 
40 - Failure 


KEY1 is not a valid entity key of 
list key. 

KEY1 is nil. 

No more core memory. 


4-22 


COKT novrn 







FUNCTION: 

FORMAT: 

activated. 

DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MA SA I 


Activate an entity or list of entities and their inclusive 
constituents. 

MAEAI(KEYl.IRC) 

INPUT; 

KEY1 : ANYKEY 

The entity or list of entities to be 


OUTPUT: 

IRC : INTEGER 

The return code. 

KEY1 may be either an entity key or a list key. If KEY1 is an 
entity key then only that entity and its inclusive 
constituents will be activated. If KEY1 is a list key then 
all entities in the list and their inclusive constituents will 
be activated. 

Refer to the System Overview Section for further explanation 
of inclusive constituents. 


return code values are: 

0 * Success 

17 = Failure 

18 * Failure 
40 * Failure 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

No more core memory. 


4-23 






Cl UM560240031U 
July 1989 


MAEAV 


FUNCTION: Find the present value of the activation setting for an entity. 

FORMAT: MAEAV(KEY1,IAVAL,IRC) 

INPUT: 

KEY1 : ENTKEY 

The entity to he examined. 

OUTPUT: 

IAVAL : INTEGER 

The activation code. 

= 0 if set for delete 
si if not set for delete 

IRC : INTEGER 

The return code. 

DESCRIPTION: Returns the current value of the activation setting for the 
specified entity. 

The possible return code values are: 

0 = Success 

18 - Failure KEY1 is nil. 

38, 39, 40 « Failure No more core memory. 


4-24 





Cl UM560240031U 
July 1989 


4,3.6 Application Flag Operations 

These operations are used to query or set any application accessible flag 
associated with an entity. 

The Application Flag routines are shown, in Table 4-7, and the following 
pages. 

TABLE 4-7 

APPLICATION FUG OPERATIONS 


DESCRIPTION 

ROUTINE 

For all entities in the model, reset the specified flag. 

MAERST 

For all entities in the model, reset the process flag and 
the application flag. 

MABRST 

For an entity or list of entities, update the 
specified flag. 

MAUPDT 

For the constituents of an entity or list of 
entities, update the specified flag. 

MACPDT 

For the inclusive constituents of an entity or list of 
entities, update the process flag. 

MAESCI 

For an entity, query the specified flag. 

MAQURY 

Determine whether the user compresses with its 
constituent. 

MAECQY 

Create a list of constituents with which the input 
entity compresses. 

MAECMP 


4-25 


ownwoivm 










Cl UM560240031U 
July 1989 


TABLE 4-7 (contd.) 



DESCRIPTION 

ROUTINE 


Reset Process Flag for all entities in the model. 

MAESWA 


Set the Process Flag in an entity or list of entities. 

MAESWT 


Find the Process Flag setting of an entity. 

MAESVL 


4-26 


OOKTMQUn 






Cl UM560240031U 
July 1989 


MAERST 


FUNCTION: Reset given application accessible flag in all entities in the 

| model. 

| FORMAT: MAERST(TLAGNAME,IRC) 

INPUT: 

1 FLAGNAME : NAMTYP 

The name of the flag to be reset in all 
entities in the model. Can have the 
following values: 

I 

j 1) /MRDFLG* activation flag 

I 2) /PRCFLG' process flag 

| 3) /ABSFLG* absent/present flag 

, 4) /APLFLG' application flag 

! OUTPUT: 

j IRC : INTEGER 

| The return code. 

i DESCRIPTION: Determine vhat flag is to be reset in every entity in the 

I model. Resets that flag to /off'. 

j The possible return code values are: 

0 * Success 

34 * Failure 

35 * Failure 

J 38, 39, 40 « Failure 


Invalid flag name. 

No model established. 
No more core memory. 


4-27 







FUNCTION: 

FORMAT: 

DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


MABRST 


Reset the process and application flags on each entity in the 
working form model. 

MABRST(IRC) 

INPUT: 

NONE 

OUTPUT: 

IRC 2 INTEGER 

The return code. 

For each entity in the working form model, the process and 
application SYSUSE -flags are turned off. 

return code -values are-; 

0 = Success 

35 * Failure No model has been established. 


4-28 


ooNTtoi sm 






FUNCTION: 

FORMAT: 


DESCRIPTION: 
The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAUPDT 


Update the value of a given application accessible flag for an 
entity or list of entities. 

MAUPDT(KEY1,FLGNAME,FLGVAL,IRC) 


INPUT: 


KEY1 : 

ANYKEY 

The entity or list of entities whose 
specified flag value will be updated. 

FLAGNAME : 

NAMTYP 

The name of the flag to be updated. Can have 
the following values: 


1) /MRDFLG' activation flag 

2) /PRCFLG* process flag 

3) /ABSFLG' absent/present flag 

4) /APLFLG* application flag 

FLGVAL : 

INTEGER 

The value of the specified flag to be used 
when updating. 

0 * false 

1 * true 

IRC : 

INTEGER 

The return code. 


Determine which flag is to be updated, and replace that value, 
return code values are: 


0 * Success 



17 = Failure 

KEY1 is 

nil or not an entity 

34 = Failure 

Invalid 

flag name. 

40 = Failure 

No more 

core memory. 


4-29 


OOWTHOt/** 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MACPDT 


Update a specified SYSUSE flag value for the constituents of 
an entity or a list of entities. 


MACPDT(KEY1,FLGNAME,FLGVAL,IRC) 


INPUT: 

KEY1 : 

ANYKEY 

The key of an entity or list of entities 
whose constituents will be updated. 

FLGNAME 

NAMTYP 

The name of the flag to be updated. It can 
have the following values: 


1) /MRDFLG' activation flag 

2) /PRCFLG' process flag 

3) /ABSFLG* absent/present flag 

4) /APLFLG' application flag 

FLGVAL : 

INTEGER 

The value of the specified flag to be used 
when updating. 

0 * False 

1 • True 

OUTPUT: 

IRC : 

INTEGER 

The return code. 


Determine what value of a flag is to be updated. Collect the 
constituent entities to be updated. Update the entities. 


return code values are: 

0 * Success 

17 * Failure 

18 = Failure 
3A = Failure 
40 = Failure 
-6 = Warning 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

Undefined flag name. 

No more core memory. 

The entity or list of entities had 
no constituents. 


4-30 


OONTHOL/W 







FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


BAESCI 


Set or reset the process flag for the inclusive constituents 
of an entity or a list of entities. 

MAESCl(KEY1,ISWT,IRC) 


INPUT: 

KEY1 

: ANYKEY 



The key to 

an entity or list of entities 

I SWT 

: INTEGER 



The ordinal 

value of true or false. 

OUTPUT: 

IRC 

: INTEGER 



The return 

code. 


Given a valid key, the inclusive constituents of an entity or 
list of entities are collected. Each collected constituent 
entity's process flag is updated with the given value. 


return code values are: 

0 * Success 

17 » Failure 

18 = Failure 
40 « Failure 
-6 * Warning 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

No more core memory exist. 

The entity or list of entities had 
no constituents. 


4-31 



Cl UM560240031U 
July 1989 


HAoypi 


FUNCTION: Determine the value of a given application accessible flag for 

the entity. 

FORMAT: MAQURY(KEY1,FLAGNAME,FLCVAL, IR C ) 

INPUT: 

KEY1 : ENTKEY 

The entity whose specified flag value is to 
be retrieved. 

FLAGNAME : NAMTYP 

The name of the flag to be retrieved. Can 
have the following values: 

1) /MRDFLG' activation flag 

2) /PRCFLG* process flag 

3) /ABSFLG* absent/present flag 

4) /APLFLG' application flag 

OUTPUT: 

FLGVAL : INTEGER 

The value of the specified flag. 

0 * false 
1 « true 

IRC : INTEGER 

The retara code. 

DESCRIPTION: Determine which flag is to be retrieved, and return that value. 
The possible return code values are: 

0 * Success 

17 « Failure KEY1 is nil or not an entity. 

34 « Failure Invalid flag name. 

38, 39, 40 * Failure No more core memory. 


4-32 





FUNCTION: 

FORMAT: 


DESCRIPTION: 
The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAECOY 


Determine whether the user compresses with its constituent. 
MAECQY(KEY1,KEY2,CMPFLG,IRC) 

INPUT: 

KEY1 : ENTKEY 

Key of the entity whose constituent is to be 
checked. 

KEY2 : ENT KEY 

Key of the constituent whose rule is to be 
checked. 

OUTPUT: 

CMPFLG : INTEGER 

Value of the user's compress rule in relation 
to its constituent. 

1 * true 
0 * false 

IRC : INTEGER 

The return code. 


Query constituent compress rule to its user. 


return code values are: 


0 * Success 

17 - Failure 

18 « Failure 
AO « Failure 
42 « Failure 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

No more core memory. 

Delete rules defined incorrectly. 


No value is returned for the return codes of failure. 


4-33 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


HAES WE 


Create a list of constituents with which the input entity 
compresses. 

MAECMP(KEY1,KEY2,IRC) 


INPUT: 

KEY1 

: ENTKEY 

Key of the entity thats compressibility is 
determined by the constituent(s). 

OUTPUT: 

KEY 2 

: LISTKEY 

List of the constituents that cause the 
compression of the input entity. 

IRC 

INTEGER 

Return code 


KEY2 is initialized to nil. Each constituent whose delete 
rule states that the input entity will be compressed will be 
added to KEY2. 


return code values are: 


0 = Success 

17 = Failure 

18 - Failure 
40 = Failure 
42 * Failure 
-6 = Warning 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

No more core memory. 

Delete rules defined incorrectly. 
The entity or list of entities had 
no constituents. 


No list is created for failures or warnings. 


4-34 


ootawMsm 




FUNCTION: 

FORMAT: 

DESCRIPTION: 

The possible 
38, 39 


Cl UM560240031U 
July 1989 


MAESWA 


Reset Process Flag for all entities in the model. 

MAESWA(IRC) 

INPUT: 

NONE 

OUTPUT: 

IRC : INTEGER 

The return code. 

The Process Flag is set to OFF in all entities in the 
working-form model. 

return code values are: . 

0 * Success 

40 * Failure No more core memory. 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAE SWT 


Set the Process Flag in an entity or a list of entities. 
MAESWT(KEY1,ISWT,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities whose process 
flag is to be set. 

ISWT : INTEGER 

The input value of the process flag. 

OUTPUT: 

IRC : INTEGER 

The return code. 

The process flag will be set to the value specified by ISWT. 

If KEY1 is an entity key, then the flag in that entity will be 
set. If KEY1 is a list key, then the flag in all entities 
referenced by the list will be set. ISWT should be "1" for 
flag setting of true and "0” for flag setting of false. 

return code values are: 


0 * Success 

17 * Failure 

18 * Failure 
40 * Failure 


KEY1 is not a valid entity key or 
list key. 

KEY1 is nil. 

No more core memory. 


4-36 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


K A ESVI , 


Find the Process Flag setting of an entity. 
MAESVL(KEY1,ISET,IRC) 

INPUT: 

KEY1 : KEY 

The entity for which the flag setting is 
wanted. This must be an entity key. 

OUTPUT: 

ISET : INTEGER 

The output value of the process flag. 

IRC : INTEGER 

The return code. 

The value of the process flag for KEY1 will be returned. If 
the flag is true, then the value "1" will be returned. If the 
flag is false, then the value "0" will be returned. 


return code values are: 

0 * Success 

18 « Failure KEY1 is not a valid entity key or 

list key. 

40 « Failure No more core memory. 


4-37 


OONTRCUM 






Cl UM560240031U 
July 1989 


4.4 List Operations 

This section explains the use of the HAS list operations. A list is a 
temporary internal structure that contains references to entities. Since 
the application can build lists that take up space in the working model, it 
is necessary that the applications periodically delete the lists that are no 
longer needed. 

Many list operations will accept either a list key or an entity key as 
input keys. When an entity key is supplied, c is assumed that the 
constituent list of the entity becomes the list to be operated on. 

Some operations on lists may result in the same entity being in the 
output list more than once. The operation (MALRDE) can be used to remove 
duplicate entities from the list. 

1 operations that create an application list automatically set the 
position of the list to the beginning. Once a list has been read to the 
end, it must be reset before the sequential read process can begin again. 

When an entity is deleted, all references to it in all application lists 
are automatically removed and the current positions of the affected lists 
are adjusted to retain their original meaning. 

The basic list operations can be categorized by the following functions: 

Create application lists 

Query application lists and constituent lists 

Update application lists and constituent lists 

Update application lists only 

Boolean operations 

Delete application lists. 

Included with the list operations descriptions are the error and wamiug 
messages that' may be returned. Appendix C contains a complete list of these 
messages along with their numeric codes. 


4-38 



Cl UM560240031U 
July 1989 


4.4.1 Create Operations - Application Lists 

These operations create application lists. The first two create empty 
lists to be updated by the user routine. The others create lists of 
entities based on some selection criteria. 

The create routines are shown Table 4-8, and the following pages. 

TABLE 4-8 

CREATE ROUTINES 


DESCRIPTION 

ROUTINE 

Creates an empty list. 

MAL 

Create an empty list of specified size. 

MALN 

Create a list of entities with a given KIND. 

MALK 

Create a list of entities with a given KIND that are 
found within another list. 

MALKL 

Makes a copy of a list. 

MALCPY 

Create an application list of constituent entity 
references. 

MAEC 

Create an application list of inclusive constituent 
entities. 

MAECI 

Create an application list of inclusive constituents 
by KIND. 

MAECIK 


4-39 


COKTMH/M 









Cl UM560240031U 
July 1989 


TABLE 4-8 (contd.) 


DESCRIPTION 

ROUTINE 

Create an application list of entities of a specified 

KIND taken from the constituents of an entity or from 
the constituents of a list of entities. 

MALKC 

Create an application list of user entity references. 

MAEU 

Create an application list of inclusive user entities. 

MAEUI 

Create an application list of inclusive users by KIND. 

MAEUIK 

Create an application list of entities of a specified KIND 
taken from the users of an entity or from the users of a 
list of entitles. 

MALKU 


4-40 






FUNCTION: 

FORMAT: 


DESCRIPTION: 
The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAL 


Creates an empty list. 

MAL(KEYl.IRC) 

INPUT: 

NONE 

OUTPUT: 


KEY1 

: 

LISTKEY 




The key of 

the empty list 

IRC 

: 

INTEGER 




The return 

code. 


An empty list is created, 
return code values are: 

Cannot create list. 
No more core memory. 


0 = Success 
3 = Failure 
AO = Failure 


4-41 


COWTHOVW 


Cl UM560240031U 
July 1989 


MALN 


FUNCTION: 

FORMAT: 


Create an empty list of specified size. 
MALN(LSIZE,KEY1,IRC) 


INPUT: 



LSIZE : 

INTEGER 

* 


The number 

of entries in the list. 

OUTPUT: 



KEY1 : 

LISTKEY 



The key of 

the empty list of specified size 

IRC : 

INTEGER 



The return 

code. 


DESCRIPTION: An empty application list will be created with sufficient 
space to accommodate LSIZE entries. All entries are 
initialized to nil. 


The possible return code values are: 

0 = Success 
3 * Failure 
15 = Failure 
38, 39, AO * Failure 


Cannot create list. 

Requested a list size too large. 
No more core memory. 


4-42 


Cl UM560240031U 
July 1989 


HALK 


FUNCTION: 

Create a list of 

entities with a given KIND. 

FORMAT: 

MALK(KIND,KEY1,IRC) 


INPUT: 

KIND : 

INTEGER 

A valid KIND code. 


OUTPUT: 

KEY1 : 

LISTKEY 

The list of all entities of the specified 
KIND. 


IRC : 

INTEGER 

The return code. 


DESCRIPTION: KEY1 Is Initialized to nil. If KIND is a valid value, all 
entities of the given KIND will be copied into KEY1. 

The possible return code values are: 

0 « Success 

38, 39, 40 * Failure No more core memory exists. 

-1 * Warning No such kind exists. 

No list is created for failures or warnings. 


4-43 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MALKL 


Create a list of entities with a given KIND that are found 
within another list. 

MALKL(KEY1,KIND,KEY2,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entitles whose list is 
to be searched for the specified KIND. 

KIND : INTEGER 

The KIND code of an entity. 

OUTPUT: 

KEY2 : LISTKEY 

The list that will contain all entities of 
the given KIND found within the list 
specified by KEY1. 

IRC : INTEGER 

The return code. 

KEY2 is initialized to nil. If ICEY1 is an entity key, copy 
all constituents of the given kind on KEY2. If KEY1 is a list 
key, put all entities on the list of the given kind on KEY2. 

return code values are: 


0 • Success 



14 m Failure 

Model is corrupted. 


17 « Failure 

KEY1 is not a valid 

entity key 


or list key. 


18 - Failure 

KEY1 is nil. 


40 * Failure 

No more core memory 

exists. 

-1 « Warning 

No such kind exists 

• 

-6 « Warning 

The entity or list i 

of entities 


had no constituents or entities 
of the given kind. 


No list is created for failures or warnings. 






Cl UM560240031U 
July 1989 


MALSPS 


FUNCTION: 

FORMAT: 


DESCRIPTION: 


Makes a copy of a list. 

MALCPY(KEY1,KEY2,IRC) 

INPUT: 

KEY1 : LISTKEY 

A list key whose entries will be copied. 

OUTPUT: 

KEY2 : LISTKEY 


The new list that will receive a copy of KEY1. 

IRC : INTEGER 

The return code. 

KEY2 will be created. The elements of KEY1 will be copied 
into KEY2. 


The possible return code values are: 

0 * Success 

17 * Failure KEY1 is nil or not an 

application list. 

38, 39, 40 * Failure No more core memory. 


4-45 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


MASS 


Create an application list of constituent entities. 


MA£C(KEY1,KEY2,IRC) 


INPUT: 

KEY1 

: ANYKEY 

The entity or list of entities 
list of direct constituents is 

for which a 
wanted. 

OUTPUT: 

KEY2 

LISTKEY 

The returned key of the application list of 
direct constituents. 

IRC 

INTEGER 

The return code. 



KEY2 is created. If KEY1 is an entity key then the 
constituent list of KEY1 will be copied into KEY2. If KEY1 is 
a list key then the constituent lists of each entity will be 
copied into KEY2. 

return code values are: 


0 « Success 

17 - Failure 

18 « Failure 
39 « Failure 
-6 ■ Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

The entity or list of entities 
had no constituents. 


No list is created for the return codes of failure (17, 18, 
39) or warning (-6), and KEY2 is nil. 


4-46 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

NOTE: 

The possible 


Cl UM560240031U 
July 1989 


MAECI 


Create an application list of inclusive entities. 
MAECI(KEY1,KEY2,IRC) 


INPUT: 

KEY1 

: ANYKEY 

The entity or list of entitles whose 
inclusive constituents are wanted. 

OUTPUT: 

KEY 2 

: LISTKEY 

The returned key of the Inclusive application 
list of constituents. 

IRC 

: INTEGER 

The return code. 


KEY2 is created. If KEY1 is an entity key, then the inclusive 
constituent list of KEY1 will be copied Into KEY2. If KEY1 is 
a list key, then the inclusive constituent lists of each 
entity will be copied into KEY2. KEY1 is not included in 
KEY2. No duplicate keys will exist. 

See the System Overview Section, page 1.5.2, for further 
explanation of inclusive constituents. 

return code values are: 


0 « Success 

17 « Failure 

18 ■ Failure 
39 * Failure 
-6 « Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 Is nil. 

No more core memory. 

The entity or list of entities 
had no constituents. 


No list is created for the return codes of failure (17, 18, 
39) or warning (-6), and KEY2 is nil. 


4-47 








FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAECIK 


Create an application list of inclusive constituents of a 
specified KIND. 

MAECIK(KEY1,KIND,KEY2,IRC) 


INPUT: 


KEY1 

: ANYKEY 

The entity or list of entities whose 
inclusive constituents are to be searched for 
by specified KIND. 

KIND 

: INTEGER 

The KIND code of an entity or an entity class 

OUTPUT: 

KEY2 

: LISTKEY 

The key of a list which will contain all 
entities of the specified KIND found within 
the inclusive constituents of KEY1. 

IRC 

: INTEGER 

The return code. 


KEY2 is initialized to nil. If KEY1 is a valid entity key, 
then the inclusive constituents of the specified KIND will be 
copied into KEY2. If KEY1 is a valid list key, then the 
inclusive constituents of all entities on the list of the 
specified KIND will be copied into KEY2. No duplicates will 
exist. 


return code values are: 

0 * Success 

17 - Failure 

18 ■ Failure 
40 * Failure 
-6 « Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

The entity or list of entities 
had no constituents of the given 
KIND. 


No list is created for the return codes of failure or warning. 





FUNCTION: 


FORMAT: 


DESCRIPTION: 


The possible 


38, 39 


Cl UM560240031U 
July 1989 


MALKC 


Create a list of entities of a specified kind found within the 
constituent list of an entity or the constituent lists of a 
list of entities. 

MALKC(KEY1,KIND,KEY2,IRC) 


INPUT: 



KEY1 

• 

ANYXET 

The key to an entity or list of entities 

KIND 

• 

« 

ORDJCEND 

Any valid kind value. 

OUTPUT: 



KEY2 

• 

• 

LISTKEY 

A list of entitles found within the 
constituent list of an entity or the 
constituent lists of a list of entities. 

IRC 

• 

• 

INTEGER 

The return code. 


Given a valid kind value, the constituent of an entity or list 
of entities are collected. For each collected entity of the 
given kind, copy into KEY2. 


return code values are: 


0 ■ Success 

17 * Failure 

18 » Failure 
40 * Failure 
-1 « Warning 
-6 ■ Warning 


-11 ■ Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

Kind value is undefined. 

The entity or list of entities 
had no constituents of the given 
kind. 

The entity or list of entities 
had no constituents. 


No list is created For Failures or warnings. 


4-49 


ootnuowm 



FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


am 


Create an application list of user entity references. 
MAEU(KEY1,KEY2,IRC) 

INPUT: 

KEY1 ; ANYKEY 

The entity or list of entities for vhich a 
list of direct users Is wanted. 

OUTPUT: 

KEY2 : 1ISTKEY 

Returned key of the application list of 
direct users. 

IRC : INTEGER 

The return code. 


KEY2 is initialized to nil. If KEY1 is a valid entity key, 
then the user list of KEY1 will be copied into KEY2. If KEY1 
is a valid list key, then the user lists of each entity will 
be copied into KEY2. 


return code values are: 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

The entity or list of entities 
had no users. 

No list is created for the return codes of failure or warning. 


0 * Success 

17 * Failure 

18 - Failure 
AO * Failure 
-6 * Warning 


4-50 






FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAEUI 


Create an application list of inclusive user entities. 
MAEUI(KEY1,KEY2,IRC) 


INPUT: 

KEYI 

: ANYKEY 

The entity or list of entities whose 
inclusive u?ers are wanted. 

OUTPUT: 

KEY2 

: LISTKEY 

The returned key of the inclusive application 
list of users. 

IRC 

: INTEGER 

The return code. 


KEY2 is initialized to nil. If KEYi is a valid entity key, 
then the inclusive user list of KEYI will be copied into 
KEY2. If KEYI is a valid list key, then the inclusive user 
lists of each entity will be copied into KEY2. KEYI is not 
included in KEY2. There will be no duplicates. 

return code values are: 


0 - Success 

17 * Failure 

18 = Failure 
40 * Failure 
-6 * Warning 


KEYI is not a valid entity key 
or list key. 

KEYI is nil. 

No core core memory. 

The entity or list of entities 
had no users. 


No list is created for failures or warnings. 


FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


maeuik 


Create an application list of inclusive users by KIND. 

MAEUIK(KEY1,KIND,KEY2,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities whose 
inclusive users are to be searched for by 
specified KIND. 

KIND : INTEGER 

The KIND code of an entity or an entity class. 

OUTPUT: 

KEY2 : LISTKEY 

The key of a list which will contain all 
entities of the given KIND found within tne 
inclusive users of KEY1. 

IRC : INTEGER 

The return code. 


KEY2 is initialized to nil. If KEY1 is a valid entity key, 
then the inclusive users of the given KIND will be copied into 
KEY2. If KEY1 is a valid list key, then the inclusive users 
of all entities on the list of the given KIND will be copied 
into KEY2. No duplicates will exist. 


return code values are: 


KEY1 is not a valid entity key 
or list key. 
mi is nil. 

No more core memory. 

The entity or list of entities 
had no users of the given KIND. 

No list is created for failures or warnings. 


0 * Success 

17 - Failure 

18 s Failure 
40 s Failure 
-6 = Warning 


4-52 


OOWTHM/M 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1988 


MALKU 


Create a list of entities of a specified kind found vithln the 
user list of an entity or the user lists of a list of entities. 

MALKU(KEY1,KIND,KEY2,IRC) 


INPUT: 

KEY1 : ANYKEY 

The key to an entity or list of entities. 


KIND : ORD_KIND 

Any valid kind value. 


OUTPUT: 

KEY2 : LISTKEY 

A list of entities found vithln the user list 
of an entity or the user lists of a list of 
entitles. 

IRC : INTEGER 

The return code. 


Given a valid kind value, the users of an entity or list of 
entities are collected. For each collected entity of the 
given kind, copy into KEY2. 


return code values ire: 


Success 


Failure 

KEY1 is not a valid entity key 
or list key. 

Failure 

KEY1 is nil. 

Failure 

No more core memory exists. 

Warning 

Kind value undefined. 

Warning 

The entity or list of entities 
had no users of the given KIND. 

Warning 

The entity or list of entities 
had no users. 


No list is created for failures or warnings. 


4-53 




Cl UM560240031U 
July 1989 


4.4.2 Query Operations - Application Lists And Co nstituent Lists 

Table 4-9 shows routines that query application lists and constituent 
lists: 

TABLE 4-9 

QUERY OPERATIONS - APPLICATION AND CONSTITUENT LISTS 


DESCRIPTION 

ROUTINE 

Determine the number of entries in a list. 

MALNO 

Find the position in a list of a specified entity hey. 

MALFND 

Read the entity key at the specified position in the list. 

MALGTK 

Read the next entry in a list. 

MALRD 

Setup for reading in a forward direction. 

MALSTF 

Setup for reading in reverse direction. 

MALSTR 


Routines are further described on the following pages. 


4-54 













FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


MALNQ 


Count the entities in a list. 

MALNO(KEY1,KOUNT,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be counted 

OUTPUT: 

KOUNT : INTEGER 

The number of entities in the list. 

IRC : INTEGER 

The return code. 

KEY1 may be either an entity key or a list key. If KEY1 is an 
entity the number of constituents is returned. If KEY1 is a 
list the number of entities on the list is returned. 

return code values are: 


0 * Success 
17 - Failure 

40 « Failure 

KOUNT is returned zero for 


KEY1 is not an entity or an 
application list. 

No more core memory. 

. failures. 


38, 39, 




Cl UM560240031U 
July 1989 


HALEEE 


FUNCTION: Find the position of an entity in a list. If KEY1 is an 

entity, find its position in the constituent list of that 
entity. 

FORMAT: MALFND(KEY1,KEY2,IFIRST,IPOS,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities in vhich KEY2 
is to he found. 

KEY2 : ENTKEY 

The entity to be found in KEY1. 

IFIRST : INTEGER 

The position in KEY1 where the find operation 
is to start. 

OUTPUT: 

IPOS : INTEGER 

The position in KEY1 where KEY2 is found. 

IRC : INTEGER 

The return code. 

DESCRIPTION: KEY1 nay be either an entity key or a list key. If KEY1 is a 
list then KEY2 is found in the list. If KEY1 is an entity, 
then KEY2 is found in the constituent list of KEY1. KEY2 must 
be an entity key. The find starts at position IFIRST. Each 
entity in KEY1 is examined for equality with KEY2 starting 
with the specified position. If a match is found, then the 
position is returned in IPOS. If there is no match, then IPOS 
is returned as zero and IRC signals an error. If there are 
multiple matches, then only the first (leftmost) match is 
returned in IPOS. 

The possible return code values are: 

0 ■ Success 

17 « Failure KEY1 is not an entity or an 

application list. 

KEY1 is nil. 

No match was found. 

No more core memory. 


18 * Failure 
25 ■ Failure 
38, 39, 40 - Failure 


4-56 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


38, 39 


Cl UM560240031U 
July 1989 


MALGTK 


Get the Nth Key 

from a list. 

MALGTK(KEY1,IPOS 

,KEY2,IRC) 

INPUT: 

KEY1 : 

ANYKEY 

The entity or list of entities to be 
processed. 

IPOS : 

INTEGER 

The position in the list of the target entity 

OUTPUT: 

KEY2 : 

ENTKEY 

The requested key. 

IRC 

INTEGER 

The return code. 


If KEY1 is « list, get the IPOS entry from the list. If KEY1 
is an entity, get the IPOS entry from the constituent list of 
KEY1. 


return code values are: 

0 w Success 
14 * Failure 

17 - Failure 

40 « Failure 


IPOS is outside the range of the 
application list. 

KEY1 is not an entity or an 
application list. 

No more core memory. 


4-57 


ootrmovw 




Cl UM560240031U 
July 1988 


HALED 


FUNCTION: Read the next entry in a list. 

FORMAT: MALRD(KEY1,KEY2,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be read. 

OUTPUT: 

KEY2 : ENTKEY 

The entity of the next list entry. Next 
depends on the direction of the read set by 
MALSTF or MALSTR. 

IRC : INTEGER 

The return code. 

DESCRIPTION: The next entity in the list is returned. We recommend setting 
the direction by using MALSTF or MALSTR before the first time 
this routine is used to read a list. 

The possible return code values are: 

0 > Success 

17 « Failure KEY1 is not a valid entity key 

or list key. 

32 a Failure Cannot read constituent lis . 

33 a Failure Cannot read constituent list. 

38, 39, 40 a Failure No more core memory exists. 

-5 > Warning End of list reached. 


4-58 







FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


38, 39 


Cl UM560240031U 
July 1989 


MALSIF 


Setup for reading in forward direction. 
MALSTF(KEYl.IRC) 


INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be 
processed in a forward direction. 

OUTPUT: 

IRC : INTEGER 

The return code. 

If KEY1 is an entity, then the constituent list of KEY1 will 
be set up for forward processing. If KEY1 is an application 
list, the list will be set up for forward processing. 


return code values are: 

0 * Success 

17 - Failure 

18 • Failure 

32 m Failure 

33 « Failure 
40 * Failure 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

Cannot read constituent list. 
Cannot read constituent list. 
No more core memory. 


4-59 


OOWTMt/M 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


38, 39 


Cl UM560240031U 
July 1989 


halstr 


Setup for reading in reverse direction. 

MALSTR(KEY1,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to be 
processed in the reverse direction. 

OUTPUT: 

IRC 3 INTEGER 

The return code. 

If KEY1 is sot entity, then the constituent list of KEY1 will 
be set up Soar reverse processing. If KEY1 is an application 
list, the list will be set up for reverse processing. 

return code values are; 


0 * Success 



17 • Failure. 

KEY1 is not a valid entity key 


or list key. 


18 - Failure 

KEY1 is nil. 


32 - Failure 

Cannot read constituent 

list. 

33 - Failure 

Cannot read constituent 

list. 

40 « Failure 

No more core memory. 



4-60 






Cl UM560240031U 
July 1989 


4.4.3 Update Operations - Application Lists and Con stituent Lists 

Table 4-10 presents the update routines that apply to both application 
lists and constituent lists: 

TABLE. 4=lfl 

UPDATE OPERATIONS - APPLICATION AND CONSTITUENT LISTS 


DESCRIPTION 

• 

ROUTINE 

Attach an entity or list of entities 

to a list. 

MALATC 

Insert an entity or list of entities 

into a list. 

KALINS 

Remove an entity from a list. 


HALRMV 

Replace an entity in a list. 


MALRPL 

Replace a list (all of the entries). 


MALREP 

Reverse the order of a list. 


KALRVS 


Routines are further described on the following pages. 


4-61 








FUNCTION: 

FORMAT: 


DESCRIPTION: 

EXAMPLE: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MALATC 


Attach an entity or list of entities to a list. If KEY1 is an 
entity then attach to the constituent list of that entity. 

MALATC(KEY1,KEY2,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities to vhich KEY2 
is to be attached. 

KEY2 : ANYKEY 

The entity or list to be attached to KEY1. 

OUTPUT: 

IRC : INTEGER 

The return code. 

KEY1 may be either an entity key or a list key. If KEY1 is a 
list, then KEY2 is attached to the list. If KEY1 is an 
entity, then KEY2 is attached to the constituent list of 
KEY1. This will make KEY2 a constituent of KEY1. KEY2 may be 
either an entity key or a list key. If KEY2 is a list, then 
the entire list is attached to KEY1. This is the same as 
doing multiple attaches of an entity. If KEY2 is an entity, 
then the entity is attached to KEY1. 

See Sample Programs Section. 

return code values are: 

0 * Success 
9 ■ Failure 
10 * Failure 

40 ■ Failure 


XEY1 is nil. 

KEY1 is not an entity or an 
application list. 

No more core memory. 


4-62 




FUNCTION: 


FORMAT: 


DESCRIPTION: 


The possible 


38, 39 


Cl UM560240031U 
July 1989 


malins 


Insert an entity or list of entities into a list. If KEY1 is 
an entity, then insert into the constituent list of that 
entity. 

MALINS(KEY1,KEY2,IPOS,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities in which KEY2 
is to be inserted. 

KEY2 : ANYKEY 

The entity or list to be inserted in KEY1. 
IPOS : INTEGER 

The position in KEY1 where the insert is to 
take place. 

OUTPUT: 

IRC : INTEGER 

The return code. 


KZY1 nay be either an entity key or a list key. If KEY1 is a 
list, then KEY2 is inserted in the list. If KEY1 is an 
entity, then KEY2 is inserted in the constituent list of 
KEY1. KEY2 nay be either an entity key or a list key. If 
KEY2 la a list, then the entire list is Inserted in KEY1. If 
KEY2 is an entity, then the entity is inserted in KEY1. 

The insert takes place before IPOS. That is, the entity at 
IPOS la moved by one position if KEY2 is an entity or by the 
number of elements in the list if KEY2 is a list. Then the 
elements are moved into the vacated positions. 


return code values are: 

0 * Success 
14 ■ Failure 

17 « Failure 

18 * Failure 

32 ■ Failure 

33 ■ Failure 
40 * Failure 


Given position is outside range 
of list. 

KEY1 is not an entity or an 
application list. 

KEY1 is nil. 

Cannot read constituent list. 
Cannot read constituent list. 

No more core memory. 


4-63 


onrraouw 






FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 




Remove an entity from a list. If KEY1 is an entity, then 
remove it from the constituent list of that entity. 

MALRMV(KEY1,IPOS,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities from which an 
entity is to be removed. 

IPOS : INTEGER 

The position, in the list, of the entity to 
be removed. 

OUTPUT: 

IRC : INTEGER 

The return code. 

KEY1 may be either an entity key or a list key. If KEY1 Is a 
list, then an entity is removed from the list. If KEY1 is an 
entity, then an entity is removed from the constituent list of 
KEY1. IPOS is the position number of the entity to be 
removed. The MAS delete rules are used to see if the entity 
can be removed from the constituent list. If the entity can 
be removed, it is removed; and if it is the last constituent 
in the list, the list is deleted. If the entity removed is 
marked for delete, an attempt to delete the entity will occur. 

return code values are: 


0 = Success 


14 * Failure 

IPOS Is outside range of list. 

17 - Failure 

KEY1 is not a valid entity key 


or list key. 

18 « Failure 

KEY1 is nil. 

27 - Failure 

Delete rules prohibit delete. 

32 * Failure 

Cannot read constituent list. 

33 « Failure 

Cannot read constituent list. 

40 * Failure 

No more core memory. 

42 * Failure 

Delete rules defined incorrectly 


4-64 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MALFPL 


Replace an entity in a list. If KEYl is an entity, then 
replace in the constituent list of that entity. 

MALRPL<KEY1,KEY2,IPOS,IRC) 


INPUT: 

KEY1 

• 

ANYKEY 

The entity or list of entities in which an 
entity is to be replaced. 

KEY2 

• 

• 

ENTKEY 

The entity that will replace an entity in 
KEYl. 

IPOS 

• 

• 

INTEGER 

The position of the entity in KEYl to be 
replaced. 

OUTPUT: 

IRC 

e 

• 

INTEGER 

The return code. 

KEYl may be either an entity key or a list key. If KEYl is a 
list, then an entity is replaced In the list. If KEYl is an 
entity, then an entity is replaced in the constituent list of 
KEYl. KEY2 must be an entity key. The entity at position 
IPOS in KEYl will be replaced by KEY2. If the entity being 
replaced is "MARKED FOR DELETE," then an attempt is made to 
delete the entity. 


IPOS is outside range of list. 
KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

Delete rules prohibit delete. 
Cannot read constituent list. 
Cannot read constituent list. 
No more core memory exists. 


return code values are: 

0 * Success 
1A = Failure 

17 - Failure 

18 * Failure 
27 * Failure 

32 * Failure 

33 « Failure 
, AO » Failure 


4-65 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MALBEP 


Replace a list. If KEY1 is an entity, then replace the 
constituent list of that entity. 

MALREP(KEY1,KEY2,IRC) 


INPUT: 

KEY1 

: ANYKEY 

The entity 

KEY2 

: ANYKEY 

The entity 

OUTPUT: 

IRC 

: INTEGER 

The return 


or list of entities to be replaced, 
or list to replace KEY1. 

code. 


KEY1 may be either an entity key or a list key. If KEY1 is a 
list, then KEY2 replace*. KEY1. If KEY1 is an entity, then the 
constituent list of KEY1 is replaced by KEY2. KEY2 may be 
either an entity or a list key. 


return code values are: 

0 * Success 

17 - Failure 

18 * Failure 

32 - Failure 

33 * Failure 
40 » Failure 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

Cannot read constituent list. 
Cannot read constituent list. 
No more core memory. 


4-66 


coirmoi/m 







FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MA1EYS 


Reverse the order of the entities in a list. 

MALRVS(KEY1,IRC) 

INPUT: 

KEY1 : ANYKEY 

The entity or list of entities in which the 
order of the entities is to be reversed. 

OUTPUT: 

IRC : INTEGER 

The return code. 

KEY1 nay be eitber an entity key or a list key. If KEY1 is a 
list, then the list is reversed. If KEY1 is an entity, then 
the constituent list is rt 'sed. 


return code values are: 

0 * Success 
17 = Failure 

40 » Failure 
-6 « Warning 


KEY1 is not a valid entity key 
or list key. 

No more core memory exists. 
KEY1 is empty. 


4-67 


OOMTROL/W 




Cl UM560240031U 
July 1989 


4.4.4 UDdate Operations - Application Lists Only 


Table 4-11 shows routines that update an application list 
apply to constituent lists): 

TABLE 4-11 

UPDATE OPERATIONS - APPLICATION LISTS 

(they do not 

DESCRIPTION 

ROUTINE 

Reset an application list to be reused. 

MALRST 

Remove duplicate entries from an application list. 

MALRDE 

Sort the entries in an application list into 
user-constituent order. 

MALROR 

Sort the entries in an application list into inclusive 
user-constituent order. 

MALRRI 


Soutines are further defined In the following pages. 


4-68 







Cl UM560240031U 
July 1989 


HAL BS .I 


FUNCTION: 

FORMAT: 


Reset an application list. 

MALRST(KEYL,RC) 

INPUT: 

KEYL : LISTKEY 

The key of the application list whose entries 
are to be reset. 

OUTPUT: 

RC : INTEGER 

The return code. 


DESCRIPTION: Given an application list that has one or more entries, all 
entries will be removed from the list, thus maintaining the 
size of the original list. 


The possible return code values are: 

0 = Success 

17 * Failure 

18 * Failure 
38, 39, 40 - Failure 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 


4-69 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


M AI R DE 


Remove duplicate entries in a list. 

MALRDE(KEYl.IRC) 

INPUT: 

KEY1 : LISTKEY 

The input/output list. 

OUTPUT: 

IRC : INTEGER 

The return code. 

Any duplicate entities found in the input list will be 
removed. The change is made in-place. The first instance of 
each entity will be kept. 


return code values are: 

0 * Success 
17 « Failure 

26 * Failure 
AO * Failure 


KEY1 is not a valid entity key 
or list key. 

Duplicates not removed. 

No more core memory. 


4-70 






FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


MALROR 


Reorder a list of entities so that the users appear at the 
head of the list. 


MALROR(KEYL.IRC) 


INPUT: 

KEYL : 

LISTKEY 

Key of an application list. 

OUTPUT: 

IRC : 

INTEGER 

Return code 

0 * Good return 
<0 Critical error 
>0 Warning 

For each member 
members for its 

of the list, search each of the remaining 
users; put users at the head of the list. 

return code values are: 

0 * Success 

15 * Error 

17 « Error 

18 * Error 

38 ■ Error 

A list has too many members 
Input key not a list key. 
Input key is nil. 

No more core available. 


4-71 






FUNCTION: 

FORMAT: 

DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MALRRI (MALRORI) 


Sort the entities in an application list in inclusive user to 
constituent order. 

MALRRI(KEY,RRC) or MALRORI(KEY,RRC) 

INPUT: 

KEY : ANYKEY 

The key to an entity or list of entities. 

OUTPUT: 

RRC : INTEGER 

The return code. 


For each entity on the input list, its user list is expanded 
inclusively. All users appearing on the input list will occur 
before their constituents. 

return code values are: 


0 ■ Success 

17 « Failure 

18 « Failure 
40 * Failure 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 


4-72 





Cl UM560240031U 
July 1989 


4.4.5 Boolean Operations - Application Lists and Con stituent Lists 

For Boolean operations, there are two input lists and one output list. 
The application is responsible for providing two input lists consistent with 
the Boolean operation to be performed, ho validation checking is done. If 
one or both of the input lists contain duplicate entities, then the output 
list may also contain duplicate entities. This result may not be consistent 
with the Boolean theory operation being performed. 

The Boolean routines are shown in Table 4-12, and the following pages. 

TABLE 4-12 
BOOLEAN ROUTINES 


DESCRIPTION ROUTINE 
Create a list from a Boolean "AND" on two input lists. MALAND 
Create a list from a Boolean "NOT" on two input lists. HALNOT 
Create a list from a Boolean "OR" on two input lists. MALOR 





Cl UM560240031U 
July 1989 


FUNCTION: 

FORMAT: 


DESCRIPTION: 


The possible 

38, 39 


M AIA KB 


Create a list from a Boolean "AND" on two input lists. 

MALAND( KEY1,KEY2,KEY3,1RC) 

INPUT: 

KEY1 : ANYKEY 

An entity or a list that is to be AND'ed. 

KEY2 : ANYKEY 

An entity or a list that is to be AND'ed. 

OUTPUT: 

KEY3 : LISTKEY 

The list of entities that occurred in both 
KEY1 and KEY2. 

IRC : INTEGER 

The return code. 

KEY3 is initialized to nil. KEY1 may be either an entity key 
or a list key. If KEY1 is an entity key, then the constituent 
list of KEY1 is AND'ed with KEY2. If KEY1 is a list key, then 
KEY1 is AND'ed with KEY2. KEY2 may be either an entity key or 
a list key. If KEY2 is an entity key then the constituent 
list of KEY2 is AND'ed with KEY1. If KEY2 is a list key then 
KEY2 is AND'ed with KEY2. The list KEY3 is created, 
corresponding to the set theoretical intersection of KEY1 and 
KEY2. 


return code values are: 


0 * Success 

17 « Failure 

18 » Failure 
40 « Failure 
-6 » Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

There were no entities in common 


No list is created for failures or warnings. 


4-74 





Cl UM560240031U 
July 1989 


HALNOT 


FUNCTION: Create a list from a Boolean "NOT" on two input lists. 

FORMAT: MALN0T(KEY1,KEY2,KEY3,IRC) 

INPUT: 

KEY1 : ANYKEY 

An entity or a list that is to be NOT'ed. 

KEY2 : ANYKEY 

An entity or a list that is to be NOT'ed. 

OUTPUT: 

KEY3 : LISTKEY 

The list of entitles that occurred in KEY1 
but not in KEY2. 

IRC : INTEGER 

The return code. 

DESCRIPTION: KEY3 is initialized to nil. KEY1 nay be either an entity key 
or a list key. If KEY1 is an entity key, then the constituent 
list of KEY1 is NOT'ed with KEY2. If KEY1 is a list key, then 
KEY1 la NOT'ed with KEY2. KEY2 may be either an entity key or 
a list key. If KEY2 is an entity key, then the constituent 
list of KEY2 is NOT'ed with KEY1. If KEY2 is a list key, then 
KEY2 is NOT'ed with KEY1. The list KEY3 is created, 
corresponding to the set theoretical difference of KEY1 and 
KEY2. 

The possible return code values are: 

0 * Success 

17 * Failure KEY1 is not a valid entity key 

or list key. 

38, 39, 40 ■ Failure No more core memory. 

-6 * Warning There was no difference between 

the two lists. 

No list is created for failures or warnings. 


4-75 






Cl UM560240031U 
July 1989 


MALOR 


FUNCTION: 

FORMAT: 


Create a list from a Boolean "OR" on two input lists. 

MALOR(KEY1,KEY2,KEY3,IRC) 

INPUT: 

KEY1 : ANYKEY 

An entity or a list that is to be OR'ed. 

KEY2 : ANYKEY 

An entity or a list that is to be OR'ed. 

OUTPUT: 

KEY3 : LISTKEY 

The list of entities that occurred in either 
KEY1 or KEY2. 

IRC : INTEGER 

The return code. 


DESCRIPTION: KEY1 may be either an entity key or a list key. If KEY1 is an 

entity key, then the constituent list of KEY1 is OR'ed with 

KEY2. If KEY1 is a list key, then KEY1 is OR'ed with KEY2. 

KEY2 may be either an entity key or a list key. If KEY2 is an 

entity key, then the constituent list of KEY2 is OR'ed with 

KEY1. If KEY2 is a list key, then KEY2 is OR'ed with KEY1. 

The list KEY3 is created, corresponding to the set theoretical 
union of KEY1 and KEY2. There will be no duplicates in KEY3. 

The possible return code values are: 


0 * Success 

17 * Failure 

18 * Failure 
38, 39, 40 * Failure 

-6 * Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

No more core memory. 

Neither key has constituents nor 
application list. 


No list is created for failures or warnings. 



Cl UM560240031U 
July 1989 


4.4.6 Delete Ooerations - ADolication Lists Only 


Table 4-13 presents the delete routines: 

TABLE 4-13 

DELETE ROUTINES 


DESCRIPTION 

ROUTINE 

Delete an application list. 

MALD 

Delete all application lists. 

MALDA 

Delete an application list and all lists created 
after it. 

MALDI 

Set or unset the application list lock flag. 

MALOCK 


Delete routines are further described on the following pages. 


4-77 


CONTROL/** 









Cl UM560240031U 
July 1989 


MALD 


FUNCTION: Delete an application list. 


FORMAT: 


MALD(KEY1,IRC) 


INPUT: 

KEY1 


OUTPUT: 

IRC 


LISTKEY 

The list to be deleted. 


INTEGER 

The return code. 


DESCRIPTION: 


KEY1 oust not be an entity key. KEY1 is deleted. KEY1 cannot 
be recovered. 


The possible return code values are: 

0 = Success 
29 * Failure 
38, 39, 40 * Failure 


KEY1 is not a list key. 

No more core memory exists. 


4-78 


OONfWM/M 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


MALM 


Delete all application lists. 

MALDA(IRC) 

INPUT: 

NONE 

OUTPUT: 

IRC : INTEGER 

The return code. 

All application lists will be deleted. They cannot be 
recovered. If an application list is locked, then it will not 
be deleted. 

return code values are: 


38, 39, 40 = Failure 


No more core memory exists. 





Cl UM560240031U 
July 1989 


MALPJ 


FUNCTION: 

FORMAT: 


Delete an application list and all lists created after it. 
MALDI(KEY1,IRC) 


INPUT: 

KEY1 


OUTPUT: 

IRC 


LISTKEY 

The list Co be deleted. 


INTEGER 

The return code. 


DESCRIPTION: KEY1 must not be an entity key. The list identified by KEY1 

and all lists created after it will be deleted. Deleted lists 
cannot be recovered. If an application list is locked, then 
it will not be deleted. 


The possible return code values are: 
17 « Failure 
38, 39, AO a Failure 


KEY1 is not a list or no lists 
exist. 

No more core memory exists. 


4-80 


OOKTWOUM 






Cl UM560240031U 
July 1989 


malqck 


FUNCTION: Set or unset the application list lock flag. 

FORMAT: MALOCK(KEYl,LOCK,IRC) 


INPUT: 

KEY1 

: LISTKEY 

The list to be set 

LOCK 

: INTEGER 

The lock setting 
=0 unlocked 
si locked 

OUTPUT: 

IRC 

: INTEGER 

The return code 


DESCRIPTION: A list that is locked will not be deleted by the MAS interface 
functions MALDA or MALDI. All other functions that delete 
lists will delete a locked list. 


The possible return code values are: 

KEY1 is not a list. 

No more core memory exists. 


17 * Failure 
38, 39, 40 « Failure 





Cl UM560240031u 
July 1989 


4 * 5 Execute O peration* 


entity on a 1 is t\i th"!^ s e* t 1In R «^h’ lt , 1 * necessar y to process eacl 
entity of a particular KIND could be -_.,™ Ut *j e r exara Ple of how each 
FORTRAN exaaple; processed is shown in the following 


100 


200 


CALL MALK(KNDVAL,LIST,IRO 

CALL MALSTF(LIST,IRC) 

?wL!? ALKD<LIST » ENTITr . I «C) 

IF(IRC .NE. 0) GOTO 200 

CALL MAEGTK(ENTITT,ADB,IRC> 

CttL OSSSraCaum.ABB.USBBAT.OBO 

CALL MALD(LIST,IRC) 


constituent list, ITl ** * pplicat *°n 1I S , 

user-written subroutine «* vhetbeAr^i""" SSl£ 


CAU. XAmQCnroVAL.BSDMT.OSSSUB.mc,!,^ 


4-82 


OONTHOWa* 














Cl UM560240031U 
July 1989 


The possible return code values from the user-vritten subroutine affect 
the EXECUTE operations as follows: 

0 through 7 The EXECUTE operation will continue processing. 

< 0 or > 7 The EXECUTE operation will halt processing and return 

the URC to the user routine that called the EXECUTE 
operation. 

There are specific meanings within the above ranges for some of the 
EXECUTE operations. These are explained in the routine descriptions. 

Table 4-14 shows the EXECUTE routines: 

TABLE 4-14 

EXECUTE ROUTINES 



DESCRIPTION 

ROUTINE 

Execute 

a procedure on an entity or a list of entities. 

MAEXEQ 

Execute 

a procedure on all entitles of a specified KIND. 

MAKXEQ 

Execute 

a procedure on an entity or a list of entities. 

MAEXEQ 

Execute 

a procedure on the constituents of an entity. 

MAECXQ 

Execute 

a procedure on the users of an entity. 

MAEUXQ 

Execute a sorting procedure on the constituents of an 
entity or the entities in a list. 

MALSRT 


Routines are described in the following pages 





Cl UM560240031U 
July 1989 


MAEXEQ 


FUNCTION: Execute a procedure on a entity or a list of entities. 


FORMAT: 


MAEXEQ(KEY1,DATA,PROC,RCC,IRC) 


INPUT: 

KEY1 

• 

• 

ANYKEY 

The entity or list of entities on which the 
application procedure should be performed. 

DATA 

• 

• 

BLKDATA 

The application-defined data structure that 
is passed to the application-defined 
procedure. 

PROC 

• 

• 

ROUTINE 

Application-defined procedure that processes 
one entity at a time. 

OUTPUT: 

RCC 

• 

• 

INTEGER 

The procedure PROC return code. 

IRC 

• 

• 

INTEGER 

The MAS return code. 


DESCRIPTION: The entity, or each entity on an application list, is passed 

to the application-defined procedure. The operation performed 
on the entity ia determined by the application-defined 
procedure. Processing of application lists occurs in the 
forward direction. Unless the default direction has been 
changed by previous processing or by s call to MALSTF or 
MALSTR. Processing halts when the application-defined 
procedure returns RRC > 7 or RRC < 0 after processing an 
entity. 


The possible return code values are: 

0 ■ Success 

17 « Failure 

18 * Failure 

23 ■ Execution Halted 

24 ■ Execution Halted 
38, 39, 40 - Failure 

-5 » Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

RRC > 7 and RRC < » 15. 

RRC > 15 or RRC < 0. 

No more core memory exists. 

End of list reached. 


4-85 


ooKntovm 





Cl UM560240031U 
July 1989 


turns 


FUNCTION: Execute a procedure on all entitles of a specified kind. 

FORMAT: MAKXEQ(KIND,DATA,PROC,RCC,IRC) 

INPUT: 

KIND s INTEGER 

The KIND value of the entities to be 
processed. 

DATA : BLKDATA 

The application-defined data structure, which 
is passed to the application-defined 
procedure. 

PROC : ROUTINE 

Application-defined procedure that processes 
one entity at a time. 

OUTPUT: 

RCC : INTEGER 

The procedure PROC return code. 

IRC : INTEGER 

The MAS return code. 

DESCRIPTION: Each entity of the specified kind is passed to the 

application-defined procedure. The order of processing is in 
the reverse order for which the entities were created. When 
the application-defined procedure returns SRC > 7 or RRC < 0, 
processing halts. 

The possible return code values are: 

0 « Success 

23 « Execution Baited RRC > 7 and SRC < * 15. 

24 « Execution Halted RRC > 15 or RRC < 0. 

38, 39, 40 ■ Failure No more core memory exists. 

-1 “ Warning No such kind exists. 


4-86 






Cl UM560240031U 
July 1989 


HALXE2 


FUNCTION: Execute a procedure on a entity or a list of entities. 

Construct an output list of entities as determined by the 
application procedure. 

FORMAT: MALXEQ(KEY1,DATA,PROC.KEY2,RCC,IRC) 


INPUT: 

KEY1 

• 

ANYKEY 

The entity or list of entities to be 
processed. 

DATA 

« 

• 

BLKDATA 

The application-defined data structure, which 
is passed to the application-defined 
procedure. 

PROC 

• 

• 

ROUTINE 

Application-defined procedure that processes 
one entity at a time. 

OUTPUT: 

KEY 2 

• 

• 

LISTKEY 

The list created by this function. 

RCC 

• 

• 

INTEGER 

The procedure PROC return code. 

IRC 

• 

• 

INTEGER 

The return code produced by this operation. 


DESCRIPTION: An empty list (KEY2) is created. The entity, or each entity 
in sequence if a list is supplied, is passed to the 
application- defined procedure. The operation performed on 
the entity is determined by the application-defined 
procedure. When the application-defined procedure return code 
is "success," (RCC > 0 or 1), the entity just processed is 
added to the result list. When an application-defined 
procedure returns code is "failure", (<0 or > 7), MALXEQ is 
terminated. When an application-defined procedure return code 
is "warning" (2 through 7), the entity just processed is not 
placed on the result list, but processing continues. 

The processing of application lists occurs in the forward 
direction unless the default direction has been changed by 
previous processing or by a call to MALSTF or MALSTR. 

4-87 


ooKmouw 




Cl UM560240031U 
July 1989 


The possible return code values are: 

0 * Success 

17 = Failure 

18 = Failure 

23 = Execution Halted 

24 * Execution Halted 

32 = Failure 

33 = Failure 
38, 39, 40 * Failure 

-2 * Warning 

-6 * Warning 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

ESC > 7 and ESC < = 15. 

EEC > 15 or EEC < 0. 

Cannot read constituent list. 
Cannot read constituent list. 

No nore core memory exists. 

An entity processed with BBC > 1 
and BBC < ■ 7. 

No entities processed with RRC = 
0 or EEC * 1. 


4-88 







FUNCTION: 

FORMAT: 


DESCRIPTION: 


Cl UM560240031U 
July 1989 


MAECXQ 


Given an application-defined procedure, perform this procedure 
on the constituents of an entity or list of entities. 

MAECXQ(KEY1,DATAREC,PR0CNM,KEY2,RRC,IRC) 


INPUT: 

KEY1 


DATAREC 


PROCNM 


OUTPUT: 

KEY2 


RRC 


ISC 


ANYKEY 

Key of an entity or an application list that 
is constituent(s) are to be processed. 

BLKDATA 

The application-defined data structure that 
is passed to the application-defined 
procedure. 

ROUTINE 

Application-defined procedure that processes 
one entity at a time. 


LISTKEY 

Key to the list of constituents that 
processed vith RRC • 0, 1; routine will 
append to KEY2 if a valid list key. 

INTEGER 

Return code of the application-defined 
procedure. 

INTEGER 
Return code 


Each constituent of an entity is processed by the application- 
defined procedure. Each constituent processed vith RRC = 0 or 
1 is added to KEY2. For an application list, entities are 
processed in the direction set by previous processing or by a 
call to MALSTF or MALSTR; the constituents of these entities 
are processed in the forward direction only. (Each 
constituent processed vith RRC = 0 or 1 is added to KEY2.) 
Processing halts when the application-defined procedure 
returns RRC > 7 or RRC < 0 after processing a constituent. 


4-89 





Cl UM560240031U 
July 193d 


Ihe possible return code values ere: 


0 = Success 

17 * Failure 

18 * Failure 

23 * Execution Halted 

24 * Execution Halted 

32 * Failure 

33 « Failure 
38, 39, 40 * Failure 

-2 * Warning 

-6 = Warning 


KEY1 is not a valid entity key 
or list key. 

KEYl is nil. 

RRC > 7 and RRC < = 15. 

RRC > 15 or RRC < 0. 

Cannot read constituent list. 
Cannot read constituent list. 

No Bore core memory exists. 

An entity processed with RRC > 1 
and RRC < * 7. 

Ko entities processed with 
RRC * 0 or RRC * 1. 


4-90 



Cl UM560240031U 
July 1989 


MAEUXQ 


FUNCTION: Given an application-defined procedure, perform this procedure 

on the users of an entity or list of entities. 

FORMAT: MAEUXQ(KEY1,DATAREC,PROCNM,KEY2,RRC,IRC) 


INPUT: 

KEY1 

: ANYKEY 

Key of an entity or an application list that 
is user(s) are to be processed. 

DATAREC 

: BLKDATA 

The application-defined data structure that 
passed to the application-defined procedure. 

PROCNM 

: ROUTINE 

Application-defined procedure that processes 
one entity at a time. 

OUTPUT: 
KEY 2 

: LISTKEY 

Key to the list of users that processed with 
RRC * 0, 1; routine will append if given a 
valid list key. 

RCC 

: INTEGER 

Return code of the application-defined 
procedure. 

IRC 

: INTEGER 

Return code 

DESCRIPTION: Each user of an entity is processed by the application-defined 
procedure. Each user processed vith RRC * 0 or 1 is added to 
KEY2. For an application list, entities are processed in the 
direction set up by previous processing or by a call to MALSTF 
or MALSTR; the users of these entities are processed in the 
forward direction only. (Each user processed with RRC * 0 or 

1 is added to KEY2. Processing halts when the 


application-defined procedure returns RRC > 7 or RRC < 0 after 
processing a user. 


4-91 



Cl UM560240031U 
July 1989 


The possible return code values are: 

0 = Success 

17 = Failure 

18 * Failure 

23 « Execution Halted 

24 s Execution Halted 

32 = Failure 

33 * Failure 
38, 39, 40 * Failure 

-2 = Warning 

-6 * Warning 


KEJT1 is not a valid entity key 
or list key. 

KEY1 is nil. 

ESC > 7 and SRC < * 15. 

RRC > 15 or SRC < 0. 

Cannot read constituent list. 
Cannot read constituent list. 

Ho sore core memory exists. 

An entity processed with RRC >1 
and SRC < = 7. 

Ho entities processed with RRC = 
0 or RRC = 1. 


4-92 


oomnot/m 



FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


malsrt 


Sort the constituents of an entity or the entities in an 
application list according to an application-defined algorithm 

MALSRT(KEY,PROCNAME,RRC) 


INPUT: 

KEY : 

ANYKEY 

The key to an entity or list 

of entities. 

PROCNAME : 

ROUTINE 

ROUTINE(CURRENT:ENTBLOCK; 

NEXT .-ENTBLOCK; 

FLIP :BOOLEAN; 

RR :IRC); 



Application-supplied routine with the above 
parameter list that determines the relative 
value of two entities in the input list. 

OUTPUT: 

RRC : 

INTEGER 

The return code. 



Given an entity or list of entities using a combination of 
bubblesort and quicksort, MALSRT sends a user-defined routine 
two entity ADBs. The routine returns a Boolean value 
indicating true if the first ADB is greater than the second or 
the second is less than or equal to the first entity. 

return code values are: 


0 = Success 

17 = Failure 

18 * Failure 
23 = Failure 
40 = Failure 


KEY1 is not a valid entity key 
or list key. 

KEY1 is nil. 

RR <> 0. 

No more core memory exists. 


4-93 


OOKTRO um 





Cl UM560240031U 
July 1989 


4.6 General Purpose Utilities 

This section contains descriptions of general purpose utility routines, 
as shown in Table 4-15, and the following pages. 

TABLE 4-15 

GENERAL PURPOSE UTILITIES 


DESCRIPTION 

ROUTINE 

Get number of different KIND values in the working-form 
model. 

MAECTK 

Get KIND value stored at specific position in KIND list. 

MAEKND 

Get actual model space used and amount of model free 
space. 

MASMSZ 

Determine the number of entities in the model of a 
specified KIND. 

MAKCNT 


4-94 


ootrmoL/w 









FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAECTK 


Get the number of different KIND values in the working-form 
model. 

MAECTK(KNDCNT,IRC) 


INPUT: 

NONE 


OUTPUT: 

KNDCNT : 

INTEGER 

The number of different KIND values in the 
working-form model. 

IRC : 

INTEGER 

The return code. 


Get the number of KIND values in the working-form model from 
the KIND list. 

NOTE: Works in conjunction with MAEKND. 
return code values are: 

0 = Success 

30 * Failure No model established. 

40 * Failure No more co’-e memory; had no 

constituents. 


4-95 


cotrrmum 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 


MAEEKB 


Get KIND value at specified position in the KIND list. 

MAEKND(KNDPOS,KNDVAL, IR C ) 

INPUT: 

KNDPOS : INTEGER 

The position in the standard array of where 
to get the KIND value. 

OUTPUT: 

KNDVAL : INTEGER 

The KIND value retrieved from the KIND list. 

IRC : INTEGER 

The return code. 

Get the KIND value at KNDPOS in the KIND list. 

NOTE: Works in conjunction with MAECTK. 


return code values are: 

0 * Success 

30 * Failure 

31 * Failure 
40 * Failure 


No model established. 
Corrupted model. 

No more core memory exists. 


4-96 


otmrtovm 



FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


Cl UM560240031U 
July 1989 


masmsz 


Determine actual model used space and model free space (in 
bytes). 

MASMSZ(MODSIZ.FRESIZ,IRC) 

OUTPUT: 

MODSIZ : INTEGER 

The total number of bytes used by the model. 
FRESIZ : INTEGER 

The total number of bytes of free space. 

IRC : INTEGER 

The return code. 

The used model space Is calculated by taking the difference of . 
allocated model space and free model space. This routine can 
only be used where the MAS memory manager is used. 

return code values are: 

0 * Success 


4-97 


coNiaouai 








Cl UM560240031U 
July 1989 


MAK CWT 


FUNCTION: Determine the number of entities in the model of a specified 

KIND. 

FORMAT: MAKCNT(KIND,COUNT,IRC) 


INPUT: 

KIND : 

INTEGER 



The KIND value for vhich a count is 
determined. 

to be 

OUTPUT: 

COUNT : 

INTEGER 



The number of entities in the model 
specified KIND. 

of the 

IRC : 

INTEGER 

The return code. 



DESCRIPTION: If the KIND specified is in the model, determine the number of 
entities with that KIND. 

The possible return code values are: 

0 * Success 


4-98 



Cl UM560240031U 
July 1989 


4.7 Special Purpose Utilities 

This section contains descriptions of special purpose utilities, as 
shown in Table 4-16, and the following pages. 

TAPLE-Srifi 

SPECIAL PURPOSE UTILITIES 



DESCRIPTION 

ROUTINE 

Delete 

delete 

an entity or list of entities but do not consider 
rules. 

MIDBD 

Remove 

marked. 

an entity from the constituent list and delete if 

MIDBRV 

Retrieve the run-time subschema for a given entity kind. 

MARSGT 

Create 

a run-time subschema for a given entity kind. 

MRSCR 

Delete 

the run-time subschema for a given entity kind. 

MARDLT 


4-99 


OONTBO/M 



Cl UM560240031U 
July 1989 


FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


HI PEE 


Delete an entity or list of entitles but do not consider the 
delete rules. 

MIDBD(KEYl.RC) 

INPUT: 

KEY1 : ANYKEY 

An entity or list of entitles that are to be 
deleted. 

OUTPUT: 

SC : INTEGER 

The return code. 

If KEY1 Is an entity, delete the entity. If KEY1 is a list, 
then eliminate duplicate entries and delete each entity on the 
list. 


return code values are: 

0 * Success 
26 * Failure 
29 - Failure 

32 ■ Failure 

33 * Failure 
40 « Failure 
-6 * Warning 

-11 * Warning 


Duplicates not removed. 

KEY1 is nil or not an entity key 
or a key to an application list. 
Cannot read constituent list. 
Cannot read constituent list. 

No more core memory. 

The entity or list of entities 
had no constituents. 

KEY1 had no entities to delete. 





FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 


38, 39 


Cl UM560240031U 
July 1989 


MIPBRV 


Remove an entity from the constituent list or remove an entity 
from a list of entities and delete if marked for delete. 

MIDBRV(KEY1,IPOS,RC) 

INPUT: 

KEY1 : ANYKEY 

An entity or list of entities from which an 
entity will be removed. 

IPOS j 

The position of the key that will be removed. 

OUTPUT: 

RC : INTEGER 

The return code. 

If KEY1 is an entity, select the entity at the input position 
from the constituent list of KEY1. Remove all occurrences of 
it from the user list of all its users. Remove all 
occurrences of it from the constituent list of KEY1. If the 
entity is marked for delete, attempt to delete it. 

If KEY1 is a list, delete it from the position indicated. If 
there was only one member in the list, the list is deleted. 

return code values are: 


0 « Success 

17 « Failure 

18 » Failure 

32 = Failure 

33 * Failure 

42 * Failure 
40 - Failure 


KEY1 is neither an entity or 
list key. 

KEY1 is nil 

Cannot read constituent list. 

List key. 

Cannot read constituent list. 

List key. 

Delete rules defined incorrectly. 
No more core memory exists. 


4-101 


OOMTHO(/M 






Cl UM560240031U 
July 1989 


FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


tt&RSSI 

To retrieve the run-time subschema for a given entity kind. 
MARSGT(RIND,SCHPTR,RC) 


INPUT: 

KIND 

ORDJCIND 

The kind of the entity vhose run-' 
subschema is to be retrieved. 

SCHPTR : 

T_SCHEMA_POINTER 

Pointer to the run-time subschema 

OUTPUT: 

RC : 

INTEGER 

The return code. 


Given a valid entity kind, a run-time subschema is located in 
the working form. 


return code values are: 
37 * Failure 

40 * Failure 
-1 * Warning 


A run-time subschema has not 
been established for this entity 
kind. 

No more core memory exists. 

No such kind exists. 


4-102 



Cl UM560240031U 
July 1989 


M BS SE 


FUNCTION: 

FORMAT: 


Create a run-time subschema for a given entity kind. 
MSSCR(KIND,SCH_S1ZE,RTSS,RC) 


INPUT: 

KIND : 


SCH SIZE : 


RTSS : 


OUTPUT: 

RC 


OED_XIND 

The kind of the entity whose run-time 
subschema is to be added. 

INTEGER 

The size of the schema to be created. 
T_SCHEMA_POINTER 

The pointer to the area containing the 
run-time subschema. 


INTEGER 

The return code. 


DESCRIPTION: Given a valid entity kind, a run-time subschema is added to 
the working form. 


The possible return code values are: 
19 = Failure 

38, 39, AO * Failure 
-1 * Warning 


A run-time subschema has already 
been established for this entity 
kind. 

No more core memory exists. 

No such kind exists. 


No subschema is created for all failures or warnings. 




FUNCTION: 

FORMAT: 


DESCRIPTION: 

The possible 

38, 39 


Cl UM560240031U 
July 1989 




To delete the run-time subschema for a given entity kind. 
MARDLT(KIND.RC) 

INPUT: 

KIND : ORD_KIND 

The kind of the entity whose run-time 
subschema is to be deleted. 

OUTPUT: 

SC : INTEGER 

The return code. 

Given a valid entity kind, a run-time subschema is deleted 
from the working form. 

return code values are? 

37 * Failure A run-time subschema has not 

been established for this entity 
kind. 

40 » Failure No more core memory exists. 

-1 * Warning No such kind exists. 


4-104 


ootmotmt 



Cl UM560240031U 
July 1989 


4.8 IBM/MVS Environment 
4.8.1 Compiling Considerations 

The NAS may be used by any application with the appropriate constants, 
types, and interface routine declarations. For PASCAL programs, these are 
defined in the following INCLD file. 

DSNAME = CADS.GMAP.V33.MASINC 

Member = APLTYP 


INCLUDE File 


The types and constants used for the Model Access Software which are 
contained in the INCLUDE file member APLTYP are listed below: 


CONST 

NULLJKEY 

TYPE 

ANYKEY 

EXT_RET_CODE 

LISTINDX 

LISTPSTN 

LISTSIZE 

NAMTYP 

ORD_KIND 

ROUTINE 

(* 

ENTKEY 

LISTKEY 


- 0 ; 


« INTEGER; 

* INTEGER; 

- INTEGER; 

■ INTEGER; 

« INTEGER; 

- PACKED ARRAY(.1..6.) OF CHAR; 

■ INTEGER; 

- ARRAY(.1..8.) OF CHAR; 

- ANYKEY; 

- ANYKEY; 


The INCLUDE file also contains the formal declarations for the interface 
routines. The member names in the INCLUDE file are the same as the 
interface routine names. 

4.8.2 Considerations Whe n Using The XEQ Routines (MAEXEQ. MALXEQ. MAKXEQ. 
M ASCXQ. MAEUXQ. MALSRT) 

If an EXECUTE routine is used, then the conventions presented in Figure 
4-2 apply. 

The user-written subroutine is passed as a parameter from the user 
routine to the EXECUTE operation. The method by which this is done in the 
multi-language environment supported by MAS is described below. 


4-105 


00KT10WM 








Cl UM560240031U 
July 1989 


The name of the user subroutine is defined to the user routine ir> PASCAL: 

REF USRSUB : ROUTINE; 

and in FORTRAN: 

COMMON/USRSUB/USRSUB/ 

This allovs the procedure to be passed as a parameter in a manner that 
is independent of the requirements of a particular language compiler. The 
EXECUTE operations correctly resolve this nonstandard linkage convention. A 
PASCAL user routine should have knowledge of the user subroutine only as a 
REF and not as a PROCEDURE. A PASCAL user subroutine must be declared as a 
SUBPROGRAM. The BLKDATA type must appear before the INCLUDE command for the 
formal declaration for the EXECUTE routine. 

4.8.3 Li nki ng S ans l flg a &lan s 

The MAS consists of PASCAL procedures declared as SUBPROGRAMS that have 
been processed by the linkage editor into a single module. The references 
to the PASCAL run-time support are unresolved. The module may be 
Incorporated into an application program by the appropriate data definition 
statement and linkage editor control statements containing the following: 

ddname * MASLIB 

disp = SHR 

dsname « CAD2.GMAP.V33.L0AD 

INCLUDE MASLIB(MAS) 

The TEST library has PASCAL CHECKING enabled and contains aids for error 
diagnosis. The PROD library has PASCAL NOCHECK and contains minimal error 
diagnosis. We recommend using the TEST version during software development. 

4.9 VAX/VMS E nvironment 

A -9.1 Compiling Considerations 

The MAS may be used by application with the appropriate constants, 
types, and interface routine declarations. For PASCAL programs, these are 
defined in the following INC file: 

directory - [GMAP.V33.MASINC] 

file name « APLTYP.INC 


4-106 


Q0N1WMI 



Cl UM560240031U 
July 1989 


INCLUDE File 


The types and constants used for 
contained in the INCLUDE file APLTYP 


the Model Access Software which are 
are listed below: 


CONST 

NULL_KEY 

TYPE 

ANYKEY 

EXT_RET_CODE 

LISTINDX 

LISTPSTN 

LISTSIZE 

NAMTYP 

ORD_KIND 

ROUTINE 

<* 

ENTKEY 

LISTKEY 


= 0; 

= INTEGER; 

= INTEGER; 

= INTEGER; 

* INTEGER; 

= INTEGER; 

- PACKED ARRAY(. 1.. 6.) OF CHAR; 

* INTEGER; 

*= ARRAY(. 1..8.) OF CHAR; 

* ANYKEY; 

* ANYKEY; 


*) 


The INC files also contain the formal declarations for the interface 
routines. The file names for the INC files are the same as the Interface 
routine names. 


4.9.2 Considerations When Using The XEO Routines (MAEXEQ. MALXEQ. MAKXEQ. 

M &E S XS L-M ABg Qq MftL.SEI) 

If an EXECUTE routine is used, then the conventions presented in Figure 
4-2 apply. 

The user-written subroutine Is passed as a parameter from the user 
routine to the EXECUTE operation. The method by which this Is done In the 
multi-language environment supported by MAS is described below. 

The name of the user subroutine is defined to the user routine in PASCAL: 

VAR USRSUB : [EXTERNAL]ROUTINE; 

and in FORTRAN: 


COMMON/USRSUB/USRSUB/ 

This allows the procedure to be passed as a parameter in a manner that 
is independent of the requirements of a particular language compiler. The 
EXECUTE operations correctly resolve this nonstandard linkage convention. A 
PASCAL user routine should have knowledge of the user subroutine only as an 
EXTERNAL VAR and not as a PROCEDURE. The BLKDATA type must appear before 
the INCLUDE for the format declaration of the EXECUTE routine. 


4-107 




Cl UM560240031U 
July 1989 


4.9.3 Linking Considerations 

The MAS consists of PASCAL procedures that have been compiled and 
inserted into an OLB/library. They may be incorporated into an application 
program by the appropriate data definition statement and linker control 
statement as follows: 

[GMAP.V33.MAS0LB]MAS30BJ.0LB/Library 


4-108 


OOKTHOt/W 






Cl UM560240031U 
July 1989 


SECTION 5 

NAME/VALUE INTERFACE 


5.1 Overview 

The NVI frees applications programmers from concern for the physical 
location of attributes for entities in the working form of the MAS. 
Applications programmers need only the attribute name and data type from the 
physical schema definition to obtain the attribute value. The benefits of 
the NVI include the ability to alter the physical data structure without 
impacting program source code, the removal of the need to program and 
maintain attribute data structures and access algorithms by the applications 
programmers, and the concentration of efficiency concerns at the system 
level. 

The following capabilities are provided to achieve the above benefits 
for various commonly used high-order application languages, application 
environments, and host processors. 

DIRECT QUERY/STORE SUBPROGRAMS, to be called by applications programs 
that use an attribute value for a specified entity (including an 
attribute for a constituent entity); 

PROCEDURAL QUERY SUBPROGRAMS, to be called by applications programs that 
require a list of entities that have a specified attribute value 
(including an attribute for a constituent entity); 

The Direct Query/Store and Procedural Query subprograms require 
translation of an attribute name into a location within the ADB, according 
to the physical schema definition for a particular entity KIND. A run-time 
subschema entry is created for those entity JCINDs that are present in the 
working form when they are referred to by a call to the NVI. The run-time 
subschema defines the mapping of an attribute name to the physical location 
of the attribute value. 

5.2 Direct Ou erv/Store 
5.2.1 Eunc Hq n 

The Direct Query function of the NVI obtains an attribute value from the 
MAS working form (Including an attribute of a constituent entity) for a 
specified entity key and attribute name. The Direct Store function replaces 
an attribute value in the MAS working form (including an attribute of a 
constituent entity) for a specified entity key and attribute name. Binding 
to the schema is performed at run time. 


5-1 


OONTHOLflOi 








Cl UM560240031U 
July 1989 


The current implementation provides for attribute data types of integer, 
real, string, logical, enumeration, pointer, and array. 

The definition of the attribute is obtained from the schema at run time. 
The current implementation uses either the GMAP Data Dictionary or the 
Run-Time Subschema binary files produced by the (MAP Schema Manager software 
as the source of schema information. The scope of the NVI is limited to the 
attributes of entities that are defined in the copy of the schema definition 
used by the application for processing. It is assumed that the entity 
instance corresponds to the schema definition for the entity. The default 
GMAP Data Dictionary includes 221 GMAP entities. It may be supplemented by 
using the GMAP Schema Manager software to add entity definitions. 

The HVI functions are designed for use by programs of any of the commonly 
used high-order languages (for example, the environment used for testing the 
HVI subprograms is a mixture of FORTRAH and PASCAL). One of the implications 
of this approach is that the application program that calls a HVI function 
must provide a data area for the attribute value that is compatible with the 
schema definition of the attribute (for example, the size of the data area 
when dealing with string data types). 

The attribute name used in a call to a HVI function is an array of 
characters. The name is terminated by a null (a byte containing a hexadecimal 
"00"). When the name refers to an attribute in a constituent entity, it 
consists of a segment containing the name of the attribute specifying the 
constituency (i.e., pointer type), followed by a segment containing the name 
of the attribute in the constituent. The name segments are separated by a 
period. There may be multiple segments for specifying compound constituency. 
Only the last segment is terminated by a null. Trailing blanks within a 
segment may be omitted. 

When referring to an element within an array, or to a subarray, the name 
of the attribute specifying the array is followed by open and close 
parentheses. The subscript value itself is placed in the numeric array 
associated with the name of the attribute. When the array is 
multidimensional, commas are inserted inside the parentheses. For an 
n-dlmension array, there will be n-1 commas to specify a single element. The 
commas Indicate the additional subscript values in the numeric array required 
to identify the element or the subarray. When referring to the entire array, 
there are no parentheses or commas. 


5-2 


ootmoLrm 







Cl UM560240031U 
July 1989 


5.2.2 Direct Query Format 

NVDQAN (Entity_Key, Name_String, Subscript_Values f Attribute_Value, 
Return_Code) 

where the data type for: 

Entity_Key is an ENTKEY (input). 

Name_String is a T_ATTRIBUTE_NAME; the number of characters used 

depends on the attribute name (input). 

Subscript_Values is a T_DIMEN_VALUE; the number of entries used depends 
on the number of dimensions specified (input). 

Attribute_Value is a T_ATTRIBUTE_VALUE (output). 

Return_Code is an EXT_RET_CODE (output). 

The possible return code values are: 

0 = Success. 

1 * Failure: the entity KIND is not defined in the run-time subschema. 

2 = Failure: the attribute name is not defined for the entity in the 

run-time subschema. 

3 * Failure: the entity key is nil (the KIND cannot be determined). 

-1 * Warning: an invalid entry in the GMAP Data Dictionary was detected 

during the translation of an attribute; the warning message 
written to ddname « OUTPUT describes the error in detail. 


An attribute value is obtained for the return codes for success (0) and 
warning (-1); no attribute value is obtained for the return codes of failure 
(1, 2, or 3). 


5-3 



Cl UM560240031U 
July 1989 


5.2.3 Direct Store Format 

NVDSAV (Entity_Key, Name_String, Subscript_Values, Attribute_Value, 
Retum_Code) 


where the data type 

for: 


Entity_Key 

is 

an ENTKEY (input). 

Name_String 

is a T_ATTRIBUTE_NAME; the number of characters used 
depends on the attribute name (input). 

Subscript_Values 

is 

on 

a T_DIMEN_VALUE; the number of entries used depends 
the number of dimensions specified (input). 

Attribute_Value 

is 

a T_ATTRIBUTE_VALUE (input). 

Retum_Code 

is 

an EXT_RET_CODE (output). 


The possible return, code values are: 


0 = Success. 

1 * Failure: the entity KIND is not defined in the run-time subschema. 

2 * Failure: the attribute name is not defined for the entity in the 

run-time subschema. 


3 ■ Failure: the entity key is nil (the KIND cannot be determined). 

-1 = Warning: an invalid entry in the GMAP Data Dictionary was detected 

during the translation of an attribute; the warning message 
written to ddname = OUTPUT describes the error in detail. 


An attribute value is replaced in the return codes for success (0) and 
warning (-1); the attribute value is not replaced for the return codes for 
failure (1, 2 , or 3). 

5.3 Procedural Query 

5.3.1 Function 

The Procedural Query function of the NVI evaluates an input application 
list of entities and creates an output application list of entities. The 
output is determined by a selection criterion based on an attribute of the 


5-4 





Cl UM560240031U 
July 1989 


entities in the HAS working form (including an attribute of a constituent 
entity). Entities are selected based on the specified relation to the 
specified value for the specified attribute name. Binding to the schema is 
performed at run time. 

The current implementation will evaluate attribute data types of integer, 
real, string, logical, enumeration, pointer, and array. 

The definition of the attribute is obtained from the schema at run time. 
The current implementation uses a file in the format of the GMAP Data 
Dictionary or the Sun-Time Subschema binary files produced by the GMAP Schema 
Manager software as the source of schema information. The scope of the NVI is 
limited to the attributes of entities that are defined in the copy of the 
schema definitions used by the application for processing. It Is assumed that 
the entity instance corresponds to the schema definition for the entity. The 
default GMAP Data Dictionary includes 221 GMAP entities. It may be 
supplemented by using the GMAP Schema Manager software to add entity 
definitions. 

The NVI functions are designed for use by programs of any of the commonly' 
used high order languages (for example, the environment used for testing the 
HVI subprograms is a mixture of FORTRAN and PASCAL). One of the implications 
of this approach is that the application program that calls a NVI function 
must specify an attribute value that Is compatible with the schema definition 
of the attribute (for example, the size of the data area when dealing with 
string data types). 

The attribute name used in a call to a NVI function is an array of 
characters. The name is terminated by a null (a byte containing a hexadecimal 
"00"). When the name refers to an attribute in a constituent entity, it 
consists of a segment containing the name of the attribute specifying the 
constituency (i.e., pointer type), followed by a segment containing the name 
of the attribute in the constituent. The name segments are separated by a 
period. There may be multiple segments for specifying compound constituency. 
Only the last segment is terminated by a null. Trailing blanks within a 
segment may be omitted. 

When referring to an element within an array, or to a subarray, the name 
of the attribute specifying the array is followed by open and close 
parentheses. The subscript value itself is placed in the numeric array 
associated with the name of the attribute. When the array is 
multidimensional, commas are inserted inside the parentheses. For an 
n-dlmenslon array there will be n-1 commas to specify a single element. The 
commas Indicate the additional subscript values in the numeric array required 
to identify the element or the subarray. When referring to the entire array, 
there are no parentheses or comas. 


5-5 




Cl UM560240031U 
July 1989 


5.3.2 Format 


MVPQAV (Candidate_List, Narae_String, Attribute_Value, Subscript_Values, 
Comparison_Operator, Selected_List, Retum_Code) 


where the data type for: 
Candidate_List 
Name_String 

Attribute_Value 

Subscript_Values 


is a LISTKEY (input). 

is a T_ATTRIBUTE_NAME; the number of characters used 
depends on the attribute name (input). 

is a T_ATTRIBUTE_VALUE (input). 

is a T_DIMEN_VALUE; the number of entries used 
depends on the number of dimensions specified (input). 


Comparison_Operator is an INTEGER (input). The possible values are: 

1 = Attribute value equal 

2 = Attribute value less than 

3 = Attribute value greater than 

4 = Attribute value not equal 

5 = Attribute value less than or equal 

6 = Attribute value greater than or equal 
is a LISTKEY (output), 
is an EXT_RET_CODE (output). 

The possible return code values are: 

0 * Success. 

1 * Failure: the entity KINO is not defined in the run-time subschema. 

2 * Failure: the attribute name is not defined for the entity in the 

run-time subschema. 


Selected_List 

RetumCode 


5-6 






Cl UM560240031U 
July 1989 


4 * Failure: Che call to HAS routine MAEXEQ failed. 

5 = Failure: the call to MAS routine MAL failed. 

-1 * Warning: an invalid entry in the GMAP Data Dictionary was detected 

during the translation of an attribute; the warning message 
written to ddnaae * OUTPUT describes the error in detail. 

A valid list of entity instances is obtained for the return codes for 
success (0) and warning (-1); no valid list of entity instances is obtained 
for the return codes of failure <1, 2, 4, or 5). 

5.4 Utilities 

5.4.1 Function 

The utility routines allow an application program to query the entity 
definitions at run-time. This is not normally necessary, but might be done 
during development testing, or if entity definitions are frequently changed, 
as a part of the one-time initialization for the application. 

The first utility routine, NVGTAT, obtains the data type for a specified 
attribute. The attribute is identified by its name and the KIND number of the 
entity. If the attribute data type is INTEGER, REAL, or STRING, the size for 
the data type is also returned. If the attribute data type is POINTER, the 
constituent list position Is also returned. The attribute name is an array of 
characters terminated by a null (a byte containing a hexadecimal "00”). 
Trailing blanks may be omitted. 

The second utility routine, NVGTED, obtains (only from the Data Dictionary 
form of the entity definitions) the size of an entity's Application Data Block 
(ADB) and the length of its Constituent List (CL). The entity is identified 
by its name. The entity name is an array of characters terminated by a null 
(a byte containing a hexadecimal "00"). Trailing blanks may be omitted. 


5. 


* l^H-* UilJI Wi %'M frj i ? it-f 


NVGTAT (Entity_Kind, Attribute_Name, Data_Type, Size, Retum_Code) 


where the data type for: 


EntityJCind is an INTEGER; the KIND number of the entity 

containing the attribute definition to be queried 
(input). 

Attribute_Name is a T_ATTRIBUTE_NAME; the number of characters used 

depends on the attribute name (input). 


5-7 






Cl UM560240031U 
July 1989 


Data_Type 


Is a T_DATA_TYPE; an enumerated scalar indicating the 
attribute data type (output). 


Size is an INTEGER; the size for INTEGER, REAL, or STRING 

data types; the constituent list position for the 
POINTER data type; no meaning for ARRAY, LIST, SET, 
LOGICAL, or ENUMERATION data types (output). 

Retum_Code is an INTEGER (output). 


The possible return code values are: 

0 * Success 

1 = Failure: the entity KINO is not defined in the run-time subschema 

2 * Failure: the attribute name is not defined for the entity in the 

run-time subschema 

The attribute Data_Type and Size are obtained for the return code of 

success (0); neither is obtained for the return codes of failure (1 or 2). 


5.4.3 Entity Size Query Format 

NVGTED (Entity_Name, Entity_Kind, ADB_Size, CLJLength, Retum_Code) 
where the data type for: 


Entity_Name 

is 

* T. 


on 

the 

Entity_Kind 

is 

an I 

ADB_Size 

is 

an : 

CLJLength 

is 

an : 

Return_Code 

is 

an ! 

The possible 

return i 


0 * Success 

1 ■ Failure: the entity name is not defined in the run-time subschema 

The Entity_Kind, ADB_Size, and CL_Length are obtained for the return code 
of success (0); none of them are obtained for the return code of failure (1). 


5-8 






Cl UM560240031U 
July 1989 


5.5 IBM/MVS Environment 
5.5.1 Compiling Considerations 

The NVI may be used by an application program with the appropriate 
constants and types. For PASCAL programs, these are defined in the following 
INCLUDE files: 

dsname = CADS.GMAP.V33.NVIINC 
member = APPLTYP 


dsname = CAD5.GHAP.MASINC 
member = APLTYP 
5.5.2 Include Files 


The types and constants used for the NVI which are contained in the NVI 
inclMie file member APPLTYP or the MAS include file member APLTYP are 
summarized below: 


Const 

END_OF_STRING = /OO'XC; 

MAX_ATTRIBUTE_NAME * 1000; 

MAX_DIMENSIONS « 100; 

MAX_ENUMERATION * 16; 

MAX_FIXED_STRING - 132; 

MAX_VARIANT_VALUE « 1000; 


Type 

ANYKEY 

EXT_R£T_CODE 

0RD_KIND 

T_ATTRIBUTE_NAME 

T_DATA_TYPE 

T_DIMEN_VALUE 

^ENUMERATION 

T_FIXED_STRING 

T_INTEGER_1 

T_INTEGER_2 

T_VARIANT_VALUE 


= INTEGER; 

= INTEGER; 

« INTEGER; 

= ARRAY(. 1..MAX_ATTRIBUTE_NAME .) OF CHAR; 

* ( INTEGER_DT, REAL_DT, STRING_DT, L0GICAL_DT, 

ENUM_DT, PNTR_DT, ARRAY_DT); 

= ARRAY(. 1..MAX_DIMENSI0NS .) OF INTEGER; 

*= PACKED ARRAY(. 1. .MAX_ENUMERATION .) OF CHAR; 

= PACKED ARRAY(. 1..MAX_FIXED_STRING .) OF CHAR; 

- PACKED -128..127; 

- PACKED -32768..32767; 

* ARRAY(. 1..MAX_VARIANT_VALUE .) OF CHAR; 


5-9 


OONTOL/M 





Cl UM560240031U 
July 1989 


(* 

ENTKEY 

« ANYKEY; 

*) 


LISTKEY 

= ANYKEY; 


<* 

T_ATTRIBUTE_VALUE 

* RECORD 

*) 


CASE INTEGER OF 




0 

( AS_VARIANT 

T_variant_value 

) 

1 

( AS_INTEGER_1 

T_Integer_l 

) 

2 

( AS_INTEGER_2 

T_Integer_2 

) 

3 

C AS_INT£GER_4 

Integer 

) 

4 

( AS_REAL_4 

SHORTREAL 

) 

5 

( AS_REAL_8 

REAL 

) 

6 

( AS_FIXED_SIRING 

T_FIXED_STRING 

) 

7 

( AS_LOGICAL 

BOOLEAN 

) 

8 

( AS_ENUMERATION 

^ENUMERATION 

) 

9 

( AS_ENTKEY 

ENTKEY 

) 


END 

The NVI INCLUDE file also contains the formal declarations for the 
interface routines. The member names in the INCLUDE file are the same as the 
interface routine names. 


5.5.3 Linkage Considerations 

The NVI consists of subprograms that have been processed by the linkage 
editor into a single module. The subprograms may be Incorporated into an 
application program by the appropriate data definition statement and linkage 
editor control statement containing the following: 

ddname « NVILIB 
disp ■ SHR 

dsname ■ CAD2.QtAF.V33.L0AD 

ddname * MASLIB 
disp - SHE 

dsname - CAD2.QtAP.V33.L0AD 

INCLUDE NVILIB(NVI) 

INCLUDE HASLIB(NAS) 

5*5.4 Processing Considerations 

The NVI will automatically retrieve run-time subschema definitions from 
one of two possible sources: the QfAP Data Dictionary files, or the run-time 
Subschema binary files. The source to be used will be determined at the time 
the NVILIB was installed. 


5-10 







Cl UM560240031U 
July 1989 


The files for the Data Dictionary are specified by: 

ddname = DDINX 
disp « SHR 

dsname = CAD5.GMAP.V33.DDINDX.DATA 

ddname = DDFILE 
disp = SHR 

dsname = CAD5.GMAP.V33.DDDEFN.DATA 

The files for the Run-Time Subschema are specified by: 

ddname = INXFILE 
disp * SHR 

dsname * CAD5.GMAP.V33.RTSI 

ddname - DATAFILE 
disp * SHR 

dsname = CAD5.GMAP.V33.RTSD 

If any messages occur during the translation from the GMAP Data Dictionary 
format and conventions to the run-time subschema format and conventions, they 
are written to: 

ddname = OUTPUT 
lrecl - 133 
recfm * A 

The active portion of the run-time subschema is stored in the working form 
and, therefore, consumes memory. The amount for each entity KIND is: 

48 bytes, plus 

28 bytes * the number of attributes for the entity, plus 

8 bytes * the number of attributes of enumeration data type, plus 

16 bytes * the number of possible enumeration values, plus 

8 bytes * the number of attributes of array data type, plus 

8 bytes * the number of array dimensions, plus 

8 bytes * the number of attributes of constituent reference data type, 

plus 

4 bytes * the number of possible kinds for the constituent references. 

The working form contains entries only for the KINDs of the entity 
instances that are specified in calls to the NVI. 


5-11 


cotrmouM 




Cl UM560240031U 
July 1989 


5.6 VAX/VMS Environment 

5.6.1 Compiling Considerations 

The NVI may be used by an application program with the appropriate 
constants and types. For PASCAL programs, these are defined in the following 
INC files: 

directory = [GMAP.V33.MASINC] 
file name » APLTYP 
directory * [GMAP.V33.NVIINC] 
file name « APPLTYP 

5.6.2 Include Files 

The types and constants used for the NVI which are contained in the NVI 
include file APPLTYP or the MAS include file APLTYP ARE SUMMARIZED BELOW: 


Const 



MAX_ATTRIBUTE_NAME 

- 1000; 


MAX_DIMENSIONS 

* 100; 


MAX_ENUMERATION 

* 16; 


MAX_FIXED_STRING 

« 132; 


MAX_VARIANT_VALUE 

* 1000; 

Type 



ANYKEY 

- INTEGER; 


EXT_RET_CODE 

« INTEGER; 


ORD_KIND 

- INTEGER; 


T_ATTRIBUTE_NAME 

» ARRAY(. l..MAX_ATTRIBUTE_NAME .) OF CHAR; 


T_DATA_TYPE 

- ( INTEGER.DT, REAL_DT, STRING_DT, L0GICAL_DT, 
ENUM_DT, PNTR_DT, ARRAY_DT); 


T_DIMEN_VALUE 

» ARRAY(. 1..MAX_DIMENSIONS .) OF INTEGER; 


^ENUMERATION 

« PACKED ARRAY(. 1..MAX_ENUMERATION .) OF CHAR; 


T_FIXED_STRING 

« PACKED ARRAY(. 1..MAX_FIXED_STRING .) OF CHAR 


T_INTEGER_1 

* [BYTE] -128..127; 


T_INTEGER_2 

* [WORD] -32768..32767; 


T_VARIANT_VALUE 

« ARRAY(. l..MAX_VARIANT_VALUE .) OF CHAR; 

<* 


*) 


ENTKEY 

« ANYKEY; 


LISIKEY 

= ANYKEY; 

<* 


•) 


T_ATTRIBUTE_VALUE 

* RECORD 


6-12 


COKTftO vm 


Cl UM560240031U 
July 1989 


CASE INTEGER OF 
0 : ( AS_VARIANT 

1 : ( AS_INTEGER_1 

2 : ( AS_INTEGER_2 

3 : ( AS_INTEGER_A 

4 : ( AS_REAL_4 

5 : ( AS_REAL_8 

6 : ( AS_FIXED_STRING 

7 : ( AS_LOGICAL 

8 : ( AS_ENUMERATION 

9 : ( AS_ENTKEY 

END 


T_variant_value ) 


T_Integer_l ) 
T_Integer_2 ) 
Integer ) 
REAL ) 
DOUBLE ) 
T_FIXED_STRING ) 
BOOLEAN ) 
T_ENUMERATION ) 
ENTKEY ) 


Var 

END_OF_STRING : [UNSAFE] CHAR : = XX/00'; 

The formal declarations for the interface routines are also contained in 
the NVI include files named for the routines. 

An application program needs to open a file for reading the GMAP Data 
Dictionary as follows: 

Open (File_Variable := DDFILE, History := READONLY, Access_Method := DIRECT, 
File_Name :* /[GMAP.V33.DDFILS]GMAPDDD.DAT’, Error := MESSAGE); 

Open (File_Variable := DDINX, History := READONLY, 

File_Name := '[GMAP.V33.DDFILSJGMAPDDI.DAT', Error := MESSAGE); 

For PASCAL programs, these local variables need to be declared as follows: 

VAR 

DDFILE : [Common]TEXT; 

DDINX : [Common]TEXT; 

5.6.3 Linkage Considerations 

The NVI consists of subprograms that have been compiled and inserted into 
an OLB/Library. The subprograms may be incorporated into an application 
program by the appropriate data definition statement and a linker control 
statement containing the following: 

[GMAP.V33.NVIOLB]NVIOBJ.OLB/Library 

[GMAP.V33.MAS0LB]MAS30BJ.OLB/Library 


5-13 


% 


OONTROtWt 









Cl UM560240031U 
July 1989 


5.6.4 Processing Considerations 

The NVI will automatically retrieve run-time subschema definitions from 
the GMAP Data Dictionary files. 


5-14 


ootrmot/m 



Cl UM560240031U 
July 1989 


APPENDIX A 

MODEL ACCESS SOFTWARE (MAS) CALLING PARAMETER TYPE INDEX 


Routine _ Calling Sequence _ 

MABRST (ext_ret_code) 

MACPDT (anykey, namtyp, integer, ext_ret_code) 

MAEA (anykey, ext_ret_code) 

MAEAI (anykey, ext_ret_code) 

MAEAV (entkey, integer, ext_ret_code) 

MAEC (anykey, listkey, ext_ret_code) 

MAECI (anykey, listkey, ext_ret_code) 

MAECIK (anykey, ord_kind, listkey, ext_ret_eode) 

MAECMP (entkey, listkey, ext_ret_code) 

MAECQY (entkey, entkey, integer, ext_ret_code) 

MAECR (entblock, anykey, entkey, ext_ret_code) 

MAECRN (entdata, anykey, entkey, integer, ext_ret_code) 

MAECTK (integer, ext_ret_code) 

MAECXQ (anykey, blkdata, routine, listkey, ext_ret_code, 
ext_ret_code) 

MAED (anykey, listkey, ext_ret_code) 

MAEDI (anykey, listkey, ext_ret_code) 

MAEDT (anykey, listkey, listkey, ext_ret_code) 

MAEDTI (anykey, listkey, listkey, ext_ret_code) 

MAEGKN (entkey, integer, ext_ret_code) 

MAEGTK (entkey, entblock, ext_ret_code) 

MAEKND (integer, ord_kind, ext_ret_code) 

MAERST (namtyp, ext_ret_code) 

MAESCI (anykey, integer ext_ret_code) 

MAESVL (entkey, integer, ext_ret_code) 

MAESWA (ext_ret_code) 

MAESWT (anykey, integer, ext_ret_code) 

MAEU (anykey, listkey, ext_ret_code) 

MAEUD (entkey, entblock, ext_ret_code) 

MAEUI (anykey, listkey, ext_ret_code) 

MAEUIK (anykey, ord_kind, listkey, ext_ret_code) 

MAEUSR (entkey, integer, ext_ret_code) 

MAEUXQ (anykey, blkdata, routine, listkey, ext_ret_code, 

ext_ret_code) 

MAEXEQ (anykey, blkdata, routine, ext_ret_code, ext_ret_code) 
MAINIT (ext_ret_code) 

MAKCNT (integer, integer, ext_ret_code) 

MAKILL (ext_ret_code) 

MAKXEQ (anykey, variant, entry point, integer, 

integer) 


A-l 


COMIOWW 



Routine 

MAL 

MALAND 

MALAX C 

MALCPY 

MALD 

MALDA 

MALD I 

MALFND 

MALGTK 

MALINS 

MALK 

MALKC 

MALKL 

MALKU 

MALN 

MALNO 

MALHOT 

MALOCK 

MALOR 

MALRD 

MALRDE 

MALREP 

MALRMV 

MALROR 

MALRPL 

MALRRI 

(MALRORI) 

MALRST 

MALRVS 

MALSRT 

MALSTF 

MAL5TR 

MALXEQ 

MAQURY 

MARDLT 

MARSGT 

MASMSZ 

MAUPDT 

MIDBD 

MIDBRV 

MRSCR 


Cl UM560240031U 
July 1989 


APPENDIX A (contd.) 


Calling Sequence ___ 

(llstkey, ext_ret_code) 

(anykey, anykey, llstkey, ext_ret_code) 

(anykey, anykey, ext_ret_code) 

(llstkey, llstkey, ext_ret_code) 

(llstkey, ext_ret_code) 

(ext_ret_code) 

(anykey, ext_ret_eode) 

(anykey, entkey, Integer, Integer, ext_ret_code) 
(anykey, Integer, entkey, ext_ret_code) 

(anykey, anykey, integer, ext_ret_code) 

(ord_kind, llstkey, ext_ret_code) 

(anykey, ord_klnd, llstkey, ext_ret_code) 

(anykey, ord_klnd, llstkey, ext_ret_code) 

(anykey, ord_kind, llstkey, ext_ret_code) 
(integer, llstkey, ext_ret_eode) 

(anykey, integer, ext_ret_eode) 

(anykey, anykey, llstkey, ext_ret_code) 

(llstkey, Integer, ext_ret_code) 

(anykey, anykey, llstkey, ext_ret_code) 

(anykey, entkey, ext_ret_code) 

(llstkey, ext_ret_code) 

(anykey, anykey, ext_ret_code) 

(anykey, Integer, ext_ret_code) 

(anykey, ext_ret_code) 

(anykey, entkey, integer, ext_ret_code) 

(anykey, ext_ret_code) 

(llstkey, integer) 

(anykey, ext_ret_code) 

(anykey, routine, ext_ret_code) 

(anykey, ext_ret_code) 

(anykey, ext_ret_code) 

(anykey, blkdata, routine, llstkey, ext_ret_code, 
ext_ret_code) 

(entkey, namtyp, integer, ext_ret_code) 

(ord_kind, integer) 

(ord_klnd, T_schema_pointer, Integer) 

(integer, integer, ext_ret_code) 

(anykey, namtyp, Integer, ext_ret_code) 

(anykey, integer) 

(anykey, position, integer) 

(ord.kind, integer, T_schema_pointer, integer) 


A-2 


COKTHOUtB 





Cl UM560240031U 
July 1989 


APPENDIX B 

ALPHABETICAL MODEL ACCESS SOFTWARE (MAS) ROUTINE INDEX 


Routine 


Description 


MABRST 

• MACPDT 
MAEA 
MAE AI 

. MAEAV 
. MAEC 
. MAECI 

■ MAECIK 

■ MAECMP 
MAECQY 

• MAECR 

' MAECRN 

• MAECTK 
. MAECXQ 

- MAED 

• MAEDI 
1 MAEDT 

• MAEDTI 
' MAEGKN 
' MAEGTK 

MAEKND 

• MAERST 
> MAESCI 
f MAESVL 

■ MAESWA 
MAESWT 

■ MAEU 

■ MAEUD 

• MAEUI 

■ MAEUIK 
• MAEUSR 

. MAEUXQ 

• MAEXEQ 

• MAINIT 

• MAKCNT 
MAKILL 

< MAKXEQ 

- MAL 

• MALAND 


Reset process and application flags 

Update Constituent SYSUSE flag 

Activate an entity or list of entities 

Activate an entity or list of entities Inclusively 

Find value of entity activation setting 

Create list of constituents 

Create list of inclusive constituents 

Create list of Inclusive constituents by kind 

Create a list of constituents that compress 

Determine if user compresses a constituent 

Create an entity 

Create entity with constituent list size 
Get number of different kinds in working-form model 
Process constituents via an application defined 
procedure 

Delete an entity or list of entities 

Delete an entity or list of entities inclusively 

Delete test an entity or list of entities 

Delete test an entity or list of entities inclusively 

Get kind value of an entity 

Get entity ADB 

Get kind value at specified position in kind list 
Set application flag in all entities in model to "off" 

Set or reset process flag for Inclusive constituents 

Find binary switch setting of an entity 

Set all entities binary switch setting to "off* 

Set binary switch in an entity or list of entitles 

Create list of users 

Update entity ADB 

Create list of users inclusively 

Create list of users inclusively by kind 

Determine if an entity has any users 

Process users via an application defined procedure 

Execute procedure on an entity or list of entities 

Initialize the working-form model 

Determine number of entitles in model with specified kind 
Delete the current working-form model 
Execute procedure on all entities of specified kind 
Create an empty list 
"And" of two list 


B-l 


OONTWOl/m 







Cl UM560240031U 
July 1989 


A EP .EyPIg._B (contd.) 


Routine 


Description 


« MALATC 

• MALCPY 

- MALD 

. MALDA 
NALDI 
' MALFND 

• MALGTK 

• MALINS 

• MALK 

. MALKC 

. MALKL 

• MALKU 

. MALN 
MALNO 
. MALNOT 

• MALOCK 
. MALOR 

- MALRD 

• MALRDE 
MALREP 

. MALRMV 
MALROR 
. MALRPL 
>MALRRI 
MALRST 
. MALRVS 

■ MALSRT 

• MALSTF 
MALSTR 

• MALXEQ 
< MAQURY 

■ MARDLT 
MARSGT 

» MASMSZ 
. HAUPDT 

MIDBD 


Attach entity or list of entities to entity or list 
Make a copy of a list 
Delete a list 

Delete all lists in the working-form model 

Delete a list and all lists after it 

Find position of an entity in a list 

Get the lfth entity from a list 

Insert entity or list of entitles into a list 

Create list of an entities of specified kind 

Create list of entities of a kind from constituents of 

another list 

Create list of an entities of specified kind which 
are found within another list 

Create list of entities of a kind from users of another 
list 

Create an empty list of specified size 

Count entities in a list 

"Not" of two lists 

Set the list lock flag 

"Or" of two lists 

Read next entry in list 

Remove duplicate entities from list 

Replace list of entities 

Remove entity or list of entities 

Sort entities in direct user to constituent order 

Replace entity or list of entities 

Sort entities in inclusive user to constituent order 

Reset an application list 

Reverse the order of a list 

Sort entities via an application defined procedure 
Set flag to read in forward direction 
Set flag to read in reverse direction 
Execute procedure on entity or list of entities 
Determine value of application flag for given entity 
Delete the run-time schema for a given entity kind 
Retrieve the run-time subschema for a given entity kind 
Find actual model used space and model free space 
Update value of application flag of entity or 
list of entities 

Delete an entity or list of entities, but do not 
consider the delete rules 


B-2 


cotrmovw 







Routine 
• MIDBRV 

NRSCR 


Cl UM560240031U 
July 1989 


APPENDIX B (contd.) 


_ps ion _ 

Remove an entity from the constituent list or remove 
an entity from a list of entities. Delete if marked 
for delete. 

Create a run-time subschema for a given entity kind 




Cl UM560240031U 
July 1989 


APPENDIX C 

MODEL ACCESS SOFTWARE (MAS) RETURN CODE INDEX 


Erro r l yp s .Code 

NO_ERRORS_DETECTED 0 
BAD_ENT_KIND 1 
INVALID_CREATE 2 
CANT_CREATE_LIST 3 
MAS_INIT_FAILED 4 
INVALID_UPDATE 5 
CANT_UPDATE_ENT 6 
CANT_CREATE_ENT 7 
CANT_VERIFY_CONNECT 8 
INVALID_CONNECTION 9 
CANT_CONNECT 10 
ABSENT.INPUT 11 
INVALID_GET 12 
NDS_OP_COMPLETE 13 
BAD_LIST_POSITION 14 
MAXIMUM_LIST_SI2E 15 
BAD_LIST_MOVE_COUNT 16 
BAD_LIST_REFERENCE 17 
BAD_ENT_KEY 18 
DUPLICATE_S CH 19 
DUMP_ERROR 20 
BAD_ENT_SIZE 21 
BAD_SCH__KIND 22 
PROC_CODE_ERROR 23 
PR0C_0UT_0F_RANGE 24 
NO_MATCH_FOUND 25 
DUPS_NOT_REMOVED 26 
INVALIDJDELETE 27 
BAD_ENTITY_ON_U SER_LIST 28 
BAD_DELETE_KEY 29 
EMPTY_MODEL 30 
ARG_0UT_0F_RANGE 31 
INVALID_CRl_POSITION 32 
CRB_ENTRY_NOT_FOUND 33 
INVALID_FLAG_NAME 34 
CANT_MARK_ENTITY_DELETE 35 
SIZE_NOT_CARE_ENOUGH 36 
RTS_N0T_IN_W0RKING_F0 RM 37 
CORE_NOT_AVAILABLE 38 
N0T_EN0UGH_C0RE_F0R_INIT 39 
ABS0LUTELY_N0_M0RE_C0RE 40 


C-l 


ootmoum 



Cl UM560240031U 
July 1989 



&EEEKPI&-S 

Error type 

Code 

MAINIT_ALREADY_DONE 

41 

ROLE_DOES_NOT_MATCH 

42 

ENTITY_NOT_FOUND_LIST 

43 


C-2 


(contd.) 


OOHTROWai 




Cl UM560240031U 
July 1989 


APPENDIX C (contd.) 


MODEL ACCESS SOFTWARE RETURN CODE INDEX 


Warning type 

Code 

OKW 

0 

NO_SUCH_SCH 

-I 

PROC_WARNING_CODE 

-2 

EMPTY_DELETE_LIST 

-3 

EMPTY_EXCE PTION_L1ST 

-4 

END_OF_LIST 

-5 

NO_LIST_CREATED 

-6 

EMPTY_MARK_LIST 

-7 

NO_LIST_GIVEN 

-11 


C-3 


ooKiao 




Cl UM560240031U 
July 1989 


APPENDIX D 

GENERAL TECHNIQUES/GUIDELINES 


o Avoid creating long lists of entities: 

'Lists are processed sequentially 
-Lists use model space 

o Do not use ENTKEY as a memory address: 

-ENTKEY does not address the attribute data block of the entity 

o Avoid "nil" keys: 

-Abend or nil pointer checking errors may be caused 

o Delete application lists vhen no longer needed: 

-Application lists use memory 
-Application lists slow deletion of entities 

o Always test the Model Access Software (MAS) interface return code: 

-RC * 0 normal return 

-RC < 0 warning message 

-RC > 0 critical error 

o Reset the process bit to "off" when it is no longer needed, 
o Define the KIND and LENGTH fields in the ADB. 

o When MALRD is used in conjunction with one of the following interface 

routines: 

MAED MALINS 

MAEDI MALRMV 

MAL 

the position of sequential reading is incremented/decremented if an 
interface function modifies the list. 

Do not use MALGTK and one of the above routines because the local 
variable position cannot be adjusted by the MAS package. 


D-l 


cotmowai 





Cl UM560240031U 
July 1989 


APPENDIX D (contd.) 


For example: 

VAR NUM_IN_LIST: = INTEGER 
BEGIN 

FOR I * 1 TO NUM_IN_LIST DO 

MALGTK (LISTKEY, NUM_IN_LIST, ENTKEY1): 
MAED (ENTKEY1, LISTX): 

END: 


As each entity is deleted, it is removed from the LISTKEY list, but 
I is not adjusted. 

o With the exception of HAL and MALK, empty lists will not be created. If 
an interface function has an output LISTKEY and the list is empty, the 
list will not be created and the LISTKEY will be NIL. A warning return 
code will indicate this situation. 


D-2 


ooNiaoma 





Cl UM560240031U 
July 1989 


APPENDIX E 

HUN-TIME ENVIRONMENT 


INTRODUCTION 

The Model Access Software (MAS) consists of a set of PASCAL procedures 
that provides an interface to the working form model for application 
programs. When the application programs are written in a language other 
than PASCAL, the run-time environment must satisfy the interlanguage 
communication requirements of all the languages involved. This appendix 
discusses the MAS interlanguage environment conventions and the composition 
of the PASCAL dynamic storage areas. Examples are given for a FORTRAN 
program that uses MAS routines. 

INTERLANGUAGE CONVENTIONS 

When the MAS subprograms were compiled, they were defined as PROCEDURES 
using SUBPROGRAM declarations. The subprogram declaration is an extension 
to IBM Pascal that allows a PASCAL procedure to be called from any 
language. The subprogram declaration supplies special code at compile 
time. At run-time, this code determines the nature of the calling program. 
For non-PASCAL calls, two macros are invoked: Prolog and Epilog. Before 
the procedure executes, Prolog locates the PASCAL Communication Work Area 
(PCWA) as well as the main and local Dynamic Storage Areas (DSA) and 
establishes the PASCAL register conventions. On exit, the Epilog macro 
restores the register conventions of the calling program. 

The effect of this method is that no special action is required by the 
calling program, regardless of its language. 

The SUBPROGRAM declaration may also be applied to application 
procedures, which may then be called from, and make calls to, routines of 
any language. This method is limited to PASCAL PROCEDURES and does not 
apply to PASCAL FUNCTIONS. 

ESTABLISH ING INTERLANGUAGE ENVIRONMENT 

The preferred (and easiest) approach is to insert the entire application 
into a PASCAL program. This method, shown in Figure E—1, assures correct 
error handling. 


E-l 





Cl UM560240031U 
July 1989 


PASCAL 


FORTRAN 



MAS 





FORTRAN 





Figure E-l. PASCAL Environment 

An alternate approach, illustrated in Figure E-2, is to Insert the 
portion of the application that makes the MAS calls into a PASCAL procedure 
that is declared MAIN. The error handling capability, however, may be 
limited in this method. Mote that the model created within the scope of the 
MAIN PASCAL procedure is active only during the execution of the MAIN 
procedure; new models may be created in subsequent calls to a similarly 
declared MAIN procedure. Upon termination of the last call to a PASCAL 
MAIN, the procedure PSCLHX should be called to terminate the PASCAL run-time 
environment. 

Examples of the PASCAL source and link-edit instructions are included at 
the end of this appendix. Figure E-3 illustrates the PASCAL dynamic storage 
area stack. 


E-2 


ooNmowas 








Cl UM560240031U 
July 1989 


FORTRAN 


MAIN 


FORTRAN 


MAS 





FORTRAN 



_ 


PSCLHX 


Figure E-2. MAIN Procedure 


E-3 


00N7H0VM 









Cl UM560240031U 
July 1989 


REGISTER CONVENTIONS 

The interlanguage environment establishes the correct register 
conventions automatically. The following information is included for use 
from the IBM TEST mode. 


Register P A?CA L 


Non-PASCAL 


15 

14 

13 

12 

11 

1 

0 


Branch address 
Return address 
Local DSA address (1) 
PCWA address 
Main DSA address 
Address of parameter 
list (2) (3) 

( 2 ) 


Branch address 
Return address 
Save area address 


Address of parameter 
list 

Function value 


NOTES: (1) The save area is the first entry in the local DSA, which is 

established by a PASCAL caller. 

(2) The function value for PASCAL is referred to by the first 
entry in the parameter list. PASCAL input parameters for a 
function are referred to as starting with the second entry in 
the parameter list. 

(3) The parameter list contains addresses of parameters except for 
pass-by-value of scalars, pointers, or sets, in which case the 
parameter list contains the actual value. 


PASCAL DYNAMIC STORAGE AREA 


The dynamic storage area of the PASCAL main program contains global 
variables (including any commons). Each PASCAL procedure invoked has a 
local dynamic storage area containing local variables. The dynamic storage 
areas are contained in a LIFO stack. 


In general, the DSA of a routine consists of five sections: 

(1) The local save area (144). 

(2) Parameters passed in by the caller. 

(3) Local variables required by the routine. 

(4) A save area required by any routine that will be called. 

(5) Storage for the largest parameter list to be built for a call. 


E-4 




Cl UM560240031U 
July 1989 


Sections 1 and 2 are allocated by the calling routine; Sections 3, 4, 
and 5 are allocated by the Prolog of the called routine. 

Every DSA is at least 144 bytes long. This is the storage required by 
PASCAL/VS for a save area. The local variables and parameters of the 
routine are mapped within the DSA starting at offset 144. 

Upon entering a routine. Register 1 points 144 bytes into the DSA of the 
routine, which is where the parameters passed in by the caller reside. 

Upon invocation, Register 13 points to the base of the DSA of the 
caller, which is where the save area of the caller is located. Figure E-3 
illustrates the condition of the stack and relevant registers immediately 
upon the start of the routine. 


REG 13 —- 


To Reploce REG 13 


REG 1 —— 
Top of Stack — 


REG 1 Set Here for Calls —■“ 


Next Stack Top ■— 


Caller's Save Area 

Caller's Local 
Variables 

Locol Save Area 
(144 Bytes) 

Parameters 


Start of DSA of Caller 


Start of DSA 
of Routine 

144 Bytes Into DSA 


Local Variables 


Save Area of Any 
Routines Yet 
To Be Invoked 

— — —-— —i 

Parameter List To Be 
Built for Calls 
to Other Routines 


Storage Not Yet 
To Be Allocated 

Start of D 
To Be Called 


144 Bytes Into This DSA 



Figure E-3. PASCAL Jlynanic Storage Area Stack 


E-5 


COttTMHjm 









Cl UM560240031U 
July 1989 


EXAMPLES 

EXAMPLE 1: PASCAL PROGRAM (PASMAIN) THAT INVOKES FORTRAN MAIN 

PASCAL PROGRAM 
PROGRAM PASMAIN; 

PROCEDURE MAIN; FORTRAN; 

BEGIN 

MAIN; Invoke FORTRAN main. 

END. 


LINKEDIT INSTRUCTIONS 
INCLUDE APLLIB(PASMAIN) 

INCLUDE APLLIB(APL ) FORTRAN main object, 

list of objects including FORTRAN main, or 
LOAD module including FORTRAN main. 

INCLUDE MASLIB(MAS ) 

ENTRY PASMAIN 

where SYSLIB allocation includes SYS1.PASCLIB. 


EXAMPLE 2: PASCAL PROCEDURE (PASSUB) INVOKED BY FORTRAN MAIN THAT INVOKES 
FORTRAN SUBROUTINE (FORSUB) 


PASCAL_PEQC£BUg£ 

SEGMENT PASSUB; 

FORTRAN MAIN may pass parameters to 
the PASCAL subroutine. 

PASCAL MAIN may pass parameters to the 
FORTRAN MAIN. 

Invokes FORTRAN subroutine that calls 
MAS. 

end; 

FORTRAN MAIN PROGRAM 


PROCEDURE PASSUB (....);MAIN; 

PROCEDURE PASSUB; 

PROCEDURE FORSUB(....);FORTRAN; 

BEGIN 

F0RSUB(....); 


CALL PASSUB(....) 
CALL PSCLHX 


E-6 


cwrmism 



Cl UM560240031U 
July 1989 


LINKEDIT INSTRUCTIONS 

INCLUDE APLLIB(APL ) List of objects including FORTRAN MAIN 

or LOAD module including FORTRAN MAIN. 

INCLUDE APLLIB(PASSUB) 

INCLUDE MASLIB(MAS ) 

ENTRY APL 
NAME APL 

vbere SYSLIB allocation includes SYS1.PASCLIB. 


E-7 


COKTMVm 





Cl UM560240031U 
July 1989 


APPENDIX F 
SAMPLE PROGRAMS 


INTRODUCTION 

A series of sample programs, presented in Table F-l, were written by an 
MDC development programmer to emulate the MDC CAD system. They are 
reprinted here in hopes that other programmers can gain insight into the 
easiest and most efficient way to use each of the Model Access Software 
routines. 

The routine descriptions in the earlier parts of this manual are 
cross-referenced to the sample program in which the Model Access Software 
routine is used (routines are all written in PASCAL): 

IAEl£-£.-JL 
SAMPLE PROGRAMS 


DESCRIPTION 

MAS 

ROUTINES 

USED 

APPLICATION 

ROUTINE 

Defines System Type and Constant Declarations. 


ENTTYP 

Entity Type Definitions. 


EHTDEF 

Model a Line for Display. 

MAL,MALATC, 

MAECR 

MODLN 

Retrieve Entity’s Type, Special Code, and Label. 

MAEGTK 

CADENT 

Retrieve Entity Key and Data from Pick List. 

MALNO, 

MALGTK 

PLQRY 





Cl UM560240031U 


TABLE F-l (contd.) 

July 1989 

Implement Delayed "Delete" Operation. 

MAEGTK, 

MAECI, 

MALNO.MAEU, 

MALGTK 

RMBLK 

Reject Changes to Attributes. 

MAECR,MAL, 

MALATC 

VCASAV 

Checks if the KIND is between a high and a low 
boundary. 

MALXEQ 

KNDRNG 

Retrieves the radius of a PRS. 

MAEXEQ 

RjRCRD 


P-2 


OONTHOV/n 






Cl UM560240031U 
July 1989 


ENTTYP SAMPLE PROGRAM 

ENTTYPE - Sample program defines system type and constant declarations. 


TYPE 

UNSIGNED_INT1 

SIGNED_INT1 

UNSIGNED_INT2 

SIGNED_INT2 

COORD 

VECTOR 

SHTVECTOR 

TWO PUTS 


PACKED 0..255; 

PACKED -128..127; 

PACKED 0..65535; 

PACKED -32768..32767; 
(X,Y,Z); 

ARRAY(.COORD.) OF REAL; 
ARRAY(.COORD.) OF SHORTREAL; 
ARRAY(.1..2.) OF VECTOR; 


IRT2 «= ARRAY(.1..2.) OF INTEGER; 
INT3 * ARRAY(.1..3.) OF INTEGER; 
INT4 * ARRAY(.1..4.) OF INTEGER; 


SHTREAL2 = ARRAY(.l..2.) OF SHORTREAL; 

SHTREAL3 * ARRAY(.1..3.) OF SHORTREAL; 


REAL2 * ARRAY(.1..2.) OF REAL; 

REAL3 = ARRAY(.1..3.) OF REAL; 


CHAR2 
CHAR4 
CHAR6 
CHAR 8 


= PACKED ARRAY(.1..2.) OF CHAR; 
« PACKED ARRAY(.1..4.) OF CHAR; 
= PACKED ARRAY(.1..6.) OF CHAR; 
= PACKED ARRAY(.1..8.) OF CHAR; 


PDDI Access Software JJNTITYJTYPE « INTEGER; 
CADD_ENTITY_TYPE * INTEGER; 

DATA_TYPE « INTEGER; 



Cl UM560240031U 
July 1989 


ENTDEF - Sample program shows entity type definitions. 


ANYKEY 

LISTKEY 

ENTKEY 

EXT_RET_CODE 

ENTKIND 

ORDKIND 


= INTEGER; 
= ANYKEY; 

= ANYKEY; 

= INTEGER; 
= INTEGER; 
= INTEGER; 


T_SYS = (CADD, IDBPDDI Access Software); 

T_HEADER = RECORD 

KIND : ENTKIND; 

SIZE : 0..4194303; 

LABEL : CHAR8; —> OVER 
DSP_TYPE : INTEGER; 

SUBTYPE : INTEGER; 

VERSION : INTEGER; 

END; 

ENTITY DATA RECORDS 

PNTDATA = RECORD 

UDB : T.HEADER; 

PT : VECTOR; 

END; 

LINDATA « RECORD 

UDB : T_HEADER; 

END; 

ARCDATA - RECORD 

UDB : T_HEADER; 

MIDPNT : VECTOR; 

END; 


CRLDATA 

UDB 

PT1 

PT2 

PT3 

END; 


RECORD 


T.HEADER; 
VECTOR; 
VECTOR; 
VECTOR 


OONTWWM 




Cl UM560240031U 
July 1989 


&ggEF_SAMPLE p P ne PfM f CONTlNTifps 


PLNDATA = RECORD 
UDB 
SYMBOL 
NORMAL 
END; 


T_HEADER; 

VECTOR; 

VECTOR; 


PICDATA = RECORD 


UDB 

PICKPNT 

END; 


: T_HEADER; 
: SHIVECTOR 


ENTBLOCK = RECORD 

CASE ENTITY_TYPE OF 
POINT ♦ (pnt 

LINE : (LIN : 

PLANE ; (PLN « 

ARC 5 (ARC : 

CIRCLE : ( C RL : 

end- PICK ~ ENTITY : (PIC 


PNTDATA); 
LINDATA); 
PLNDATA); 
ARCDATA); 
CRLDATA); 
PICDATA); 


F-5 




Cl UM560240031U 
July 1989 


MODLN SAMPLE PROGRAM 


MODLN - Sample program to model a line for display. 


CA DESCRIPTION OF ARGUMENTS 
C INPUT 

C PNTRS - AN ARRAY CONTAINING THE CORRELATION OF 

THE START AND END POINTS OF THE LINE 


C 

C 

C 

C 

C 

C 

C 

C 

C 

C 

CC 

C 

*) 


DSPTYPE - CADD DISPLAY TYPE 
- 1, SOLID LINE 

* 2, DASHED LINE 

OUTPUT 

IRC - RETURN CODE 

« 0, NORMAL RETURN 

* 18, INVALID INPUT DATA 
= 34, ERROR IN CREATION 

COMMONS 

DGRPS2 - PROVIDE SYSTEM WORK AREAS 


REF 

DGRPS2 : T_DGRPS2; 


CONST 

TICKMARK = 99; 


TYPE 

LIN_SPCODE * (NORMAL_LINE, TICK_MARK); 

LIN_DSPTYPE « (DUMMY, SOLID, DASH, CENTER, PHANTOM); 


VAR 

SPECIAL.CODE 

DISPLAYJTYPE 

I 

NEW_LINE 
NEW_LINE_LABEL 
KEYLC 
KEYE LN 


INTEGER; 

INTEGER; 

INTEGER; 

ENTBLOCK; 

CHAR8; 

LISTKEY; 

LISTKEY; 


F-6 


ootmoum 






Cl UM560240031U 
July 1989 


MODLN SAMPLE PROGRAM (CONTINUED') 

BEGIN (* MODLN STARTS HERE *) 

<* 

CHECK IF DUPLICATE POINTS 

*> 

IF (PNTRSC.l.) = PNTRS(.2.)) 

THEN 

IRC := 18 
ELSE 
BEGIN 

<* CONVERT CADD TYPE DESIGNATION TO PDDI Access Software EQUIV 
*) 

CVTPSC(CADD_LINE, SPECIAL_CODE, NEWJLINE.LIN.UDB.KIND, 

NEWJLINE.LIN.UDB.SUBTYPE, IDBPDDI Access Software, IRC); 

(* GET A LABEL FOR THE NEW LINE 
*) 

LDLABL(CADD_LINE, SPECIAL_CODE, NEW_LINE_LABEL, IRC); 

IF IRC « 0 
THEN 
BEGIN 

(* LOAD THE LINE BLOCK 

*> 

WITH NEW LINE.LIN.UDB DO 
BEGIN 

SIZE := UDBSIZ(PDDI Access Software_LINE); (* SIZE OF 

ENTITY BLOCK *) 

LABEL := NEW_LINE_LABEL; 

LSP_TYPE :« DISPLAY_TYPE; 

END; 

(* 

CREATE LINE WITH CONSTL 

*> 

MAL(KEYLC, IRC); (*CREATE EMPTY LIST*) 

FOR I := 1 TO 2 DO 

MALATC(KEYLC, PNTRS(.I.), IRC); (* ADD EACH END POINT TO LIST *) 
MAECR(NEW_LINE, KEYLC, KEYE LN, IRC); (* MODEL THE ENTITY *) 

IF IRC * 0 
THEN 

(* RECORD THE CREATE FOR VERSION CONTROL 

*) 

VCCREA(KEYE_LN, IRC); 

END;(* END OF CHECKING IRC FROM "LDLABL *) 

END;(* END OF CHECKING DUPLICATE POINTERS *) 

END;(*END OF MODLN*) 


F-7 







Cl UM560240031U 
July 1989 


CADENT SAMPLE PROGRAM 

CADENT - Sample program to retrieve the type, special code, and label of an 
entity. 

CA DESCRIPTION OF ARGUMENTS 
C INPUT 

C KEYE - KEY OF THE ENTITY 

C 

C OUTPUT 

C ENT_TYPE - ENTITY TYPE 

C SP.CODE - SPECIAL CODE 

C ENT_LABEL - ENTITY LABEL 

C 

*) 

VAR 

I, IRC : INTEGER; 

ENTITY : ENTBLOCK; 

BEGIN (* CADENT STARTS HERE *) 

(* RETRIEVE THE ENTITY ATTRIBUTE BLOCK FROM PDDI 

Software *) 

MAEGTK(KEYE,ENTITY, IRC); 

<* TRANSFORM PDDI Access Software KIND TO TYPE 

AND SPECIAL CODE *) 

CVTPSC(ENTITY.PUT.UDB.KIND, ENTITY.PNT.UDB.SUBTYPE, 

ENT_TYPE, SP CODE, CADD, IRC); 

(* COPY LABEL OUT OF ENTITY BLOCK *) 

LABEL(.1.) :« ENTITY.PNT.UDB.LABEL ; 

END;(*END OF CADENT *) 


F-8 


CONTMHVn 






Cl UM560240031U 
July 1989 


PLQRY SAMPLE PROGRAM 


PLQRY - Sample program retrieves an entity key and data from the pick list. 


CA DESCRIPTION OF ARGUMENTS 


C 

C 

C 

C 

C 

C 

C 

C 

*) 


INPUT 

NUMPK 

OUTPUT 

PIC.ENTITY 

PICKED_ENTITY 

IRC 


- NUMBER OF PICKS DESIRED 

- ATTRIBUTES OF THE PICK ENTITY 

- ATTRIBUTES OF THE PICKED ENTITY 

- RETURN CODE 

* 0, NORMAL RETURN 
= 18, INVALID INPUT DATA 


VAR 

PICKJLIST : LISTKEY; 
PICK_COUNT : INTEGER; 


XPAGE 


BEGIN (* PLQRY STARTS HERE *) 

<* 

RETRIEVE THE PICK LIST AND COUNT THE NO OF PICKS 

*) 

PLKEY(PICK_LIST, IRC); 

MALNO(PICK_LIST, PICK_COUNT, IRC); 

IF (PICK_COUNT > 0) AND (?ICK COUNT <- NUMPK) 

THEN 

BEGIN 

(* 

RETRIEVE THE PICK ENTITY AND PICKED ENTITY 

*) 

MALGTK<PICK_LIST, NUMPK, PIC.EhTITY, IRC); 

MALGTK(PIC_KEY, 1, PICKED KEY, IRC); 

END 

ELSE 

IRC := 18; 


END;(* END OF PLQRY *) 





Cl UM560240031U 
July 1989 


RMBLK SAMPLE PROGRAM 


RMBLK - Sample program to Implement a delayed 
reversed by invoking the "REJECT” function. 

CA DESCRIPTION OF ARGUMENTS 


’’DELETE" operation. It can be 


C 

C 

C 

C 

C 

C 

C 

*) 


INPUT 

KEYE 

OUTPUT 

IRC 


- KEY OF THE ENTITY TO BE DELETED 


RETURN CODE 

0, NORMAL RETURN 

18, INVALID INPUT DATA 


VAR 

NUM_OF_CNSTL 

NUM_OF_USERS 

COUNTER 

CNSTL 

POINTJJSERS 
ENT.HEADER 
DEL_DISPLAY 
ENTITY 


INTEGER; 

INTEGER; 

INTEGER; 

LISTKEY; 

LISTKEY; 

ENTHEAD; 

BOOLEAN; 

ENTBLOCK; 


BEGIN (* RMBLK STARTS HERE *) 

(* 

ADD THE ENTITY TO BE DELETED TO THE ACCEPT LIST 

*> 

VCDEL(KEYE, IRC); 

<* 

DELETE THE DISPLAY OF THE ENTITY 

*> 

DELEDSP(KEYE); 

c* 

RETRIEVE THE ENTITY TO BE DELETED 

*> 

MAEGTK(KEYE, ENTITY, IRC); 

(* 

IF PLURAL ENTITY THEN FIND THE CNSTL 
AND OMIT THE DISPLAY OF CNSTL 

*) 

IF (ENTITY.PNT.HEADER.KIND - PDDI Access Softvare.PCPATCH) 

OR ((ENTITY.PNT.HEADER.KIND * PDDI Access Softvare.GROUP) 

OR (ENTITY.PNT.HEADER.KIND » PDDI Access Softvare_BOUNDED_PLANE)) 





Cl UM560240031U 
July 1989 


RMBLK SAMPLE PROGRAM (C ONTINUED) 

THEN 

BEGIN 

MAECI(KEYE, CNSTL, IRC); 

MALNO(CNSTL, NUM OF CNSTL, IRC); 

TOR COUNTER s- 1 TO NUM_OF_CNSTL DO 
BEGIN 

DEL_DISPLAY :« TRUE; 

MALGTK(CNSTL, COUNTER, ENT_HEADER, IRC); 

(* 

IF CONSTITUENT IS A POINT THEN IF THERE 
WERE USERS THEN LEAVE IT ALONE 

») 

IF ENT.HEADER.KIND ■ PDDI Access Software_POINT 
THEN 
BEGIN 

MAEU(END_HEADER.KEY, POINT_USERS, IRC); 
MALNO(POINT_USERS, HUM_OF_USERS, IRC); 

IF NUM_OF_USERS > 0 
THEN 

DEL_DISPLAY : = FALSE; 

END;(* ENDIF *) 

IF DEL_DISPLAY 
THEN 

DELDSP(ENT_HEADER.KEY); 

END;<* END OF DO LOOP *) 

END;(* ENDIF *) 


END;(* END OF RMBLK *) 






Cl UM560240031U 
July 1989 


VCASAV SAMPLE PROGRAM 

VCASAV - Sample program provides for rejecting changes to attributes. 


CA 

C 

C 

C 

C 

C 

C 

C 

*) 


DESCRIPTION OF ARGUMENTS 
INPUT 

OLDENT - OLD ENTITY BLOCK 


OUTPUT 

IRC - RETURN CODE 

* 0, NORMAL RETURN 

* 18, INVALID INPUT DATA 


VAR 

OPERATIONJENTKEY i ENTKEY; 
KEYE : ENTKEY; 

R£JECT_LIST,CNSTL: LISTKEY; 
NEWENT : ENTBLOCK; 


BEGIN (* VCASAV STARTS HERE *) 

<* 

GET THE ATTRIBUTE OF THE OLD ENTITY AND 
CREATE A NEW ENTITY WITH THAT ATTRIBUTE ONLY 

*) 

NEWENT := OLDENT; 

NEWENT.RPA.UDB.KIND :* 0; 

CNSTL :« 0; 

MAECR(KEYE, NEWENT, CNSTL, IRC); 

(* 

CREATE AN EMPTY LIST AND ADD THE NEWENT TO IT 

*) 

MAL(CNSTL, IRC); 

MALATC(CNSTL, KEYE, IRC); 

(* 

MODEL THE "REPLACE ATTRIBUTE" OPERATION ENTITY 

*) 

MODOP(ORD(REPLACE_ATTRIBUTE_OP_), CNSTL, OPERATION_ENTKEY, IRC) 

<* 

RETRIEVE THE REJECT LIST AND ADD THE NEWLY 
CREATED OPERATION ENTITY TO THE REJECT LIST 

*) 

VCRK£Y(REJECT_LIST, IRC); 

MALATC(REJECT_L1ST, OPERATION ENTKEY, IRC); 


END;(* END OF VCASAV *) 



Cl UM560240031U 
July 1989 


KNDRNG SAMPLE PROGRAM 

KNDRNG - Sample program checks if the RIND is between a high and a low 
boundary. 

PROCEDURE KNDRNG: 

REF 

KNDRGI : ROUTINE; 

VAR 

DATA : BLRDATA; 

JRC : INTEGER; 

BEGIN (* KNDRNG *) 

IF KEYL <> 0 THEN BEGIN 
DATA.LOWKIND :« LOWKIND; 

DATA.HIGHKIND :> HIGHKIND; 

MALXEQ( KEYL, DATA. KNDRGI, OUTLIST, JRC, IRC ); 

END ELSE 
IRC :» 1; 

END (* KNDRNG *) 


PROCEDURE KNDRGI( CONST KEYENT 

VAR ENTBLK 
VAR DATA 
VAR IRC 

SUBPROGRAM 


ENTKEY; 
ENTBLOCK; 
BLKDATA; 
INTEGER ); 


PROCEDURE KNDRGI 


BEGIN <* KNDRGI *) 

IF ( ENTBLK.KIND » DATA.LOWKIND ) 

AND ( ENDBLK.KIND <« DATA.HIGHKIND ) THEN 


IRC :« 1 (* PUT IT ON THE OUTPUT LIST *) 

ELSE 

IRC :■ 2 } (* DON'T PUT IT OH THE OUTPUT LIST *) 
END; (* KNDRGI *) 


F-13 


OOM1WWM 





Cl UM560240031U 
July 1989 


ftlRCRD SAMPLE .PROGRAM 

RlRCRD - Sample program retrieves tbe radius of a PRS. This sample program 
is written in FORTRAN. 

FUNCTION R$RCRD(ICV) 

REAL*4 R|RCRD 
REAL*8 RADIUS 
INT£GER*4 IRC,IIRC,I,ICV 
COMMON /PRSRAD/FRSRAD 
C 

CALL MAEXEQCICV, RADIUS, PRSRAD, IRC, IIRC ) 

RSRCRD * RADIUS 
C 

RETURN 

END 


PROCEDURE PRSRAD( CONST KEYE 

ENTKEY 

VAR 

ENTDATA 

ENTBLOCK 

VAR 

RADIUS 

REAL ; 

VAR 

IRC 

INTEGER 


SUBPROGRAM 


PROCEDURE PRSRAD ; 

BEGIN 

RADIUS :« ENTDATA.PRS.RADIUS ; 
END ;