You are here: APPX Wiki>APPX Web>FullAPIList (03 Dec 2026, AdminUser)Edit Attach

APPX Runtime Subroutine API

Find a subroutine to call from APPX ILF. Open its reference for parameter order, shared fields, and a usage example.

Application phases and database

Back to finder
.BEGIN INITIAL SET UP
Switch the current application to its Initial Setup phase.
.BEGIN LIVE OPERATIONS
Switch the current application to its Live Operations phase.
.BEGIN RECOVERY
Switch the current application to its Recovery Processing phase.
.SELECT DATABASE
Switch the session to the specified APPX database.

Client and desktop

Back to finder
.CLIENT CHECK FOR GUI
Check for a GUI client and distinguish the Desktop Client from the HTML Client.
.CLIENT CHECK VERSION
Return the Desktop Client version as text or as a number.
.CLIENT DISPLAY FILE
Open a server file in the desktop’s default application or in a new HTML Client browser tab.
.CLIENT DOWNLOAD FILE
Download a file from the APPX server to the user’s computer.
.CLIENT GET CLIPBOARD
Read text from the user’s clipboard.
.CLIENT GET CONSTANT
Look up a named client constant, such as an operating system or preference setting.
.CLIENT LOAD URL
Open a URL or document, run a local command, or change a client setting.
.CLIENT PLAY SOUND
Play a WAV file accessible to the user’s computer.
.CLIENT SET CLIPBOARD
Copy text to the user’s clipboard.
.CLIENT UPLOAD FILE
Upload a file from the user’s computer to the APPX server.

Conversion and encoding

Back to finder
.CONVERT BYTES TO HEX
Convert the bytes of a field into a string of hexadecimal digits.
.CONVERT FROM BASE64
Decode Base64 text into APPX raw data.
.CONVERT HEX PR TO NUM
Convert a two-digit hexadecimal value from 00 through FF to a decimal number.
.CONVERT HTML TO TEXT
Strip HTML tags and decode entities to produce plain APPX text.
.CONVERT NUM TO HEX PR
Convert an integer from 0 through 255 to two hexadecimal digits.
.CONVERT SPLIT NUMBER
Separate a number into its whole and fractional parts.
.CONVERT TEXT TO HTML
Encode APPX text as HTML, preserving line breaks and special characters.
.CONVERT TO BASE64
Encode APPX raw data as Base64 text.
.CONVERT TRANSLATE
Look up a translation using the application and system dictionaries.

Data API for web requests

Back to finder

Use these routines inside a handler for the APPX Data API (release 5.5.0 and later).

.DATA BAD REQUEST
Return a JSON error message to the Data API caller, defaulting to “Invalid Request”.
.DATA DEBUG LOG
Write a timestamped entry to the Data API log configured in APPX_DATASVC_LOG.
.DATA GET PARAM VALUE
Read a named request parameter with a selectable lookup order across GET, POST, and URL values.
.DATA WRITE STREAM
Send --- STREAM BUFFER to the Data API caller as UTF-8 and clear the buffer.

Files and directories

Back to finder
.FILE COPY
Copy a file and create any missing destination directories.
.FILE CREATE
Create an APPX data file defined in the data dictionary, as in Data File Management.
.FILE CREATE ARCHIVE
Package files into a TAR or compressed TGZ archive.
.FILE CSV EXPORT
Export records from an APPX file to a CSV file.
.FILE CSV IMPORT
Import records from a CSV file into an APPX data file.
.FILE DELETE
Delete a single file at the specified path.
.FILE EXISTS
Check whether a file exists and can be opened for reading.
.FILE EXTRACT ARCHIVE
Extract files from a TAR or TGZ archive.
.FILE MAKE DIR
Create a directory and any missing parent directories.
.FILE MOVE
Move or rename a file or directory and create any missing destination directories.
.FILE RESTRUCT
Restructure an APPX data file as in Data File Management.
.FILE SET SPECS
Set or change file management specifications for an APPX data file.
.FILE SPLIT FILENAME
Separate a file name from its extension.
.FILE SPLIT PATHNAME
Separate a full path into its directory and file name.

