Wednesday, November 7, 2018

Dexterity system commands

GP and other dex based products are still full of calls to system commands, even though every single one of these was declared obsolete with the release of Dexterity 3.0.  For a frame of reference, we are on Dexterity 18 now.

If you don't know what a system function is, it looks like this:


system 5082, l_platform;

It has become nearly impossible to find info on these old functions, making it difficult to reverse engineer, or even just read old Dex code.

Below I have listed what I have been able to gather.  I plan to add and update this going forward.

0351 - currency format - replaced by Currency_SetDecimalSymbol(), Currency_SetSymbol(), Currency_SetThousandsSymbol()
0352 - currency format - replaced by Currency_SetLeadingSymbol(), Currency_SetNegativeParens(), Currency_SetNumberOfDecimals()
0353 - currency format - replaced by Currency_SetLeadingZero(), Currency_SetNegativeAfterValue()
0354 - currency format - replaced by Currency_SetNegativeBeforeSymbol(), Currency_SetNegativeSymbol()
0355 - currency format - replaced by replaced by Currency_GetNativeSymbol()
0356 - currency format - replaced by Currency_GetDecimalSymbol(), Currency_GetSymbol(), Currency_GetThousandsSymbol()
0357 - currency format - Currency_GetLeadingSymbol(), Currency_GetNegativeParens(), Currency_GetNumberOfDecimals()
0358 - currency format - Currency_GetLeadingZero(), Currency_GetNegativeAfterValue()
0359 - currency format - Currency_GetNegativeBeforeSymbol(), Currency_GetNegativeSymbol()
0772 - checks mode used to exit runtime engine - replaced by Activity_GetExitMode()
0774 - checks mode used to exit runtime engine - replaced by Activity_GetExitMode()
1300 - fills list box with data source names - replaced by Login_GetDataSources()
1301 - logs user into data source - replaced by Login_LogIntoDataSource()
1302 - gets login info - replaced with Login_GetInfo()
1303 - opens login window - replaced with Login_OpenDexDialog()
1304 - disconnect from data source - replaced by Login_ExitDataSource()
1306 - sets whether delete table statement drops table or deletes data - replaced by Table_SetDeleteOptions()
1308 - validates login - replaced with Login_VerifyInfo()
1317 - delete all records - replaced by Table_Truncate()
1318 - validate table structure - replaced by Table_Compare()
1319 - forces client buffer refresh - replaced by Table_SetRefreshFlags()
1960 - allows user to select dictionary location - replaced by Launch_SelectDict()
1961 - allows user to select a launch file - replaced by Launch_SelectFile()
1962 - gets generic path of current launch file - replaced by Launch_GetFileName()
1964 - fills list fields with info from launch file - replaced by Launch_GetFileInfo()
1965 - gets path to a dictionary from the launch file - replaced by Launch_ReadDictPath()
1966 - writes path to a dictionary to the launch file - replaced by Launch_WriteDictPath()
1967 - gets file name from generic path - replaced by Launch_ParseFileFromPath(), Path_ParseFileFromPath()
2500 - sets style and color for required fields - replaced by Field_SetRequiredFormat()
2501 - sets style and color for required fields - replaced by Field_SetRequiredFormat()
2502 - sets style and color for required fields - replaced by Field_SetRequiredFormat()
2503 - gets runtime version - replacd by Runtime_GetVersionNum()
2504 - forces window redraw - replaced by Window_ForceRedraw()
2508 - writes a setting to dex.ini - replaced by Defaults_Write()
2509 - reads a setting from dex.ini - replaced by Defaults_Read()
2510 - changes default path for tables - replaced by Path_ChangeDefault()
2511 - ignore error checking on tables - replaced by Table_DisableErrorChecks()
2512 - changes enter key and tab key functonality - replaced by Runtime_SetFieldEnterMode()
2516 - open a text file - replaced by TextFile_Open()
2517 - close a text file - replaced by TextFile_Close()
2518 - reads a line from a text file - replaced by TextFile_ReadLine()
2519 - writes a line to a text file - replaced by TextFile_WriteLine()
2520 - change title of about box - replaced by Runtime_SetAboutMenu()
2521 - get current dicntionary file name - replaced by Dict_GetName()
2522 - insert string into text field - replaced by Field_InsertStringInText()
2523 - parses text field into string- replaced by Field_ParseText()
2524 - writes a line to a text file in DOS format - replaced by TextFile_WriteDOS()
2526 - get number of files open - replaced by File_Count()
2528 - delete a file from the OS - replaced by File_Delete()
2540 - gets required property of a field - replaced by Field_GetRequiredStatus()
2540 - sets required property of a field - replaced by Field_SetRequiredStatus()
2996 - DDE function - replaced by DDE_EndConversation() which is no longer supported either
2997 - DDE function - replaced by DDE_WriteToServer() which is no longer supported either
2998 - DDE function - replaced by DDE_ReadFromServer() which is no longer supported either
2999 - DDE function - replaced by DDE_ExecuteServerCommand() which is no longer supported either
3522 - gets IP address of client workstation - replaced by IP_GetIPNumber()
3523 - ping process server - replaced by IP_PingDPS()
5001 - help function - replaced by DexHelp_GetLinkedPrompt() which is no longer supported either
5004 - help function - replaced by DexHelp_FillFormList() which is no longer supported either
5005 - help function - replaced by DexHelp_FillWindowList() which is no longer supported either
5006 - help function - replaced by DexHelp_FillFieldList() which is no longer supported either
5007 - help function - replaced by DexHelp_GetFieldID() which is no longer supported either
5008 - help function - replaced by DexHelp_GetArrayIndex() which is no longer supported either
5009 - gets dex resource id - replaced by Resource_GetID()
5010 - converts generic to native path - replaced by Path_MakeNative()
5011 - converts native to generic path - replaced by Path_MakeGeneric()
5012 - gets count of resources - replaced by Resource_StartSeriesFill()
5013 - gets resource id and name - replaced by Resource_GetInfo()
5014 - fills list fields with display name and technical name of resources - replaced by Resource_FillSeriesList()
5015 - fills list field with table named - replaced by Table_FillList()
5016 - fills list field with table group names - replaced by Table_FillGroupList()
5017 - gets title of a window - replaced by Window_GetTitle()
5018 - validates data in a record in a table - replaced by Table_VerifyRecord()
5019 - create a temp table to hold data from shrunk table - replaced by Table_StartShrink()
5020 - copy record into temp table for shrinking - replaced by Table_CopyShrinkRecords()
5021 - finish table shrink - replaced by Table_EndShrink()
5022 - releases series fill resources - replaced by Resource_EndSeriesFill()
5023 - marks or unmarks items in list - replaced by Field_MarkListItems()
5024 - allow user to select path to a file - replaced by Path_SelectPathname()
5026 - release lock on forms or reports dictionary - replaced by Dict_UnlockCustom()
5027 - get count of forms or reports in dictionary - replaced by Dict_CountCustomResource()
5028 - get info on a form or report - replaced by Dict_GetCustomResourceInfo()
5029 - create new folder - replace by Path_CreateFolder()
5030 - get title of forms main window - replaced by Window_GetMainWindowTitle()
5031 - get path to runtime engine - replaced by Dict_GetPathname(), Path_GetForApp()
5032 - get display name for table - replaced by Table_GetDisplayName()
5033 - lock forms or reports dictionary - replaced by Dict_LockCustom()
5053 - enable modifier menu items - replaced by Tools_EnableModifier()
5054 - enable report writer menu items - replaced by Tools_EnableReportWriter()
5055 - get runtime version info - replaced by Runtime_GetModuleInfo()
5056 - get runtime version info - replaced by Runtime_GetModuleInfo()
5058 - get runtime version info - replaced by Runtime_GetModuleInfo()
5061 - check for background processing - replaced by Activity_GetBackgroundStatus()
5064 - appends string to text field - replaced by Field_AppendStringToText() which is no longer supported either
5082 - gets the type of OS - replaced by Runtime_GetOSType() which is no longer supported either
5090 - gets resource display name - replaced by Activity_GetResourceName(),Resource_GetDisplayName()
5091 - starts converting data from old table def to new table def - replaced by Table_StartConversion()
5092 - finish table conversion - replaced by Table_EndConversion()
5095 - sets default database type - replaced by Table_SetDBType()
5096 - gets title of window - replaced by Window_GetTitleByProduct()
5100 - fills list field with product names from launch file - replaced by Launch_FillListWithProds()
5101 - gets a product id from the launch file - replaced by Launch_GetProdID()
5103 - gets number of products in launch file - replace by Launch_CountProds()
5104 - gets product name from launch file - replaced by Launch_GetProdName()
5105 - gets position of product in launch file - replaced by Launch_GetProdPosition()
5125 - old ctree and pervasive SQL function to check whether table can shrink - replaced by Table_GetAutoShrinkMode()
5126 - old ctree and pervasive SQL function to shrink table - replaced by Table_AutoShrink()
5127 - old ctree and pervasive SQL function to rebuild indexes - replaced by Table_RebuildIndexes()
5147 - returns temp table physical name
5196 - specify whether tables will be auto created when accessed replaced by Table_SetCreateMode()
8000 - checks if a file exists and can be opened - replaced by File_Probe()

SQL 2022 TSQL snapshot backups!

  SQL 2022 now actually supports snapshot backups!  More specifically, T-SQL snapshot backups. Of course this is hardware-dependent. Here ...