QUIP Software Logo

QGEN keywords and directives


Data directives (files to read and write):

INTAP[n] Input data files (read)
INDATA[n] Data insert files (read)
OUTAP[n] Output data files (write)
LISTING Spec listing file name (write)
REPORT Printed report file name (write)


Run options:

RUNOPS Identifies the run options line.
CC Card ID location in inserted data.
CLEAR Clear sections of work area between records.
ID Case ID in input data.
IDIN Case ID in insert data.
INSTART Start location in work area for input data.
LENGTH Number of lines per page for printed output.
MAXERR Maximum number of cleaning/error messages allowed.
NOMATCH Turn off file mismatch messages on insert.
OUTSTART Start location in work area for output data.
RECYCLE Request additional spec pass after the last record.
SEQ Check ID sequence of input data.
TEST Limit run to spec test or limited number of cases.
WIDTH Set width of report file.
ZCOUNTER Set decimal places in listing for counters.


Keywords relating to spec compilation:

SETUP ADDRMODE Select data addressing mode.
INSERT Identifies data insert instructions.
DICT Indicates the start of a dictionary. 
TABLE Indicates the start of a lookup table.
END Indicates the end of a lookup table, dictionary or spec file.
STOPLIST Stop listing specs.
STARTLIST Resume listing specs.
STOPSPEC Stop compiling specs.
STARTSPEC [IF...] Resume compiling specs. 
#INCLUDE Include specs from another file.


QGEN instructions

Instructions take from 0 to 4 operands.
Logical instructions cause the data modification or action specified in the result field to take place.
Arithmetic and data conversion instructions place their output in the result field.
Prefixing the letter "C" to any instruction (except LOOP and NOP) makes it conditional on operand A evaluating true.

 

Logical instructions:

Code Ops Meaning
ALL None Do for all records
AND 1-4 A [and B [and C [and D]]] must be true
IF 1-4 Identical to AND
OR 1-4 A [or B [or C [or D]]] must be true
EOR 2-4 One and only one of A or B [or C [or D]] must be true


Arithmetic instructions:

Code Ops Meaning
ADD 1-4 add A[+B[+C[+D]]] and place sum in result field
DIV 2 divide A by B
MPY 2-4 multiply A*B[*C[*D]]
MPD 3 multiply A*B and divide by C
SUB 2 subtract B from A
SQ 1 square root of A


Comparison instructions (logical):

Code Ops Meaning (F=field compare/N=numeric compare)
FEQ/NEQ 2-4 A equal to B [and C [and D]]
FNE/NNE 2-4 A not equal to B [and C [and D]]
FHE/NHE 2-4 A higher than or equal to B [and C [and D]]
FHI/NHI 2-4 A higher than B [and C [and D]]
FLE/NLE 2-4 A lower than or equal to B [and C [and D]]
FLE/NLO 2-4 A lower than B [and C [and D]]
FRN/NRN 3 A is in range [B to C] inclusive
FNR/NNR 3 A is not in range [B to C] inclusive


Punch instructions (for column binary data only):

Code Ops Meaning
MP 1-4 test for more than one punch present
NEN 2-4 Bit-wise AND of A and B [and C [and D]]]
NET 2-4 Bit-wise OR of A and B [and C [and D]]]
NEX 2 Bit-wise Exclusive OR of A and B
SHI 1 save only highest punch
SLO 1 save only lowest punch
SPB 1-4 test for single punch or blank
TAL 1-4 tally (count) the number of punches


Data conversion instructions:

Code Ops Meaning
ATB 1 translate ASCII to column-binary
BTA 1 translate column-binary to ASCII
DEC 1-4 decode column-binary punches into an ASCII string of 1's and 0's
ED 1 edit a field with a mask
ATE 1 translate ASCII to EBCDIC
ETA 1 translate EBCDIC to ASCII
STR 1-4 convert column-binary punches to a string of ASCII characters


Other instructions:

Code Ops Meaning
LOOP 1-4 repeat instruction, with increments
MOV 1 copy data to another location
NOP None dummy instruction (use as place marker)
TLU 2 Table lookup
TLN 2 Table lookup (numeric)
TLR 2 Table lookup (numeric range)


QGEN actions

Actions are specified with keywords in the result field of a specification line.

 

File output actions:

DRPn Drop from output stream n (OUTAPn).
GET'prompt' Get (prompted) user input from the keyboard.
LST Print the data area specified to listing file.
PRT Print the data area specified to report file.
SAY Output text to the screen.
SELn Select file n for output.
WRT Write current record immediately to open stream(s).
?<message> Print message if condition is NOT met.


Program control actions:

BCH Branch to subroutine, loop increments are not carried.
EOJ End job after processing current record.
LNK Link to subroutine, loop increments are carried.
RET Return from a subroutine.
SKP Go to another specification line.
SKPEND Skip remaining processing for the current record.


Download a pdf version of this page.