HiLMAs     Language

User's Guide and Reference - Version 1.0

by
Piero Ronchi Copyright © 2001
   
Preliminary version Last updated: Oct 2001

Please notify any errors, mismatches, omissions (or whatever you want) to ronchipiero@libero.it


Table of Contents

Overview

Part I - User Guide

I. Getting Started
1. Introduction
2. How to obtain Hilmas
3. Installation
 
II. Language basics

4. Basic Syntax
5. Program Structure
6. Program input parameters
7. Variables
8. Array definition
9. Data move and Array management
10. Numeric expressions
11. Logical expressions
12. Control Structures
12. Subroutines
13. Basic Input/Output
14. Functions
 

III. Features
15. Accessing a file
16. CICS programming
17. REXX interface
17. Full screen I/O
18. Error handling
19. Addresses and pointers
20. Recursivity
20. Mixing assembler instructions
21. Some assorted Tips

Part II - Language Reference

IV.  Introduction to language reference

Alphabetical reference table

Environment Instructions

PROGRAM Start a HILMAS program
ENDPROG End a HILMAS program
ENVIRON Change some environmental conditions

Variable assignment and array

MOVE Move data into a variable
MOVARRAY TO Move an array element to a variable
MOVARRAY FROM Move an array element from a variable
ADDR Obtain an address and put it in a pointer
VAR2PTR Use pointer to move data from variable
PTR2VAR Use pointer to move data to variable
PTR2PTR Use pointers to move data

Numeric instructions

LET Do an arithmetic computation
INC Increase an Integer number
DEC Decrease an Integer number
ABS Obtains absolute value
INT Truncate a float number
VALIDPAC Validate a packed number

Control Instructions

EXIT Leave (end) the main program
IF Test conditions and branch
ELSE  
ENDIF  
FOR Unconditional loop
NEXT  
ITERATEF Iterate FOR
LEAVEF Leave FOR
WHILE Conditional loop
ENDWHILE  
ITERATEW Iterate WHILE
LEAVEW Leave WHILE
REPEAT Conditional loop
UNTIL  
ITERATER Iterate REPEAT
LEAVER Leave REPEAT
SELECT MultiBranch selection
WHEN  
OTHERW  
ENDSEL  
BREAK Leave SELECT block
NOBREAK Test next condition in SELECT
CONTINUE Do nothing

Subroutine Handling

GOSUB Recall an Internal Subroutine
SUBDEF Define an Internal Subroutine
ENDSUB End an Internal Subroutine
SUBEXIT Exit from an Internal Subroutine
CALL Recall an External Subroutine
ROUTINE Define an External Subroutine
RETURN End an External Subroutine

String Handling

PARSE Parse a string into words
SUBSTR Get a substring
DELSTR Delete a substring
INSERT Insert a substring
OVERLAY Overlay a substring
POS Search a substring
LENGTH Get the length of a string
SEARCH Search character(s) into a string
UPPER Translate in Uppercase
COPIES Fill a string with character(s).
LTRIM Remove Left spaces
RTRIM Remove Right spaces
TEMPLATE Merge two strings using a template
TRANSLAT Translate a string using a table
SQUEEZE Remove character(s) from a string
CENTER Center words
WORD Count and get positions of words
BITAND Bitwise AND between variables
BITOR Bitwise OR between variables
BITXOR Bitwise XOR between variables

Conversion instructions

NUM2EDIT Convert a number into a string
EDIT2NUM Convert a string into a number
VAR2HEX Convert in Hexadecimal
HEX2VAR Convert from Hexadecimal
INT2PAC Convert an integer into a packed
INT2ZON Convert an integer into a zoned
INT2FLO Convert an integer into a float
FLO2INT Convert a float into an integer
FLO2EDIT Convert a float into a string
PAC2INT Convert a packed into an integer
ZON2PAC Convert a zoned into a packed
ZON2INT Convert a zoned into an integer
INT2BYTE Convert an integer into a byte (a character)
BYTE2INT Convert a byte (a single character) into an integer
HALF2INT Convert a two-bytes integer in a four-bytes integer
INT2HALF Convert a four-bytes integer in a two-bytes integer

Input/Output instructions

SAY Strings or numbers output to Standard Output
INPUT Strings input from Standard Input
FOPEN File Open
FCLOSE File Close
FREAD Read a record from a file
FWRITE Write a record into a file
FDELETE Delete a record (VSAM only)
FREWRITE Rewrite a record (VSAM only)
FSTARTBR Start a Dynamic access to a file (Start Browse)
FENDBR End Dynamic access
FSTATE Obtain file characteristics
FERASE Erase a file (VM/CMS only)

Screen Handling (CMS, CICS and TSO only)

CLEAR Clear screen
BUILDMAP OUT Dynamically build a 3270 data stream
BUILDMAP IN Dynamically decode a 3270 data stream
BUILDMAP ALTER Dynamically alter a 3270 data stream
CONVERSE Input / Output of a full screen map prepared by BUILDMAP

Miscellaneous Instructions

RANDOM Obtains a random number
RANDSEED Randomize the seed for random numbers
TIMEDATE Obtains system time and date
CONVDATE Date conversion
SLEEP Wait for a number of seconds
MEMALLOC Dynamically allocate memory
MEMFREE Free dynamically allocated memory
VAR2REXX Put a Hilmas variable into a REXX variable
REXX2VAR Put a REXX variable into a Hilmas variable
STACK Put data into user stack (TSO and VM/CMS only)


V. Appendixes

A. Hilmas System Variables
B. Installation & Compilation in MVS/TSO environment
C. Installation & Compilation in VM/CMS environment
D. Installation & Compilation in MVS CICS environment
E. Installation in VSE environment
F. Assembler addressing in Hilmas


    Next
    Overview