ebook img

COBOL ANSI-85 Programming Reference Manual - Textfiles PDF

294 Pages·1998·0.88 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview COBOL ANSI-85 Programming Reference Manual - Textfiles

Product Information Announcement • o New Release Revision o Update o New Mail Code Title MCP/AS COBOL ANSI-85 Programming Reference Manual, Volume 2: Product Interfaces (8600 1526–202) This announces a revision of the MCP/AS COBOL ANSI-85 Programming Reference Manual Volume 2: Product Interfaces for HMP NX 4.0 and SSR 45.1, dated June 1998. Previous title: ClearPath HMP NX and A Series COBOL ANSI-85 Programming Reference Manual Volume 2: Product Interfaces This manual has been revised to include the following changes: • Section 2: Addition of service function mnemonics to Table 2–5 • Section 3: Clarification of the syntax for the DMSII SET statement • Section 3: Addition of double–octet characters in identifiers • Section 4: Deletion of paragraph, re: changing $DICTIONARY after IDENTIFICATION DIVISION • Sections 4, 5 and 6: Addition of compiler control images after...FROM DICTIONARY...invocations • Section 6: Modification of the FORM-KEY function line (COMS_OUT_AGENDA) Various other technical and editorial changes were made to improve the quality and usability of this manual. To order a Product Information Library CD-ROM or paper copies of this document • United States customers, call Unisys Direct at 1-800-448-1424. • Customers outside the United States, contact your Unisys sales office. • Unisys personnel, order through the electronic Book Store at http://iwww.bookstore.unisys.com. Comments about documentation can be sent through e-mail to [email protected]. Announcement only: Announcement and attachments: System: MCP/AS AS194 Release: HMP 4.0 and SSR 45.1 Date: June 1998 Part number: 8600 1526–202 aldsjfl;sdkfj MCP/AS COBOL ANSI-85 Programming Reference Manual Volume 2 Product Interfaces Copyright ß 1998 Unisys Corporation. All rights reserved. Unisys and ClearPath are registered trademarks of Unisys Corporation. HMP 4.0 and SSR 45.1 June 1998 Printed in USA Priced Item 8600 1526–202 The names, places, and/or events used in this publication are not intended to correspond to any individual, group, or association existing, living, or otherwise. Any similarity or likeness of the names, places, and/or events with the names of any individual, living or otherwise, or that of any group or association is purely coincidental and unintentional. NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to purchase or lease equipment or to license software. The only warranties made by Unisys, if any, with respect to the products described in this document are set forth in such agreement. Unisys cannot accept any financial or other responsibility that may be the result of your use of the information in this document or software material, including direct, special, or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. RESTRICTED – Use, reproduction, or disclosure is restricted by DFARS 252.227–7013 and 252.211– 7015/FAR 52.227–14 & 52.227-19 for commercial computer software. Correspondence regarding this publication should be forwarded to Unisys Corporation either by using the Business Reply Mail form at the back of this document or by addressing remarks to Software Product Information, Unisys Corporation, 25725 Jeronimo Road, Mission Viejo, CA 92691–2792 U.S.A. Comments about documentation can also be sent through e-mail to [email protected]. Unisys and ClearPath are registered trademarks and InfoExec, InterPro, Open/OLTP, and TransIT are trademarks of Unisys Corporation. All other terms mentioned in this document that are known to be trademarks or service marks have been appropriately capitalized. Unisys Corporation cannot attest to the accuracy of this information. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Contents About This Manual .................................................................................... xiii Section 1. Introduction to COBOL85 Program Interfaces Using Program Interfaces for Specific Products ................... 1–1 Using Language Extensions for Specific Products ................ 1–1 COMS Extensions ..................................................... 1–2 DMSII Extensions ..................................................... 1–3 ADDS Extensions ..................................................... 1–5 SDF Plus Extensions ................................................. 1–6 SDF Extensions ........................................................ 1–8 Section 2. Using the COMS Program Interface What Does the COMS Program Interface Do? ....................... 2–1 Running DMSII with COMS ..................................................... 2–2 Using Multiple COMS Language Support Libraries ............... 2–2 Permanently Modifying the COBOL ANSI-85 Compiler .. 2–3 Temporarily Modifying the Support Library Name ........ 2–3 Preparing the Communication Structure .............................. 2–4 Declaring a Message Area ........................................ 2–4 Declaring a COMS Interface ...................................... 2–5 Using COMS Headers ............................................................. 2–5 Declaring COMS Headers ......................................... 2–5 Mapping COMS Data Types to COBOL85 ................... 2–7 COMS Input Header Fields ........................................ 2–8 COMS Output Header Fields ...................................... 2–10 Using the VT Flag of the Output Header ............. 2–12 Requesting Delivery Confirmation on Output ....... 2–12 Preparing to Receive and Send Messages ............................ 2–12 Linking an Application Program to COMS ................... 2–12 Linking by Function .......................................... 2–13 Linking by Initiator ............................................ 2–15 Initializing an Interface Link ....................................... 2–15 Using Communication Statements ........................................ 2–17 ACCEPT MESSAGE COUNT Statement ....................... 2–17 DISABLE Statement .................................................. 2–19 ENABLE Statement ................................................... 2–21 RECEIVE Statement .................................................. 2–23 SEND Statement ...................................................... 2–26 8600 1526–202 iii Contents Explanation for Format 1 - Nonsegmented Output Only ............................................................ 2–27 Explanation for Format 2 - Segmented or Nonsegmented Output .................................. 2–27 Segmenting Options ................................. 2–28 Advancing Options ................................... 2–29 Using Service Functions ......................................................... 2–32 Using COMS Designators .......................................... 2–32 Identifying Information with Service Function Mnemonics .......................................................... 2–33 Calling Service Functions .......................................... 2–34 Using the CALL statement ................................. 2–35 Using Parameters by Value ............................... 2–36 Passing Parameters to Service Functions ................... 2–38 CONVERT_TIMESTAMP Service Function ............ 2–39 GET_DESIGNATOR_ARRAY_USING_DESIGNATOR Service Function .......................................... 2–40 GET_DESIGNATOR_USING_DESIGNATOR Service Function ...................................................... 2–41 GET_DESIGNATOR_USING_NAME Service Function ...................................................... 2–42 GET_ERRORTEXT_USING_NUMBER Service Function ...................................................... 2–43 GET_INTEGER_ARRAY_USING_DESIGNATOR Service Function .......................................... 2–44 GET_INTEGER_USING_DESIGNATOR Service Function ...................................................... 2–46 GET_NAME_USING_DESIGNATOR Service Function ...................................................... 2–48 GET_REAL_ARRAY Service Function ................... 2–49 GET_STRING_USING_DESIGNATOR Service Function ...................................................... 2–51 STATION_TABLE_ADD Service Function ............. 2–52 STATION_TABLE_INITIALIZE Service Function ..... 2–52 STATION_TABLE_SEARCH Service Function ....... 2–53 TEST_DESIGNATORS Service Function ............... 2–54 COMS Sample Program with a DMSII Database .................... 2–55 COMS Features Used in the Sample Program ............. 2–55 Data Sets in the Database ......................................... 2–55 Using the Sample Program ............................... 2–56 Section 3. Using the DMSII Program Interface Using Database Items ............................................................ 3–1 Naming Database Components ................................. 3–1 Using Set and Data Set Names .................................. 3–2 Referencing Database Items ...................................... 3–4 Declaring a Database ............................................................ 3–7 Invoking Data Sets ................................................................. 3–9 Examples of Invoking Data Sets ................................. 3–10 iv 8600 1526–202 Contents Example of Invoking Disjoint Data Sets with a Data Set Reference ........................................................... 3–11 Example of Designating Sets as Visible or Invisible to User Programs .................................................... 3–12 Using a Database Equation Operation ................................... 3–15 Specifying Database Titles at Program Execution ....... 3–15 Using Selection Expressions .................................................. 3–17 Using Data Management Attributes ....................................... 3–19 COUNT Attribute ...................................................... 3–19 RECORD TYPE Attribute ............................................ 3–21 POPULATION Attribute .............................................. 3–22 Manipulating Data in a Database .......................................... 3–23 ABORT-TRANSACTION Statement ............................... 3–23 ASSIGN Statement ................................................... 3–25 BEGIN-TRANSACTION Statement ............................... 3–29 CANCEL TRANSACTION POINT Statement .................. 3–32 CLOSE Statement .................................................... 3–33 COMPUTE Statement ................................................ 3–35 CREATE Statement ................................................... 3–36 DELETE Statement ................................................... 3–39 DMTERMINATE Statement ......................................... 3–42 END-TRANSACTION Statement .................................. 3–43 FIND Statement ........................................................ 3–46 FREE Statement ....................................................... 3–48 GENERATE Statement .............................................. 3–50 IF Statement ............................................................ 3–53 INSERT Statement .................................................... 3–55 LOCK/MODIFY Statement .......................................... 3–57 OPEN Statement ...................................................... 3–60 RECREATE Statement ............................................... 3–62 REMOVE Statement .................................................. 3–64 SAVE TRANSACTION POINT Statement ....................... 3–67 SECURE Statement .................................................. 3–68 SET Statement ......................................................... 3–70 STORE Statement .................................................... 3–72 Processing DMSII Exceptions ................................................ 3–75 DMSTATUS Database Status Word ............................ 3–75 DMSTRUCTURE Structure Number Function ............... 3–77 DMSII Exceptions ..................................................... 3–78 DMERROR Use Procedure ................................. 3–78 ON EXCEPTION/NOT ON EXCEPTION Clause ...... 3–79 Section 4. Using the ADDS Program Interface Accessing Entities with a Specific Status .............................. 4–2 Identifying Specific Entities ................................................... 4–3 VERSION Clause ....................................................... 4–3 DIRECTORY Clause ................................................... 4–4 Assigning Alias Identifiers ...................................................... 4–4 Identifying a Dictionary .......................................................... 4–6 Selecting a File ...................................................................... 4–8 8600 1526–202 v Contents Invoking File Descriptions ...................................................... 4–10 Invoking Data Descriptions in ADDS ...................................... 4–12 Sample ADDS Program .......................................................... 4–15 ADDS Descriptions ................................................... 4–15 COBOL85 Program Using ADDS Interface Syntax ........ 4–17 How ADDS Data Appears in a COBOL85 Listing .................... 4–23 Section 5. Using the SDF Plus Program Interface Understanding the SDF Plus Interface ................................... 5–2 Form Record Libraries .............................................. 5–2 Message Types ........................................................ 5–2 Transaction Types .................................................... 5–2 Example .......................................................... 5–3 Identifying the Dictionary ....................................................... 5–4 Invoking Data Descriptions in SDF Plus ................................. 5–5 Using SDF Plus Control Parameters ...................................... 5–9 SDF Plus COPY Library ............................................. 5–9 Transaction Numbers ....................................... 5–10 Message Numbers ........................................... 5–11 Form Library Description .................................. 5–11 Generating the COPY Library ............................. 5–12 Additional SDF Plus Control Parameters ..................... 5–12 SDFPLUS-RESULT ............................................ 5–12 SDFPLUS-TRANSNUM ....................................... 5–14 SDFPLUS-MSGNUM .......................................... 5–14 SDFPLUS-TRANERROR ...................................... 5–15 SDFPLUS-DEFAULTMSG .................................... 5–15 SDFPLUS-TEXTLENGTH .................................... 5–15 Run Time Support and Initialization ............................. 5–15 WAIT_FOR_TRANSACTION ................................. 5–16 SEND_MESSAGE .............................................. 5–17 SEND_TRANSACTION_ERROR ........................... 5–17 SEND_TEXT ..................................................... 5–18 Remote File .............................................................. 5–19 Remote File READ and WRITE ............................ 5–19 Multi-User Remote File ...................................... 5–19 Debugging with TADS ............................................... 5–20 Using SDF Plus with COMS ..................................................... 5–21 Using COMS Input/Output Headers ............................ 5–21 SDFINFO Field .................................................. 5–21 SDFFORMRECNUM Field ................................... 5–23 SDFTRANSNUM Field ........................................ 5–23 Sending and Receiving Messages .............................. 5–23 Sending Transaction Errors ....................................... 5–24 Sending Text Messages ............................................ 5–24 Specific Differences between COBOL74 and COBOL85 ........ 5–25 Syntax Applicable to All SDF Plus Programs ................ 5–25 Differences between a COBOL74 Remote File Interface Program and a COBOL85 CALL Interface Program . 5–27 Sample SDF Plus Programs ................................................... 5–28 vi 8600 1526–202 Contents Form Record Library ................................................ 5–28 Section 6. Using the SDF Program Interface Identifying the Dictionary ...................................................... 6–2 Declaring the Form Record Library Invocation ..................... 6–3 READ FORM Statement ......................................................... 6–5 WRITE FORM Statement ........................................................ 6–8 FORM-KEY Function ............................................................... 6–10 Programmatic Control Flags ................................................. 6–11 Generating Flag Groups ............................................ 6–12 Resetting Control Flags to Zero ................................. 6–13 Using SDF with COMS ............................................................ 6–14 REDEFINES and SAME RECORD AREA Clauses ........... 6–14 RECEIVE Statement .................................................. 6–14 FORM-KEY Function .................................................. 6–14 Transmitting a Default Form ...................................... 6–15 Sample COBOL85 Programs That Use SDF .......................... 6–15 Code for Remote File Interface and READ Statement ... 6–15 Remote File Interface and READ and WRITE Statements .......................................................... 6–16 Remote File Interface and Programmatic Controls ....... 6–17 Message Keys and Independent Record Area ............. 6–20 Section 7. TransIT Open/OLTP What is Open/OLTP? .............................................................. 7–1 Accessing Open/OLTP ........................................................... 7–1 Appendix A. Reserved Words Appendix B. User-Defined Words Index ............................................................................................................. 1 8600 1526–202 vii Contents viii 8600 1526–202

Description:
Jun 1, 1998 This announces a revision of the MCP/AS COBOL ANSI-85 Programming Reference Manual Volume 2: Product. Interfaces for HMP NX 4.0 and
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.