Subroutines by Name

The following table alphabetically lists A-Shell’s most generally useful routines. Most of these routines are embedded in A-Shell, but some are written in BASIC and are provided as separate files. In the "Origin" column abbreviations are used for Alpha Accounting ("AA"), Alpha Accounting UK ("AA UK") and MicroSabio ("MS"). Most of these routines, including all of the commonly-used ones, are described in significant detail in the body of this documentation. See also Subroutines by Type. Remember to add new routines to the "ByType" list.

Routine

Origin

Function

ABOX

Unknown

Draw a box

ACCEPN

A-BASIC

Input single character with no echo

ACCEPT

A-BASIC

Input single character with echo

ACCESS

Misc

Display one-line menu, accept one-character input

AMBTOA

AM Belgium

Miscellaneous functions including timed input.

AMOS

MS

Execute AMOS command

ANYCN

AA / MS

Input "Any change?" number

ASCEBC

Unknown

ASCII-EBCDIC conversion

ASFLAG

MS

Set A-Shell runtime flags: read-only, sync-write, etc.

ASQL

MS

Provides direct access to SQL databases.

ATEAPX

MS

Transfers a file from application server to ATE client PC.

ATEGFK

MS

Retrieves a file from the PC via the ATE terminal connection.

ATSYNC

MS

Synchronize directories between server and PC. See ATSYNC.LIT.

ATHTTP

MS

A variant of HTTP.SBR, which see for details.

AUI

MS

A-Shell's GUI interface and toolkit.

AUTLOG

Soft Machines

Interface to AutoLog

B64ENC

A-Shell

Base 64 encoding (for email attachments)

BASORT

A-BASIC

Sort sequential and random data files

BITOPS

HMOpro

Bit field operations

BLOCKS

AA UK

Return number of free disk blocks

BLOFSH

MS

Implements the Blowfish encryption algorithm.

BOX1C

Debug plc

Various box drawing functions

BUTTED

Unknown

xcall butted, string removes all but 0-9 and A-Z

CCOFF

AA UK

Disable Ctrl+C interrupts

CCON

AA UK

Enable Ctrl+C interrupts

CGIUTL

A-Shell

CGI programming utilities

CHKKBD

Misc

Check keyboard; optionally input char if available: xcall chkkbd, flag (B,1) {,char (S,1)}

CHKONE

Unknown

Check keyboard to see if character is available

CHKSPL

Unknown

Checks if spooler exists; must use ALIAS =CHKSPL:PRTCHK; similar to PRTCHK

CMDR

Debug plc

Put command file in :R mode

CISAM

MS

Interface to CISAM file system

COMIO

MS

Serial port I/O under Windows

COMMON

A-BASIC

Inter-program communication; configurable

CONDEV

A-Shell

Get IP address, console device or machine name

CRC16

ERS

Calculate 16 bit CRC on block of data

CREMLX

ADGAP

Build multi-level index used by SEARCH

CRYPTO

MS

Provides a collection of cryptographic-related functions

DATES

Unknown

Many date conversions, Julian, etc.

DELCHR

A-Shell

xcall DELCHR, chrlst, string   removes all the characters that are specified in chrlst from string. See the BASIC Plus function EDIT$() for related functionality.

DERR

A-Shell

See ERRMSG

DEVCHK

AA UK

xcall DEVCHK, dev, status  checks whether an AMOS logical device is defined to A-Shell. The dev parameter should contain the name of the device (e.g. DSK0); on return the status parameter (F,6) will be set to 1 if the device exists or 0 if it does not.

DIGEST

A-Shell

Returns various cryptographic digests of strings or files.

DSKPPN

Unknown

Return disk and ppn

DSKCOM

A-Shell

Disk-based equivalent of COMMON

DSPLY

AA

Display variables with various formats

DSTOI

A-Shell

Convert separated date to Julian

DYNLIB

A-Shell

Loads, unloads, calls routines in external function libraries

EBCASC

Unknown

ASCII-EBCDIC conversion

ECHO

A-BASIC

Enter line mode. Turn on terminal echo

EFS

ERS

Encrypted file service

EMAILP

MS

Email a report

EMAILX

MS

Send email.

ERRMSG

MS

Error trap reporting routine; must alias to DERR

EVTWIN

MS

Event tracing; see Event Tracing

EZSPL.SBR

MS

Send file to printer with enhanced options

EZTYP

MS

Display file with paging, 80/132 switching

EXTRAI

Celibec

 

F2HOST

A-Shell

Convert F,6 to IEEE format

FIFO

MS

Named pipe communications under UNIX

FILL

Unknown

Variation of A-BASIC Plus FILL$() function: xcall fill, var, pattern {,length}