Available from APPX 6.2.0. Choose the parser that matches where your JSON is stored.

.JSON PARSE
Parse a JSON string into APPX records, choosing the result file by value size.
.JSON PARSE FILE
Parse a JSON file into APPX records, choosing the result file by value size.

Role-based security

Back to finder

Available from 5.4.7 on the APPX 5 line and 6.0.1 on the APPX 6 line.

.RBS HIERARCHY MTCE
Open Security Hierarchy Maintenance from an application to delegate hierarchy editing.
.RBS PROCESS SECURITY
Open access control list maintenance for an existing parent/child process pair.
.RBS REGEN
Rebuild the role-based security cross-reference for a changed application version.
.RBS UPDATE SECACL
Add, change, or delete access control records directly in SECACL.

Server environment

Back to finder
.ENV GET APPXPATH
Return the server directory where APPX stores its data files.
.ENV GET CMD LINE PARM
Read a named argument from the command line that started the APPX session.
.ENV GET CONFIG INFO
Fill predefined fields with engine and host details, including the APPX version and host name.
.ENV GET ENCODINGS
List the character encodings known to the APPX engine.
.ENV GET ENV (ALL)
Populate the APPX ENV file with the session’s environment variables.
.ENV GET ENV VARIABLE
Return the value of a named environment variable.
.ENV GET OS TYPE
Identify the operating system running the APPX engine.
.ENV GET PARENT PROC
Return the parent process name, process type and application ID.
.ENV GET PATH NAME
Resolve a permanent, disk-based APPX file name to its server path.
.ENV GET PATH SEP
Return the host operating system’s directory separator character.
.ENV GET SCREEN SIZE
Return the current APPX screen dimensions in rows and columns.
.ENV SET ENV VARIABLE
Listed in the reference as unimplemented.
.ENV VIEW LICENSE INFO
Display the current application’s license in the Desktop Client and allow the user to accept it.
.STREAM CLOSE
Close a named stream and release its resources.
.STREAM CLOSE ALL
Close all open streams.
.STREAM OPEN
Open a named stream for a file, a URL, or the output of an operating system command.
.STREAM READ
Read data from an open stream into a shared buffer.
.STREAM WRITE
Write a buffer to a stream opened for writing or appending.

Text and Unicode

