AnyToAny Engine FAQ
Common questions about the Redix AnyToAny Format Converter Engine — architecture, X12 support, API interfaces, performance optimization, and licensing.
What is the difference between AnyToAny and AnyToXML Format Converter Engines?
AnyToXML converts EDI or flat files to XML in the same data order as the source file. No OFD (Output File Descriptor) is needed — the engine reads the source using an IFD and outputs XML directly.
AnyToAny handles conversions where the target data order differs from the source, or where data manipulation, mapping, and reformulation are required. An OFD file defines the target format and transformation rules.
AnyToXML suits a straightforward same-order XML representation; ask Redix whether it is offered for your version and platform. Use AnyToAny when you need to transform, reorder, or map data between different formats.
Which X12 versions does the AnyToAny Engine support?
The engine processes X12 through message definitions (IFDs) and maps, so the versions and transactions you can convert depend on the definitions and maps you use. Redix X12 message definitions have historically covered these versions:
- 3040
- 4010, 4020, 4030
- 5010, 5020, 5030, 5040, 5050
This includes 5010, the version adopted under HIPAA. It is historical coverage, not a promise of every transaction or of later releases. For HIPAA work, the HIPAA Package supplies 4010 and 5010 definitions and maps; the exact versions, transactions, implementation guides, and maps for your project are confirmed in your evaluation.
How do I fix the EXCEPTION_STACK_OVERFLOW error in Java?
EXCEPTION_STACK_OVERFLOW means a thread ran out of stack space. With the Java (JNI) interface it can appear inside the native engine call, and it does not have a single universal fix. The V9 Linux installation notes for the Java interface recommend starting Java with a 2 MB thread stack, for example java -Xss2m com.redix.any2any.redix. An older Reference Manual procedure that patched java.exe with EDITBIN dates from early Windows JDKs; treat it as a legacy, build-specific workaround, not a general fix.
If the error persists, send support@redix.com your Redix engine version, your JDK version and vendor, whether the process is 32-bit or 64-bit, your operating system, and the full error output. A larger stack does not fix every cause of this error.
How can I pass data to an existing OFD?
Use the user_data parameter in the redix_app_extA API function. External data is passed as one delimited string, with the values separated by the element separator given in the same call (for example, AAA+BBB+CCC with + as the element separator).
In the OFD, reference the data elements using:
userdata(0)— first elementuserdata(1)— second elementuserdata(2)— third element, and so on
Up to 100 data elements can be passed. This allows runtime parameters such as trading partner IDs, dates, or configuration values to be injected into an OFD without modifying it.
How can I extract error information from a Redix error file?
Use the geterrorinfo OFD function. It reads a line of Redix error data and returns the line number, segment name, position, error data, element number, and description, separated by vertical bars.
A legacy Redix SQL Server example runs an OFD that receives the error file name, the original input file, and the database connection details through userdata, and writes the extracted error information to a SQL Server database for tracking and reporting. Writing to a database uses the Database module and a supported database driver; confirm both for your build. Never put real credentials in public samples, shared logs, chat, or unprotected configuration files; where your application has an approved way to supply credentials, use it.
To execute, use either:
- The
redixscrcommand-line utility - The
redix_scrA()API function
How can I transfer my license?
Plan the move with support@redix.com before you transfer anything. When a transfer completes, the old installation is no longer licensed, so Redix can arrange a license for the new system first and you can test it before cutover. The steps depend on your version and platform:
- Older Windows installations: the GUI has a transfer function in the Help menu ("Transfer the license"), and the engine uses the Redix License Manager (
enginelic.exe, "Transfer License"). - Linux: the transfer uses a separate command-line utility (
unixtrans). - V9: Redix issues the license for the new machine's hardware, from a registration tool you run on that machine.
- Containers: licensed differently; ask Redix.
How do I improve engine performance?
Four techniques for optimizing AnyToAny Engine performance:
(a) Reduce IFD message definition size. Remove optional segments and loops that are not used under your trading partner's applicable guide; never remove structures the guide requires, and test the modified definition. In an older illustrative example from the Redix Reference Manual (an X12 4010 850 purchase order on a Pentium 2.8 GHz Linux system with 512 MB RAM; not a performance promise), reducing the IFD from 196 KB to 41 KB cut processing time from 0.196 s to 0.061 s. Measure the effect on your own files.
(b) Optimize OFD traversals. Add if-conditions to the OFD to eliminate unnecessary traverses of source data segments.
(c) Order type "A" code checks efficiently. Place the most commonly matched codes first in type "A" code check lists, so the engine finds matches earlier.
(d) Consolidate type "D" code checks. Use a single codebase file with the ElementNumber:CodeValue format instead of multiple separate codebase files.
How do I program a user-defined procedure?
On Windows, the Redix Reference Manual describes this procedure:
- Create a
users32project in Visual C++ - Add
trav_upr.cppfrom the Redix folder to the project - Implement the
checkid1routine with your custom validation logic - Compile the project to produce a DLL
- Copy the DLL to the Redix folder
The checkid1 routine returns 1 for valid or 0 for invalid. In the GUI Mapper, set the user-defined procedure field to "1" to activate it.
Build the DLL for the same bitness (32-bit or 64-bit) as the engine that loads it, and confirm the template and library name for your engine version and platform with Redix.
Can I use VB.Net to interface with the Redix engine?
Yes, by calling the engine DLL. The excerpt below declares redix_app_extA from rfcx.dll, the 32-bit engine DLL; 64-bit builds use rfcx64.dll, and your .NET project must target the same bitness as the DLL it loads. The argument types follow the signature in the V9 Reference Manual: the conversion flag and the four separator arguments are single characters, and the warning level is an integer.
Private Declare Function redix_app_extA Lib "rfcx.dll" ( _
ByVal InputFile As String, ByVal IFDFile As String, _
ByVal OFDFile As String, ByVal ACKFile As String, _
ByVal ERRFile As String, ByVal OutputFile As String, _
ByVal CONVFlag As Byte, ByVal SEGMENT As Byte, _
ByVal ELEMENT As Byte, ByVal COMPOSITE As Byte, _
ByVal Release As Byte, ByVal UserData As String, _
ByVal WarningLevel As Integer, ByVal TA1File As String _
) As IntegerThis is a declaration, not a complete application. Your own wrapper class supplies the parameter values (InputFile, IFDFile, OFDFile, ACKFile, ERRFile, OutputFile, CONVFlag, SEGMENT, ELEMENT, COMPOSITE, Release, UserData, WarningLevel, TA1File), calls redix_app_extA, and checks the return code. Confirm the export names, calling convention, and marshaling against the Reference Manual for your engine version, or ask support@redix.com for the matching sample.
Can I use VB 6 to interface with the "redix" command line?
Yes. Use CreateProcessA with WaitForSingleObject to shell the redix command with a configuration file.
Create a .cfg file specifying the conversion parameters:
INFILE=input.edi IFD=mymap.ifd OFD=mymap.ofd ACKFILE=ack.txt ERRFILE=errors.err OUTFILE=output.dat CONVFLAG=x SEGSEP=~ ELEMSEP=* COMPSEP=: RELCHAR= USERDATA= WARNINGLEVEL=0 TA1FILE=
Then invoke the command line:
commandLine = "redix config.cfg"
Use CreateProcessA to launch the process and WaitForSingleObject to wait for completion before checking the output and error files. The engine then runs as a separate process (redix64 on 64-bit builds); this does not mean a 32-bit VB 6 program can load a 64-bit engine DLL in-process.
Still have questions? Contact us or read the Live Sandbox FAQ.