FILNAM

Unknown

Returns file name for the specified channel

FILOCK

AA UK

Front-end to FLOCK.SBR

FINB

Debug plc

Input 1 byte from file: xcall finb, chan, byte, status

FLOCK

A-BASIC

File/record locking control

FNDUSR

AMOS

Retrieves information about the current (or another) user from the database.

FORCE

A-Shell

Force characters into another job’s input

FTPDLX

A-Shell

FTP file transfer, standard version.

FTP2

A-Shell

FTP file transfer, modified version.

FUNKEY

MS

Display function key line message

GDIPRT

MS

Send report to AshLite client for printing

GET

AlphaSoft

Get single character from keyboard or file

GETADR

MS

Return address and size of variable

GETBYT

Unknown

Read raw bytes from a sequential file

GETDEV

AA UK

Get current device

GETDSK

AA UK

Get current device

GETJOB

AA UK

Get job name, program, ppn, job number

GETJTB

Debug plc

Get job table information

GETLOG

Unknown

Get jobname, number, and ppn; must use ALIAS =GETLOG:GETJOB)

GETMAC

MS

Get MAC (hardware) address of Ethernet controller

GETPPN

AA UK

Get current PPN

GETPRG

MS

Get current program or SBX name

GETTRM

MS

Get current terminal name: xcall gettrm, trmdef$

GETUSN

Custom

Get user login name

GETVER

MS

Get current program version

GETX

A-Shell

Get single character with function key translation

GRECNV

SSCI

Various Julian date manipulations

GTJBNO

A-Shell

xcall gtjbno, jobnam, jobno returns job number for specified job name (0 for error)

GTLANG

A-BASIC

Return current language information

HASH

A-Shell

Generate a hash code from a string of characters.

HOST2F

A-Shell

Convert IEEE 4 or 8 byte float to BASIC 6 byte

HOSTEX

A-Shell

Execute host operating system cmd as a subroutine

HTMLP

MS

View report in browser

HTTP

MS

Handle various kinds of HTTP requests

IDTIM

A-BASIC

Input date

IMAGE

A-Shell

Display images of common image file types.

INCOM

MS

Variation of COMMON

INFLD

MS

Extended Alpha Accounting input routine.

INIX

Steve Evans

Read and write to INI files.

INMEMO

MS

Memo/Jotter editing/handling routine

INPUT

UK

Identical to INFLD.

INPUTC

AA UK

Input variation used in the UK

INVUE

Foxware

Requires ALIAS=INVUE:INFLD

ISMBLD

MS

Create ISAM 1.0 file.

ISMPAR

MS

Return information from the ISAM "rock" about filespec

ISMROK

DMSI

Return information from the ISAM "rock" about currently open ISAM file

ITC

MegaSoft

Send message to another process (UNIX only)

JSON

MS

Performs various JSON-related utility functions.

JOBCMD

MS

Set command to be executed whenever at "AMOS" command level (dot prompt)

JOBDAT

inSight

Get information about your job

JOBNAM

Unknown

Equivalent to GETJOB

JOBNUM

AA UK

Return unique job number

JOBTRM

Unknown

Return jobnam, trmdef, tdvnam

JULCVT

Unknown

Julian date conversions

KDAY

AA UK

Calculate elapsed days to given date (b,2)

LAPSED

AA UK

Calculate elapsed days to given date (F,6)

LOKOUT

MS

Lock users out of A-Shell

LOG

MS

Log to a new PPN or retrieve PPN info.

LOGRIO

MS

Logical record i/o (any size records)

LSTLIN

A-Shell

Return last command line

MATCH

HMOpro

Compares a data field to a list of values or ranges

MESAG

AA

Display message on bottom line of screen

MIAMEX

A-Shell

Large library of A-Shell interface functions

MMENU

AA

Display file maintenance menu

MOUNT

AA

Display device mount message

MPSCOM

Custom

Interface to MacDonald PartSelect catalog

MSBOXX

MS

Box and window utility

MSGBOX

MS

Displays a message in a dialog box format

MSGLOG

A-BASIC

Output coded message to SYSLOG.SYS

NFIND

AA UK

Perform string search forwards or backwards

NOECHO

A-BASIC

Enter image mode. Turn off terminal echo

NOEKO

MS

Same as NOECHO

NUMCHK

MS

Checks a string for numeric only characters

OAUTH2

MS

Provides the means to obtain an OAUTH2 access token.

ODTIM

A-BASIC

Output formatted time and date

PACK

A-Shell

Pack three character string to B,2 RAD50: xcall pack, str, rad

PCKLST

HMOpro

Display a pop-up pick list.

PGMID

MS

