APPX Runtime Subroutine API
This page lists all the available API's in the current version of Appx. Various API's have been released at different times and are documented in the release notes for that release, this page lists all of them in one location. The initial set of API's was released in version 5.1.
General Information
All of these new subroutines are defined in the (---) application and begin with a period (.). They all use a standard call interface and use the same framework for returning results and reporting errors. They are grouped by name prefix so that related subroutines are grouped together by function. Data is passed into and returned from these subroutines by use of the PASS statement. Failure information is returned by use of a work field with the same name as the subroutine. This failure code field is tokenized so you can scan to see the failure reasons that can be returned. Note that the work field has a scope of 'Detached', and so will retain it's value from invocation to invocation, as well as across all invocation types.
If the subroutine accepts parameters (i.e., READ, WRITE, APPEND to --- .STREAM OPEN), the parameters are case insensitive.
If the subroutine has required parameters and you do not PASS the correct number of parameters, the subroutine will issue a CANCEL identifying which parameter was missing.
General Subroutines
Application Routines
Changes the current application to the 'Initial Setup' phase.
Changes the current application to the 'Live Operations' phase.
Changes the current application to the 'Recovery Processing' phase.
Switches to the specified database.
Utility Routines
Adds a user to the Appx User file.
Adds a record to the Hook file.
Checks the security access for the specified user when Role Based Security is used.
Checks the security code for the specified user.
Changes the Auxiliary password for the specified user.
Changes fields on the Hook File.
Changes fields on the Appx User File.
Clears any unfilled PASS requests.
Compiles the specified Process Type/Name or Application.
Computes the SHA-2 hash value of the given string
Deletes a user from the Appx User File.
Deletes a record from the Hook File.
Sends an Email.
Retrieves the value of the specified field name.
Sets a value into the specified field name.
For a given Process Type/Name, returns the Em name.
Copies the engine Hook records into a temporary file for modification.
Populates the --- MESSAGES file with any messages that were issued
Cancels the specified process
Loads --- STACK with the current process stack.
Not Implemented
Marks a process so you can return to it immediately via .UTIL MARK REWIND
Returns immediately to a previously marked process, closing all processes in between.
This subroutine allows the user to select a record on a scrolling display by just clicking it.
Processes the Data Dictionary for the selected Application or File.
Writes the current record to the Query pointer file.
Activates the hooks in the temporary file.
Restores Security codes from the archive
Saves Security codes to the archive
Pauses for the specified number of seconds.
Pauses for the specified number of seconds with a countdown timer.
Closes the subroutine you created using .UTIL SUBR CREATE
Adds a subroutine to the specified application.
Deletes a subroutine from the application.
Writes ILF code to a subroutine in the Application.
Changes to a different user.
Exits or logout a user after a set timeout period.
Sets the keyboard timeout value.
Update process documentation via ILF
XML Processing Routines
Processes an XML file and optionally imports it.
Deletes the work files used by a particular import session.
Creates and opens an XML file on the server and adds <?xml?> to it.
Closes an XML file and frees up memory used by XML Writer.
Opens an element in an XML file.
Closes the most recent opened element in an XML file
Adds data to the most recent opened element in an XML file.
Opens a cdata element in an XML file
Adds cdata end tag to an XML file
Adds an attribute name, value pair to the most recent opened element in an XML file.
JSON Processing Routines
Processes a JSON string and imports it.
Processes a JSON file and imports it.
Web Processing Routines
Populates Appx Variables from STDIN.
WIDGET Routines
Applies a GUI Theme to the current image.
Converts an alpha/hex color code to decimal.
Converts a decimal color code to alpha/hex.
Returns the count of selected rows in the specified table widget
Deletes selected widgets.
Deletes the mode buttons from the toolbar.
Deletes the scroll buttons from the toolbar.
Deletes the standard pull down menus.
Hides selected widgets.
Hides the mode buttons on the toolbar.
Hides the scroll buttons on the toolbar.
Hides the standard pull down menus.
Finds all Inputs/Menus that do not use .WIDGET APPLY THEME.
Reloads all the data in a Table Widget
Copies the memory file to --- WIDGET.
Copies the current --- WIDGET file to a memory file.
Sets the current Theme Name.
Sets or clears the tooltip for selected widgets
Shows previously hidden widgets.
Shows previously hidden mode buttons on the toolbar.
Shows previously hidden scroll buttons on the toolbar.
Shows the previously hidden standard pull down menus.
Shows properties of the current --- WIDGET file.
Data Manipulation Subroutines
Conversion Routines
Converts a field to hexadecimal characters.
Converts a hex pair of alpha characters to a decimal number.
Converts HTML text to plain APPX text
Converts a decimal number to a hex pair of alpha characters.
Splits a number into its whole and fractional parts.
Converts a text field to HTML encoding
Converts a string from one language to another.
Converts Appx raw data to Base64 data.
Converts Base64 data to Appx raw data.
Text Routines
Fills a field with a single character.
Removes characters from a text/alpha field.
Find the position of text in a text/alpha field.
Find and replace text in a text/alpha field.
Transcodes the specified text from a Unicode field to a RAW Field.
Determine the length of a text/alpha field.
Returns the name of the given Unicode character.
Inserts characters into a text/alpha field.
Convert lower case to upper case in a text/alpha field.
Parse a string into separate fields.
Returns the named Unicode character
Transcodes the RAW text to a Unicode field.
Compares 2 Unicode fields.
Convert upper case to lower case in a text/alpha field.
System Information Subroutines
Server Environment Routines
Returns the path to the location of Appx data files.
Returns the value of a command line parameter.
Populates PDF fields with configuration information.
Populates the --- ENCODINGS file.
Returns the value of an environment variable.
Returns the value of all environment variables.
Return the type of operating system Appx is running on.
Returns the name and type of the parent process.
Returns the pathname of the requested APPX data file.
Returns the directory separator character of the host operating system.
Returns the size of the Appx screen in rows and columns.
Sets the value of an environment variable (not yet implemented).
Displays the APPX license info for the current application.
Client Routines
Returns a flag to indicate if the user is running the Desktop Client.
Returns the version of the Desktop Client.
Downloads and opens a file on the user's PC.
Downloads a file to the user's PC.
Gets the current content of the system clipboard.
Returns the value of a client constant
Loads a URL, document, runs a command on the user's PC or changes a client setting.
Plays a .wav file on the user's PC.
Puts data on the system clipboard.
Uploads a file from the Client to the server.
File System Utilities Subroutines
File Manipulation Routines
These subroutines provide you with a way to manipulate files on the file system without having to check the O/S type (i.e., using 'cp' vs 'copy', or different kernel calls).
Copies a file from one location to another, creating any required directories.
Creates the specified file.
Creates an archive of the specified files, in either TAR or TGZ format.
Exports the specified File to CSV format.
Imports a CSV formatted file into the specified APPX file.
Deletes the given file from the filesystem.
Tests for the existence of the given file in the filesystem.
Extracts all the files from a previously created archive.
Creates the given directory and parent directories in the filesystem.
Moves a file or directory from one location to another, creating any required directories
Restructures the specified file.
Sets the file specifications
Splits the filename from the file extension and returns both.
Splits the filename from the path and returns both.
Stream File Routines
The stream routines provide a way to work directly with text files, or to get the standard output of a command (via pipes).
Closes a file stream and frees up the stream resources for that file.
Closes all file streams and frees up the stream resources for those files.
Opens a stream to the given file creating the file and path as needed.
Read data from the given stream.
Write data to the given stream.
Role Based Security Routines
The Role Based Security routines provide a way for you to add RBS maintenance capabilities to your applications. This can be useful if you want your users to maintain RBS but do not want to give them full System Administrator access.
Invokes the 'Security Hierarchy Maintenance' program, bypassing the System Administrator requirement (System Administration -> Role Based Security -> Security Hierarchy Maintenance).
Allows the designer to invoke ' Access Control List - Processes' for a particular parent / child pair (System Administration -> Role Based Security -> Access Control List - Processes).
Rebuilds the internal RBS cross reference file for the selected apps.
Allows the designer to update the RBS Access Control file directly.
Data API Subroutines
These subroutines are only useful when working with the
Data API in Release 5.5.0 and higher.
Use this subroutine to write a free format message to the debug log.
Use this to return results to the caller.
Use this to get the value of a parameter from the URL.
Use this to return a free format error message to the caller.
--
JeanNeron - 2013-05-28