1. Olan Knight
  2. PowerBuilder
  3. Wednesday, 1 July 2020 04:49 PM UTC

Update:  03-JUL-2020

We found a copy of the DLL and deployed it with the utility. At this point everything compiles, but we have an unrelated DW_1 Retrieval Error occurring (the discussion is in a separate thread).



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PB2019R2, b2328
Windows 10, 64 bit platform
32 bit application comprised of a single PBL
No PFC

Summary:
Does anyone know of a replacement for the s_1mains function from the OTSW32.DLL?


Details:
We'have had this utility for a long time, and when it runs from the PB v12.1 IDE, there are no issues.
The utility has been migrated to PB2019, a full build was done, and an EXE was created with no pdbs.

When run from the PB2019 IDE, it fails at the call to this external function.
The issue was corrected by placing the DLL in C:\Program Files (x86)\Appeon\PowerBuilder 19.0.
We have not yet tested the EXE for the utility with this build configuration.

// Input file
1101011805011051446753820001030191763222000000555919301609270
1101011805011031274276550001020233175772000000288919301559380
1101011805011080095566000001030160979172000000288919301601270
1101011805011081780414120001030147556712000000288919301513330
1101011805011030171537440001030132464052000000288919301603350

// Local external function call
SUBROUTINE s_1mains ( REF string ls_file_in,     REF string ls_file_out,
                                     REF string ls_ctl_stmt, REF long   ll_num_recs,
                                     REF int     li_sort_return_code)
                                      LIBRARY "otsw32.dll" alias for "s_1mains;Ansi"

// Calling the external function 
is_include_omit_stmt    = INCLUDE (7,6,LE,'180501',46,4,EQ,'0288')
is_outrec_stmt            = ""
is_file_type_txt_stmt    = "FILETYPE(TXT)"
is_workdrive_stmt        = "C:\Users\olan.knight\OMACSGITNYS1049\output_file.tmp"

ls_ctl_stmt = is_include_omit_stmt + is_outrec_stmt + is_file_type_txt_stmt + is_workdrive_stmt

is_sort_file_in              = <path & file of input data file>
is_sort_file_out            = <path & name of output file>

s_1mains (is_sort_file_in, is_sort_file_out, ls_ctl_stmt, il_sort_number_records, ii_sort_return_code)

~~~~~~~~~~~~

// otsw32.DLL
The function "s_1mains" apparently takes a file filled with data as above and does the following:

   1. opens the is_sort_file_in file
   2. will only include rows whose BillDate (bytes 7-12) <= '180501' AND whose ICC (bytes 46-49) = '0288'
       in the output file is_sort_file_out

   3. Sorts the data in the is_sort_file_out by the date
 
This function is lightning fast.


Thank You,

Olan


Responses (1)
  1. Likes
  2. Latest
  3. Oldest
Loading...

Find Questions by Tag

.EXE .NET 6.0 .NET Assembly .NET Core 3.1 .NET Core Framework .NET DataStore .NET Std Framework 32-bit 64-bit ADO.NET AEM AI Algorithm Amazon AWS Android Apache API APK App Store App Store (Apple) Appeon Workspace Appeon Xcelerator Plug-in Architecture Array ASE Asynchronous Methods Authentication AutoBuild AutoCompiler Automated Testing Automation AutoScript Azure Barcode Base64 Batch BigData BLOB Branch & Merge Browser Bug Build Button C# C# Class Importer C# Editor C# Model generator Calendar Camera Certificate Chrome Citrix Class Client Client/Server Cloud Cluster Collection COM Command Line Compiler Compression Computed Field Configuration Controls Cookies Cordova Crash Cross-Platform Crosstab CSharpAssembly CSharpObject CSS CSV Cursor Data Database Database Driver Database Painter Database Profile Database Provider DataObject DataSource DataStore DataStore (C#) DataStore (PS) DataType DataWindow DATE DATETIME DB2 Debug Debugger Debugging Deployment Design DLL DO-WHILE Dockable Docker Documentation DOUBLE Download DragDrop Edge Edit Style Editor Elevate Conference Email Embedded SQL Emulator Encoding Encryption Enhancement Request Entity Entity Framework ERP Error Event Event Handler Event Handling Excel Exception Export Expression External Functions F# Field File File Access Filter Firefox Firewall Font FOR-NEXT Foreground Format Function Garbage Collection GeoLocation Git Graph HANA Hash Header HTML/5 HTTP/S HTTPClient Icon IDE Identity IIS IMAPI Import InfoMaker Inheritance Installation Integer IntelliSense Interface Internet Internet Explorer iOS IPA iPad iPhone IWA J# Java JavaScript JBoss JDBC JOIN JSON JSONGenerator JSONParser Kestrel Label Lambda Large File LDAP Library License LINQ Linux OS Load Balancing Localization Localized PBVM Log In Log Out Logging LONG LONGLONG macOS MAPI Maps MDI Memory Memory Leak Menu Merge MessageBox Messagging Method Migration MIME TYPE Mobile Model ModelStore ModelStore (C#) MSOLEDBSQL Multi Threading MVC MySQL n-Tier Namespace NativePDF NVO OAuth ODATA ODBC Office Offline OLE OLEDB Online Open Source OpenAPI OpenSSL Oracle OrcaScript Other Outlook Output Package Parameter Patch PayPal PB Classic PB Native PB.NET PBC PBD PBDOM PBG PBJVM PBL PBNI PBORCA PBVM PBX PDF Performance Permission PFC Picture Pipeline Play Store (Google) Plugin Popup Port POST PostgreSQL PowerBuilder PowerBuilder (Appeon) PowerBuilder (SAP) PowerBuilder Compiler PowerBuilder Runtime PowerClient PowerScript (PS) PowerScript IDE PowerScript Migrator PowerServer PowerServer Mobile PowerServer Toolkit PowerServer Web PowerServerLabel Print Properties Proxy Publish PULL PUSH Query Regression Release Renew Resize Response REST Retrieve RibbonBar RibbonBar Builder Rich Text Roadmap RPC Runtime Packager SaaS Scaffolding Script SDI SDK Security Server Service Session Single Sign-on Size SMTP SMTPClient SnapDevelop SOAP Sort Source Code Speech Recognition SQL SQL Anywhere SQL Server SqlBuilder SqlExecutor SQLite SqlModelMapper Storage Stored Procedure Subscription SVN Swagger Syntax TabbedBar TabbedView Tablet TabPage Target TE Control Testing Text TFS Theme TIME Timer TLS/SSL Tomcat TortoiseGit TortoiseSVN Transaction Transparency Trial Trigger TRY-CATCH TX Control Type UI ULONG UltraLite Uninstall Unit Test Unit Testing UNIX OS Update Upgrade Upload URL User Center User Object UWP Validation VARCHAR Variable Versioning Visual Studio Visual Studio Code VM Voice Warning WCF Web API Web Extensions Web Service WebBrowser WebForms WebLogic WebSphere WildFly WinAPI Window Windows OS WinForms Wizard Workgroup Workspace WPF XCODE XHTML XML Zoom

Helpful?

If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.