Display screen header with program name, time, etc

PGMND

AA

Display end of program message

PLYJOB

MS

Return detailed job info about current or other job

PPNSWP

Unknown

Log to a new device:[p,pn]. Must use ALIAS= PPNSWP:SETPPN

PRINT

AA

Build formatted print file.

PRIV

AA

Dummy routine (not necessary to log to 1,2 here)

PRTCHK

AA UK

Check printer name and printer queue

PUTBYT

Unknown

Write raw bytes to a sequential file

RDATE

AA

Get system date

REGEX

MS

Regular expression processor.

RENAM

MS

Same as RENAME

RENAME

A-BASIC

Rename a file

ROUND

Custom

Round argument to nearest integer

RVCOMN

Custom

Like COMMON.SBR with one 1024 byte packet

RXPCHK

MS

Checks a string for unprintable characters

RXTERM

MS

Check input buffer for function key (Windows only)

SBRC

UK

Misc functions used by the R/W and P/G packages

SBXINP

Firmaware

INFLD wrapper that simplifies some INFLD operations.

SCGINP

Unknown

Variation of INPUT.SBR

SCRN

Willowtree

Willowtree Screen Handler

SCRSTS

MS

Scrolling status window handler

SEARCH

ADGAP

Enhanced (disk optimized) variation of SERCH

SEND

A-Shell

Send a message to another terminal

SERCH

AA

Search random data file

SETDEV

AA UK

Change current device: xcall setdev, « dsk2 »

SETJTB

Debug plc

Set job table information

SETPPN

AA UK

Change current PPN: xcall setppn,b2

SIZE

A-Shell

Returns size of specified file in bytes

SLEEP

A-BASIC

Stall processing for number of seconds

SORTIT

MegaSoft

Sort array in memory

SPOOL

A-BASIC

Send file to printer. See EZSPL.SBR.

SQUEEZ

MS

Implements the data "squeeze" algorithm used by MX_FILEHOOK.

SQL

MS

Provides access to SQL databases.

SRCH2

AA

Search random data file

STALL

AA

Stall processing for number of seconds

STENO

AA

Input starting/ending numbers

STIME

Dalcon

Return current time in formatted string

STRIP

A-BASIC

Strip trailing spaces from string

STRTOK

MS

Parse strings

SUBMIT

Custom

Launch a background task (UNIX only)

SWPSBR

Swap

Various Swap-related functions

SYS000

Misc

Like COMMON (one packet, passive read): xcall sys000, sr (b,1), packet (x,100)

TBOX

Misc

Draw box around specified SR,SC,ER,EC

TCKI

MS

Check to see if an input char is available without inputting it; xcall tcki, flag; flag (String) returns 0 if no char is available, 1 if one or more chars are available.

TCPCLI

MS

Socket communications (client interface)

TCPSRV

MS

Socket communications (server interface)

TCPX

MS

Socket communications

TIMES

MS

Returns high-precision time information

TINKEY

AlphaSoft

Check for terminal input

TMENU

AA

Display full transaction menu.

TMEN2

AA

Display partial transaction menu.

TRIM

Debug plc

Strip trailing and leading spaces from string

TRMCHR

A-BASIC

Return terminal characteristics

UNIQUE

Unknown

Generate unique temp filename

UNPACK

AA UK

Unpack RAD50 word, e.g. xcall unpack,b2,s3

USPSBS

MS

Creates an encoded bar string for the US Post Office intelligent bar codes.

USRCNT

MS

Get current user count and number of nodes licensed

USRTBL

Custom

xcall usrtbl, name, code, opcode

VUESCR

Swap

Edit a rectangular array of text

WAIT

AA

Output "Please wait...." message

WAKNO

MS

Wake up a sleeping job (UNIX only)

WHOAMI

AA UK

Get job name

WINFLG

inSight

Get inSight information about your job.

XDEFLT

MS

Insert text into the type-ahead buffer

XFOLD

HMOpro

Intelligent folding of names

XFRMMO

MS

Move or copy an INMEMO logical memo

XLOCK

A-BASIC

Shared resource control

XLSUTL

MS

Used internall by APEX, not suitable or intended for use in programs. (Do not use!)

XCALEN

MS

Enhanced calendar control.

XMOUNT

A-BASIC

Mount a device. Dummy routine.

XMPP

MS

Ennables the sending of instant messages using the XMPP protocol

XPAINT

MS

Execute an AlphaPAINT 2.0 screen display

XPPN

Unknown

Get ppn, device, job, term

XSHLEX

MS

Platform-independent "Shell Execute"

XSTRIP

MS

Perform various string manipulations

XTEXT

MS

Windows text control.

XTREE

MS

Windows tree control.