Visualage for Smalltalk Handbook Volume 2: Features
Total Page:16
File Type:pdf, Size:1020Kb
SG24-2219-00 VisualAge for Smalltalk Handbook Volume 2: Features September 1997 SG24-2219-00 International Technical Support Organization VisualAge for Smalltalk Handbook Volume 2: Features September 1997 IBM Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix A, “Special Notices.” First Edition (September 1997) This edition applies to VisualAge for Smalltalk, Versions 2, 3, and 4, for use with OS/2, AIX, and Microsoft Windows 95/NT. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1997. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Preface . xiii How This Redbook Is Organized ....................... xiv ITSO on the Internet ................................ xv VisualAge Support on CompuServe ..................... xvii About the Authors ................................ xvii Acknowledgments . xviii Comments Welcome . xix Chapter 1. AS/400 Connection . 1 Multiple Programs with a Single Remote Procedure Call ......... 1 RPC Part Sets Commit Boundary ........................ 1 Connection Problem with V3R1 ......................... 2 AS/400 Communication Error .......................... 2 Strange Characters on Log-on Window .................... 3 Quick Form from AS/400 Record Classes ................... 3 Communication . 4 Read Next/Previous . 4 SQL Statements . 5 Data Queues and Records ............................ 6 ODBC Requirements . 6 ClientAccess/400 Optimized for OS/2 ..................... 7 VisualAge Server on LAN Server/400 ..................... 7 Native Application Accessing VisualAge for Smalltalk Application .... 8 Packaging Problem . 8 Run-time Prerequisites for VisualAge for Smalltalk AS/400 Application . 9 Fixes Available Via FTP .............................. 9 Multiple AS/400 Connections .......................... 10 Accessing AS/400 Physical File Members ................... 11 Accessing AS/400 Database ........................... 11 QENVY/QENVAUXD . 12 Code Page Translation .............................. 12 Date Conversion . 13 Database Transactions . 14 ReadAll Method . 14 Blocking Factor ................................... 15 Multitasking with the AS/400 Parts ....................... 15 Checking PCS Status ............................... 17 Suppressing AS/400 Sign-on Dialog ...................... 17 Changing Normal Cursor to Busy Cursor ................... 17 PromptForUserIdAndPassword . 18 Performance Comparison . 19 Copyright IBM Corp. 1997 iii Packaged Application Requirements ...................... 21 VisualAge for Smalltalk with OS/2 Client ................... 21 Packaged Image Size ............................... 22 Transaction Program . 23 AS/400 Connection Feature Installation .................... 23 ILE Service Programs ............................... 24 5250 Screen Scraping ............................... 24 DDM Performance and File Access Parts ................... 26 Migrating from OS/400 V3R0M5 to V3R1 .................... 27 Compound Key . 28 Data Queue Program Temporary Fix ...................... 31 Record Descriptions . 31 Stored Procedures in RPG ............................ 32 Proper Exiting to Remove Dependents ..................... 33 RPC Parameter Problem ............................. 34 Variable-Length Data Queue ........................... 34 Saving Image Causes Communications Problem .............. 35 RPG Program Calls ................................ 36 Personal Communications for AS/400 ..................... 37 Repeated Record Structures ........................... 37 Simultaneous DDM Access ........................... 39 Synchronous Processing . 40 ODBC Driver and Host Variables ........................ 42 Asynchronous RPC with Large Arguments .................. 42 Data Queues . 43 File Open and Close ................................ 43 Sign-On Screen . 44 Error Using #readAll ............................... 44 DDM and RPC ................................... 44 ODBC Default Library ............................... 45 File Locking . 45 Unique Keys . 46 Logical Record Format .............................. 47 Fastest DB2/400 Access ............................. 48 Access OV/400 Document ............................ 50 AS/400 Connection through TCP/IP ....................... 50 AS/400 Feature and TCP/IP ........................... 51 Remote Procedure Call Messages ....................... 51 Remote Command Fix .............................. 53 Fixpack Problem . 53 User Profile Name ................................. 54 Referential Integrity Constraint Violation ................... 55 Reestablish Connection .............................. 56 Application Packaging . 57 iv VisualAge for Smalltalk Handbook − Features File Access through Library List ........................ 57 Record Name and DDS .............................. 58 Cursor Stability . 58 Job Queues . 59 Client Access for Windows ............................ 59 ODBC vs. File Access Part ............................ 60 File Agents . 61 Using Windows 16-Bit Platforms over TCP/IP ................. 62 Unspecified Key . 63 Chapter 2. Communications and Transactions ................ 65 Supported TCP/IP Stacks ............................. 65 Testing the TCP/IP Setup ............................. 65 Address in Use ................................... 66 Using TCP/IP in Scripts .............................. 66 Socket Program with Time-Out ......................... 68 Sockets and Streams ............................... 70 Error: ′A NetBIOS message was ignored′ ................... 70 Accessing COBOL through CICS ........................ 71 Primitive Failing When Opening CICS Proc Dialog Settings ........ 72 Handling a Transaction Abend ......................... 72 CICS ECI and Code Page Translation ..................... 73 MQSeries and VisualAge on AIX ........................ 73 MQ: ″No Message Available″ .......................... 74 Syncpoint Processing . 75 ASCII to EBCDIC Conversion .......................... 75 MQI Sample Application ............................. 76 Commit/Rollback with MQ ............................ 78 Error: MqccFailed . 78 Host Presentation Space ............................. 79 Getting 3270 Cursor Position ........................... 79 Intercepting Key Strokes ............................. 80 Accessing COM Ports in Smalltalk ....................... 80 Chapter 3. Interface to External Routines ................... 81 Using OSSObject, OSObject Pointer, AbtPointer Classes .......... 81 Freeing a DLL ................................... 83 Error: Abt.154e . 83 Signaling the End of a Rexx Program ..................... 84 Set Working Directory for Program Starter .................. 84 Debugging DLLs . 86 Calling OS/2 Presentation Manager API Functions ............. 88 Function Like f(int*) ................................ 89 Legacy Code . 90 Contents v Calling a Smalltalk Image from OS/2 ...................... 91 Calling Smalltalk from the Outside ....................... 91 Interface to Native Presentation Manager Widgets ............. 94 Changes to 16-Bit Function Calling Convention ............... 95 Calling OSObjects . 95 Memory Leaks from a C DLL under OS/2 ................... 96 Debugging C DLLs Called from VisualAge .................. 96 Checking If Platform Function Is Available .................. 96 #asPointer Method . 97 COBOL Wrapper Locking the DLL ....................... 98 Passing a Complex Structure to a C DLL ................... 98 Parsing COBOL COPY-Book .......................... 101 Calling C Functions from VisualAge on AIX ................. 103 Sample Callback Function ........................... 104 DDE on AIX .................................... 108 Chapter 4. CICS and IMS Connection .................... 109 Successor Uniqueness Violation Exception ................. 109 Exception: TransRecord Does Not Understand ............... 110 HLLAPI Exceptions: Harclock Exceptions .................. 110 Time-out Exceptions . 111 Drag-and-Drop for Windows 95 ........................ 111 Screen Scraper Functionality ......................... 111 IBM Smalltalk 64 KB Method Size Limit ................... 111 BplBusinessObj class>>allInstances Behavior .............. 112 Business Object Key Alteration ........................ 112 Run-Time Image Build Problems ....................... 113 Host Transaction Interface Changes ..................... 113 Communication Considerations . 114 Chapter 5. Database . 117 Error Message When Upgrading ....................... 117 Ineffective Bind Command Syntax ...................... 117 User ID from User Profile Manager ...................... 117 Password-Required Warning when Using TopLink ............. 118 DB2/6000 Connection Failure on AIX ..................... 119 Handling Errors in Database Code ...................... 119 SQL Error 30081n in DB/2 2.1 ......................... 120 Call-Level Interface . 120 Binding Problem with DB2/6000 on AIX ................... 121 OS Error 126 Connecting to Oracle ...................... 122 SQLSTATE 37000 Error with ODBC Driver .................. 123