Back to finder
.TEXT CREATE PAD
Fill a field with a repeating character up to the requested length.
.TEXT CUT AT POS
Remove characters at a given position and optionally return the removed text.
.TEXT FIND
Return the position of a case-sensitive match within a field.
.TEXT FIND AND REPLACE
Replace or removes matching text, optionally limiting how many matches to change.
.TEXT FROM UNICODE
Encode Unicode text into a RAW alpha field using the specified character encoding.
.TEXT GET LENGTH
Return the length of the text stored in a field.
.TEXT GET UNINAME
Return the Unicode name of the first character in a string.
.TEXT INSERT AT POS
Insert text at a specified character position in a field.
.TEXT LOWER TO UPPER
Convert text to uppercase or capitalize the first letter of selected words.
.TEXT PARSE LINE
Split a delimited line into fields, using a tab as the default delimiter.
.TEXT SET UNINAME
Look up a Unicode character by its name.
.TEXT TO UNICODE
Decode a RAW alpha field into Unicode using the source character encoding.
.TEXT UNICODE COMP
Compare two Unicode strings without regard to case and return their sort order.
.TEXT UPPER TO LOWER
Convert text to lowercase, with options for preserving initial capitals.
.UTIL ADD HOOK
Add a permanent process hook that takes effect at the next login.
.UTIL ADD USER
Create an APPX user from a 0SA USER record.
.UTIL CHECK RBS
Check a user's role-based access to a parent/child process pair, record, or field.
.UTIL CHECK SECURITY
Check a user's security code for a database and operational phase in applications using security classes.
.UTIL CHG AUX PASS
Change or clear the auxiliary password for an APPX user.
.UTIL CHG HOOK
Update selected fields on a permanent process hook for subsequent logins.
.UTIL CHG USER
Update selected fields on an existing APPX user record.
.UTIL CLEAR PASS LIST
Discard pending PASS values before they reach the next subroutine.
.UTIL COMPILE PROC
Compile one process, all processes of a given type, or an entire application version.
.UTIL COMPUTE HASH
Compute a string's SHA-2 hash and return it as binary data or hexadecimal text.
.UTIL DEL HOOK
Remove a permanent process hook for subsequent logins.
.UTIL DEL USER
Delete an APPX user and optionally remove the user's keymap.
.UTIL EMAIL
Send email with optional attachments through the server's configured mail command.
.UTIL FIELD GET
Read a field occurrence by application and field name and return its value as text.
.UTIL FIELD SET
Set a field occurrence by application and field name using a value supplied as text.
.UTIL GET EM NAME
Look up the eight-character executable module filename for a process.
.UTIL GET HOOK RECORDS
Copy active engine hooks into the temporary --- HOOK file for editing.
.UTIL GET MESSAGES
Collect errors, warnings, and messages in --- MESSAGES so the caller can read them.
.UTIL KILL SESSION
Request cancellation of a process by its numeric process ID, subject to user permissions.
.UTIL LOAD STACK FILE
Populate --- STACK with one record for each process in the current process family.
.UTIL MAKE DYNAMIC KEY
Listed in the reference as unimplemented.
.UTIL MARK REWIND
Return to a labeled process and close the intervening processes.
.UTIL MARK SET
Assign a label to the current process so .UTIL MARK REWIND can return to it.
.UTIL MOD SCROLL BEHAV
Enable click or Enter to select a record from a scrolling input image's Option Intercept event point.
.UTIL PROCESS DD
Process the data dictionary for one file or a whole application version, optionally including work fields.
.UTIL PROCESS QRY REC
Add the current PCF record to the query pointer file from Establish PCF Range.
.UTIL PUT HOOK RECORDS
Activate the edited hooks in --- HOOK for the rest of the user's session.
.UTIL SECR REST
Restore archived security codes for the selected applications and versions.
.UTIL SECR SAVE
Archive security codes for the selected applications and versions, replacing the previous archive data.
.UTIL SLEEP
Pause the calling process for a specified number of seconds.
.UTIL SLEEP WITH TIMER
Pause for a specified number of seconds and display a countdown when a positive refresh interval is supplied.
.UTIL SUBR CLOSE
Close and compile the subroutine opened with .UTIL SUBR CREATE.
.UTIL SUBR CREATE
Create a named subroutine in an application version so ILF statements can be added.
.UTIL SUBR DELETE
Delete a named subroutine from the selected application version.
.UTIL SUBR WRITE ILF
Append one ILF statement to the subroutine opened with .UTIL SUBR CREATE.
.UTIL SWITCH USER
Switch subsequent processes to another APPX user using that user's login ID and auxiliary password.
.UTIL TIMEOUT EXIT
End the current process or log out the user when a previously set keyboard timeout expires.
.UTIL TIMEOUT SET
Set the inactivity interval in seconds that raises the TIMEOUT option.
.UTIL UPDATE DOCUMENT
Update or clear user or technical documentation for an application, domain, record, field, or process.

Web forms and CGI

Back to finder
.IMPORT CGI DATA
Read CGI form data from standard input into matching APPX fields in a session started by a web server.

Widgets and themes

