Skip to content

Instantly share code, notes, and snippets.

@RM
ÿ
A row mark (ASCII 255). Separates rows.
@FM
þ
A field mark (ASCII 254). Separates columns within a row.
Function CS_EDIT_TABLE_SAMPLE_EVENTS(CtrlEntID,Event,Param1,Param2,Param3,Param4,Param5,Param6,Param7,Param8)
//To use replace CS_EDIT_TABLE_SAMPLE with your window's form name
*
* Blank Commuter Module
*
Declare Subroutine Msg, FsMsg, Set_Status, Set_Property
Declare Function Msg, Get_Property, Get_Status, Set_Property, Popup
Declare Function Repository, Send_Message, Send_Event, Unassigned, Utility, XLate
Declare Function ContextMenu
#
#Simulate LinearHash Service disk access patterns
#
#These commands benchmark a disk's performance in such a way that it replicates the worst possible access pattern.
#No caching, small 1k blocks, one thread, and 1 disk queue depth, and in a random file access.
#Read test
diskspd.exe -c4000M -d30 -W10 -w0 -t1 -o1 -b1K -r -Sh -L e:\diskbench.dat
#Write test
Declare Subroutine Create_Symbolic, Set_Status, FsMsg
Declare Function Get_Status
table = "INVENTORY"
column = "NUMKEY"
Overwrite = 1
formula = "@ans = {@ID}" : @fm
dType = "INTEGER"
Function rti_toggle_Resizing_thread(bResizeFlag)
/*
** for ud 5.0.0.4 or better
** Turn reizing thread on or off
** Usage:
** rti_toggle_Resizing_thread(1) ; * enable resizing
** rti_toggle_Resizing_thread(0) ; * disable resizing
** rti_toggle_Resizing_thread(""); * toggle resizing
**
** 16-may-16 rjc Created
Function CS_OI_FORM_LIB(inMethod, Param1, Param2, Param3, Param4, outValue,outStat)
/*
Function: CS_OI_FORM_LIB
>CS_OI_FORM_LIB(inMethod, Param1, Param2, Param3, Param4, outValue,outStat)
General purpose library
Parameters:
inMethod - Varies depending On action.
@jbratu
jbratu / gist:b30fbdcf1017461ad8f16e48e93b44cd
Created February 20, 2018 18:01
Loop through dictionary fields for a table and try to read each field.
Subroutine UTIL_CHECK_FIELDS_JAB(void)
declare function Set_FSError
$Insert Logical
*TABLE_NAME = '' ; KEY = ''
Stack = ''
*Change to the name of the table to ReadNext through
@jbratu
jbratu / cs_logger.oibp
Last active March 22, 2024 03:40
Simple OpenInsight logging utility for recording log files from your code.
Function CS_Logger(instance, inMethod, Param1, Param2, Param3, Param4, outValue,outStat)
/*
Function: CS_Logger
>CS_Logger(instance, Param1, Param2, Param3, Param4, outValue,outStat)
Logging Utility.
Parameters:
instance - A previously created log object instance created With the 'Setup' method
@jbratu
jbratu / clear_old_save_lists.oibp
Created January 25, 2018 03:14
Snippet of code to go through SYSLISTS and delete anything that looks like a save select list that is older than the date specified.
Open "SYSLISTS" To Table Else Debug
QUERY = 'SELECT SYSLISTS WITH @ID NE ""'
Keys = CS_RLIST_UTIL('getKeysBuffered', 'CLEAN SYSLISTS', QUERY, True$, True$)
KeysCount = DCOUNT(Keys, @FM)
DeleteCount = 0
*Delete anything older than
Function test_select_to_var(cmd)
*https://www.revelation.com/o4wtrs/oecgi3.exe/O4W_RUN_FORM?INQID=WORKS_READ&KEY=DCD2FBF16711D5E5E125DDAD1&SUMMARY=0#/section/breadcrumb/UPDATETABLE/Display
/*
** Get the keys from a select
** 12/29/17 rjc Created
*/
#pragma format_indent_Comments