Back to finder
.WIDGET APPLY THEME
Apply widget styles defined in a theme menu to the current image.
.WIDGET CNV CLR TO RGB
Convert a hexadecimal color, including optional transparency, into numeric WIDGET color components.
.WIDGET CNV RGB TO CLR
Convert numeric WIDGET color components to a hexadecimal color string.
.WIDGET COUNT ROWS
Count the rows the user selected in a named table widget.
.WIDGET DEL BY NAME
Delete the WIDGET records for a single widget or a range of widget names.
.WIDGET DEL MODE BTN
Remove the toolbar's mode button records for the current display.
.WIDGET DEL SCROLL BTN
Remove the toolbar's scroll button records for the current display.
.WIDGET DEL STD MENUS
Remove the File, Options, and Help menu records for the current display.
.WIDGET HIDE BY NAME
Hide one widget or a range of named widgets while keeping their WIDGET records.
.WIDGET HIDE MODE BTN
Hide the toolbar's mode buttons during pre-display.
.WIDGET HIDE SCROL BTN
Hide the toolbar's scroll buttons during pre-display.
.WIDGET HIDE STD MENUS
Hide the standard pull-down menus during pre-display.
.WIDGET MISSING THEME
Find input and menu processes that omit the call to .WIDGET APPLY THEME in their pre-display logic.
.WIDGET RELOAD DATASRC
Mark one or more named table widgets to reload their data the next time they execute.
.WIDGET SET FROM MWDGT
Replace the current --- WIDGET records with the copy previously saved in memory.
.WIDGET SET INTO MWDGT
Save the current --- WIDGET records in memory so another image can use them.
.WIDGET SET THEME
Select a theme by name or clear the current theme.
.WIDGET SET TOOLTIP
Set or clear the tooltip text for one widget or a range of named widgets.
.WIDGET SHOW BY NAME
Show previously hidden widgets by name or name range.
.WIDGET SHOW MODE BTN
Show toolbar mode buttons previously hidden with .WIDGET HIDE MODE BTN.
.WIDGET SHOW SCROL BTN
Show toolbar scroll buttons previously hidden with .WIDGET HIDE SCROL BTN.
.WIDGET SHOW STD MENUS
Show the standard pull-down menus after they have been hidden.
.WIDGET VIEW RUNTIME
Inspect the current image's WIDGET records to debug runtime widget properties.

Import and purge belong to application 0DX. The XML Writer routines in --- create XML files and are available from APPX 6.2.0.

.XML IMPORT
Read an XML file into 0DX work files and optionally import it using a mapping.
.XML PURGE
Remove the 0DX work records for one XML import session.
.XML WRITER ADD ATTR
Add an attribute name and value to the current XML element.
.XML WRITER ADD DATA
Write data into the current XML element or CDATA section.
.XML WRITER CDAT END
Close the current CDATA section.
.XML WRITER CDAT START
Start a CDATA section for text that should be written literally.
.XML WRITER CLOSE
Close the XML output file and release the writer’s resources.
.XML WRITER ELEM END
Write the closing tag for the most recently opened XML element.
.XML WRITER ELEM START
Write the opening tag for a named XML element.
.XML WRITER OPEN
Create an XML file on the server and write its declaration, replacing any existing file at that path.

How to call a routine

Start with the Usage example on the routine’s page. Issue each PASS in the order shown. Use SHARE? Y for a field the routine fills in. Omitting a required parameter can cause a CANCEL.

Example call for .FILE EXISTS

.FILE EXISTS takes two fields. Pass the result field first and the path second, then call the routine in application ---.

      PASS         <exists?>           FIELD           SHARE? Y
      PASS         <pathname>          FIELD           SHARE? N
      GOSUB    --- .FILE EXISTS
      IF       --- .FILE EXISTS        NE

The IF tests the routine’s status field for a nonblank error code. Read the status immediately after the call because the detached work field retains its value. The shared result is Y if APPX can open the file for reading. Both a missing file and insufficient read permission give N.

Check the invocation shown for each routine. For example, .XML IMPORT and .XML PURGE require you to initialize the corresponding 0DX status field, then call the subroutine with SUBR and DETACHED.

The first runtime API routines shipped in APPX 5.1. Check the individual reference for release-specific options.

Topic revision: r35 - 03 Dec 2026, AdminUser - This page was cached on 03 Dec 2026 - 19:31.

Powered by Foswiki. Wiki content belongs to its contributing authors.