Logo
Dnote

OpalCompiler Notes

Jun 2022 620.01 MORE FLEX RESERVED WORDS

Flex commands should not be pased by the opal compiler. When compiling a Flex Do file the commands in DO,SECURE,SECURITY, MAINT,LC will no longer generate syntax errors. Note that the syntax of any flex command will not be checked until the Do file is run.

Apr 2017 590.01 FIx release level

Cosmetic change

Jun 2013 560.01 Allow hyphens in Supervisor Opal Ids

Allow hyphens in Supervisor Opal Ids

Nov 2011 540.07 Add CToptions parameter for RULE_COMPILER

Ths change fixes a bug introduced in FLex Library version 540.29 which stopped a compile of Flex rules from working.

Sep 2011 540.06 Increased DEFINE size limit checking

SYSTEM/OPAL now recognises the updated Opal source+code limit of 255 segments to 2184 segments for any SUPERVISOR DEFINE, as described by SUPERVISOR DNote 541.74.

Jul 2011 540.05 Fix processor loop with FLEX DO and rules fi

The change described by DNote 540.04 could have caused SYSTEM/OPAL to enter a processor loop when compiling a Flex DO file or Rules batch file. This problem is now fixed.

Apr 2011 540.04 Correct DEFINE patching issues with '\'

Previously, SYSTEM/OPAL was not always detecting the presence of the termination character,'\', for a SUPERVSOR DEFINE when the lines was provided by a patch instead of the source. At compile time, using EDITOR or Programmer's WorkBench, the '\' character was erroneously passed to the OPAL compiler as source text causing the compile to fail. SYSTEM/OPAL now better checks for '\' in both source and patch.

SYSTEM/OPAL will now handle SUPERVISOR ENTER files that have DEFINE - commands to delete SITUATIONs, ODTSEQUENCES etc. Previously, DEFINE - ODTS commands would be compiled unconditionally and DEFINE - SITU would fail with syntax. Now SYSTEM/OPAL will recognise these commands, check that they are valid and skip any further processing.

c w opal
#COMPILING 47347
** Deleting ODTS X **
** Compiling ODTS X **
Compiled Ok.. 1 lines, 23 bytes code, 1 sectors
** Deleting ODTS MSG_SUPPRESS **
** Compiling ODTS X2 **
Compiled Ok.. 3 lines, 72 bytes code, 3 sectors
4 DEFINE(S) processed,  0 DEFINE(S) failed,  0 Error(s) found
#ET=0.1 PT=0.0 IO=0.0

Jul 2010 540.03 Change for BINDLIB resequence

Internal change only.

May 2010 540.02 Reorg step_dir includes

Internal change only

Jan 2010 540.01 Fix empty line DO file effects

If an empty line preceded a new SELECT or REPORT command in a FLEX DO file, the compiler would invariably fail the script with syntax errors. This problem is now fixed.

Sep 2009 530.10 More detail on big Opal warning

If the combined size of Source and Code for a compiled define is greater than 255 segments, the warning issued will now report the size of the source and the code.

Aug 2009 530.09 Stop MEMOS from flagging a failed compile

If the first define in a file passed to SYSTEM/OPALS was as MEMO then even if all other defines compiled the compiler would report that the compile failed, although no errors were listed. This minor problem has been corrected

Feb 2009 530.08 Support for REP DO in flex do files

Allow for REP DO and BACKUP commands in Flex DO files.

Sep 2008 530.07 Handle empty context and high card sequence

Previously, the compiler would have faulted with a SEG ARRAY ERROR @ 302941000 if the context specified in a DEFINE was empty i.e.'()'. Further, using a CARD patch input file with sequence numbers less than 10000000 caused SYSTEM/OPAL to loop indefinitely or fault with an MEMORY REQUEST GREATER THAN 65535 WORDS error. Both these problems have been fixed.

Jul 2008 530.06 FLEX compile summaries

Similar to SUPERVISOR DEFINEs, SYSTEM/OPAL compiles of FLEX REPORTS and SELECTS will now provide summary information after each compilation, showing number of lines processed and length of generated code.

Jul 2008 530.05 Changes for OPAL resequence

Internal Metalogic change.

May 2008 530.04 Permit free-format FLEX DO files

The OPAL compiler will now better handle free-format REPORT commands especially where REPORT block BEGIN..END is used. Previously, the BEGIN keyword had to be present on the same line as the REP directive.

Feb 2008 530.03 Support for AFTER context

This change supports a new SUPERVISOR context called AFTER; please see SUPERVISOR DNote 530.22 for more information.

Jan 2008 530.02 Support for WHEN context

This change supports the new SUPERVISOR context called WHEN; please see SUPERVISOR DNote 530.13 for more information.

Dec 2007 530.01 Support for additional SUPERVISOR contexts

This changes supports the increase in the maximum number of OPAL contexts supported by SUPERVISOR. Please see SUPERVISOR DNote 530.02 for more information.

Dec 2007 520.05 Internal change

Use Include/Meta

Jun 2007 520.04 Support for DO files without continuation character

SYSTEM/OPAL now supports the compilation of Flex DO files without the use of the '\' continuation character for multi-line SELECT and REPORT scripts. Please see FLEX DNote 520.10 for more information.

May 2007 520.03 Fix syntax error for SEL- card

Compiling FLEX DO files will now not give a syntax error when a SEL- card is encountered.

May 2007 520.02 Support for WRITE method

This change supports the new WRITE method for OPAL string variables as described in OPAL DNote 520.64. Please refer to this note for more details.

May 2007 520.01 Compile PD Context

Slight source mods to compile SYSTEM/OPAL after OPAL patches.

Nov 2006 510.09 support for http context

This change adds support for the new HTTP context

Aug 2006 510.08 Fix for Define *

Version 510.07 broke the parsing of DEFINE - all Flex parsing and many other Supervisor commands. This change fixes these problems.

Aug 2006 510.07 Support for new DEFINE *

This change allows the new DEFINE * syntax to be used.

Jul 2006 510.06 Internal change

Metalogic internal change.

Feb 2006 510.05 Support REPORT blocks

The SYSTEM/OPAL compiler will now recognise the new REPORT BEGIN code block implementation discussed in detail in FLEX DNote 510.16.

Dec 2005 510.04 Stricter usage of auto-ENTER of OPAL defines

The implementation described in Dnote 510.02 for the auto-ENTER of OPAL DEFINES has been made more restrictive. Previously, file-equation of the CODE file to a title other than CANDE/CODEnnnn was sufficient for SYSTEM/OPAL to compile DEFINES into the SCHEDULE; this is now not the case and either of the following conditions must also be valid:

1. The task attribute TARGET is set to 255 2. The file CODE has a title that starts with the string AUTO/ENTER (the compiler will skip the usercode when checking)

For example, from CANDE:

COMP;PL TARGET=255 COMP AS $AUTO/ENTER

Sep 2005 510.03 DEFINE + COMMAND handling

SYSTEM/OPAL will now recognise and compile DEFINES whose program type is COMMAND or COM. For more information on COMMAND programs, please refer to SUPERVISOR DNote 510.40.

Sep 2005 510.02 Automatic DEFINEs update into SCHEDULE

The standalone OPAL compiler will now permit the automatic compilation of all SUPERVISOR defines in a source file directly into the SCHEDULE file. This is implemented by calling an external procedure in SUPERVISOR which now freezes as a BYTITLE library. Previously, after editing and test compilation, the source file would have to be manually ENTERed from a SUPERVISOR window, MARC or ODT.

To auto-enter DEFINES into the SCHEDULE, the compiler must be executed with the title of its CODE file set to values other than "CODE." or "CANDE/CODEnnnn.". From CANDE, this would be achieved by:

C W OPAL AS $T #COMPILING 17647 #? ** Compiling ODTS FI ** Compiled Ok.. 15 lines, 1383 bytes code, 15 sectors -- Entering DEFINES into live SCHEDULE -- SCHEDULE AMENDED, 17 RECORDS PROCESSED, 1 COMMANDS HANDLED 1 DEFINE FOUND, 1 DEFINE COMPILED OK #ET=0.7 PT=0.1 IO=0.

By specifying the object file using 'AS $T' and after a successful compile, the SYSTEM/OPAL compiler will initiate an ENTER command to compile the DEFINES in the source file into the live SCHEDULE file.

Only users that are marked as privileged (PU) or SYSTEMUSER may perform the ENTER from an OPAL compile.

Mar 2005 510.01 ELIMINATE LOWER CASE SWITCH

Minor compatibility change supporting the deimplementation of the SUPERVISOR LOCASE option, as described in SUPERVISOR DNote 510.16.

Dec 2004 500.06 FIX COMMENT HANDLING IN FLEX DO FILES

Previously, for multi-line SELECT or REPORT scripts in FLEX DO files, any commented text following OPAL source but prior to the '\' line terminator would cause unexpected syntax errors in the SELECT or REPORT. This problem is now fixed.

Nov 2004 500.05 FIX PROCESSOR LOOP FOR DEFINE FROM FILETITLE

The change implemented in DNote 500.04, under certain conditions, could have caused SYSTEM/OPAL to enter a tight processor loop after encountering a SUPERVISOR 'DEFINE + ... FROM <FILETITLE>' entry in an ENTER file. This problem has been fixed. Note that DEFINE...FROM <FILETITLE> constructs are still ignored by the OPAL compiler.

Nov 2004 500.04 ALLOW FLEX DO FILE COMPILATIONS

This change now allows SYSTEM/OPAL to compile standalone FLEX DO scripts without having to run FLEX Inquiry. This means that the SYSTEM/OPAL compiler can now syntax check all forms of Metalogic OPAL scripts (SUPERVISOR ENTER files, FLEX rules and DO files) from one environment.

SYSTEM/OPAL recognises keywords, such as REP, REPORT, SEL and SELECT, allowing the script to syntax-checked without the need to run through FLEX. Other FLEX commands such as WFL, FILES, USAGE etc are NOT syntaxed.

If a DO file uses a PARAMETERS function, then it is possible to optionally assign default values to each variable:

PARAMETERS(FAM=A,MAXDAYS=10,MAXSEGS)

These assigned values will then be used in the compiled script to replace individual parameters. If no default is provided, SYSTEM/OPAL considers the parameter as numeric. Note that, in the current implementation, all default values must be shorter in length than the original parameter name to avoid complex substitution issues.

NEXT+ ....*....1....*....2....*....3....*....4....*....5....*....6..
00000001PARAMETER(DIR,SELECT=TRUE)
00000010WFL REMOVE LST,CDI/JOB
00000100REPORT TITLE,",",ROWSIZE,",",SEGMENTS,",",DFHHDRLENGTH
00000120SEL #SELECT#
00000200FILES #DIR#:FL,F LST
00000300REPORT HEAD "BEGIN JOB CDITEST;COPY "
00000400REPORT FOOT " NOFILE TO CDIMAGE(CD,HOSTNAME=LOCAL);END JOB"
00000500REPORT TITLE,","
00000600FILE #DIR#:FL,F CDI/JOB
00000700WFL START CDI/JOB
00000800QUIT
C W OPAL
#UPDATING
#COMPILING 40203
** Compiling REPORT **
Ok..
** Compiling SELECT **
Ok..
** Compiling REPORT HEAD **
Ok..
** Compiling REPORT FOOT **
Ok..
** Compiling REPORT **
Ok..
#ET=0.6 PT=0.3 IO=0.1

The $SET LIST compiler directive can be used to obtain printed compile listings, as if OP+SETL was input. It is not currently possible to use ' FROM <filename' with SELECT or REPORT.

Aug 2004 500.03 IMPLEMENT FLEX RULE COMPILE TESTING

SYSTEM/OPAL may now be used to compile source files containing FLEX rules used by the FAMILYMANAGER utility. As with DEFINE in ENTER files, the stand-alone compiler searches for the keywords ZAP, RELEASE, RIP etc. to signify the start of a rule definition. This allows new FLEX rules to be checked for syntax from a non-rules usercode without requiring a RULES ENTER command.

For a rule to compile successfully, the same conditions employed by FLEX Inquiry apply i.e. there must be a message description enclosed in quotes after the rule type (this is handled as an OPAL string and is compiled), followed by a colon. The rule expression may appear on the same line. The expression MUST terminate with a semi-colon or the OPAL compiler will give a syntax error. Note

NEXT+ ....*....1....*....2....*....3....*....4....*....5....*...
00000100FORGET "XREFFILES" :"XREFFILES" ISIN TITLE;
00000200FORGET "CANDE & MAIL recovery files":
00000300 ( FILEID(TITLE,1)="CANDE" AND
00000400 FILEID(TITLE,2) HDIS {"RECV","TEXT","CODE"}) OR
00000500 ( FILEID(TITLE,1)="MAIL" AND
00000600 FILEID(TITLE,2)="RECOVERY");
COMP W OPAL
#COMPILING 54981
** Compiling FORGET Rule "XREFFILES" **
Compiled Ok.. 1 lines, 29 bytes code, 1 sectors
** Compiling FORGET Rule "CANDE & MAIL recovery files" **
Compiled Ok.. 4 lines, 120 bytes code, 4 sectors
2 RULE(S) processed, 0 RULE(S) failed, 0 Errors found, 0 Warnings
#ET=0.2 PT=0.1 IO=0.0

The dollar options LIST and CODE will generate source and code listings similar to compilation of ENTER files.

Jul 2004 500.02 SUPPORT FOR VL CONTEXT

The VL context is now supported by SYSTEM/OPAL; this also includes any usage within the COUNT and OBJECTS functions.

Jun 2004 500.01 SUPPORT FOR JOBQUEUE CONTEXT

The JOBQUEUE (or SQ) context is now supported by SYSTE/OPAL; this also includes any usage within the OBJECTS and COUNT functions.

Dec 2003 490.03 USE MCP FILERECFORMAT

SYSTEM/OPAL now uses the MCP FILERECFORMAT entrypoint for file-handling functions instead of an older, internal mechanism.

Nov 2003 490.02 CHECK DEFINE NAME LEQ 17 CHARACTERS

SYSTEM/OPAL will now syntax any DEFINE name that is longer than 17 characters. Also, the logging of DEFINE heading errors will now appear in the ERRORS listing generated by the compile. Some minor formatting changes have also been made.

Oct 2003 490.01 UPDATE VERSION FOR MCP 49.1
Internal Metalogic change to update version for MCP 49.1.

Jun 2003 480.04 CHECK RECORDER MNEMONICS
SYSTEM/OPAL will now verify all mnemonic used in RECORD statements against the 'live' list maintained by the TT REC command. Previously, mnemonic checking was not performed.

Oct 2002 480.03 REINSTATE AND IMPROVE EDITOR DOLLAR HANDLING
The change discussed in Dnote 480.02 had the unfortunate side-effect of causing patched OPAL sources compilation using EDITOR to fail, usually ignoring $SET/POP VOIDT cards completely. This feature has been restored and improved.

Oct 2002 480.02 RESTRICT DOLLAR HANDLING
This changes restricts the usage of $ options such as STRICT and ERRORLIMIT prior to an DEFINE heading i.e. they should not be used inside a DEFINE body.

Mar 2002 480.01 CHANGE VERSION TO 48
Internal Metalogic changes to update version number for MPC 48.1

Sep 2001 470.02 IMPLEMENT 'STRICT' OPTION FOR ODTS COMPILES
This note should be read in conjunction with Supervisor Dnote 480.02. This change implements the Opal modifications required to support the Supervisor STRICTODTS option. In addition some enhancements have been made to the Stand Alone Opal Compiler - SYSTEM/OPAL as follows:-

The compiler will now recognise and action the 'STRICT' option if it is set in the heading line of an ODTSEQUENCE. This option will cause the compiler to treat the use of isolated Strings or String Expressions used as Statements as a syntax error. A typical heading line to set the options 'LIST' and 'STRICT' might be:-

   TT DEFINE + ODTSEQUENCE MYTESTODTS SET LIST STRICT: 
If the STRICT option is not specified the compiler will output a Warning if an isolated String or String Expression used as a Statement is encountered.

The compiler will now continue after encountering an error until the entire input file is processed or a pre-defined Error limit is reached. It will also produce a closing summary of the number of Opals compiled the number of Errors encountered and the number of Warnings issued. In addition an ERRLIST file will be generated containing the Errors and Warnings produced.

The compiler will now accept a '$' (Dollar) card image as the first line of the input file. This option card image allows the User to specify a 'global' STRICT option that will be applied to all ODTSEQUENCE Opals compiled from the file together with an overall Error Limit after which the compilation will be terminated. A typical option card might be:-

   $ SET STRICT ERRORLIMIT 30 
If STRICT is not specified only those ODTSEQUENCE Opals where STRICT is specified as an option on the Header line will be subjected to the new STRICT String rules, any others will merely generate Warnings if an 'Unsafe' construct is encountered. If no ERRORLIMIT is set the compilations will continue until the end of file is reached regardless of the overall Error count.

The compiler will now provide printer backup listings for errors and warnings encountered the compile of the ENTER file. OPAL also provides a summary report to the originating station indicating the number of successful and failed compiles.

Apr 2001 470.01 FIX SYSTEM/OPAL RECORD MNEMONIC PARSING
Previously SYSTEM/OPAL, the stand alone OPAL compiler, would generate a syntax error when attempting to parse a RECORD mnemonic eg.
   RECORD [TEST] ("Test Message") 
The compiler will now generate a warning message in these circumstances to indicate that the mnemonic was recognised but was not validated.

When OPAL is invoked to compile code being entered via SUPERVISOR any RECORD mnemonic will be validated against the REC_FILEMAP in the usual way.

Sep 2000 460.05 USER OBJ WHEN CHANGES
This change supports the implementation of the new SUPERVISOR context called USER, as discussed in SUPERVISOR Dnote 460.28.

Apr 2000 460.03 ADVISE OF ENTER REF WHEN TOO BIG
Extending the 255 sector limit check discussed in Dnote 460.01, the OPAL compiler will now suggest that an ENTER REFER should be used for very large DEFINES. This is a SUPERVISOR command that allows the DEFINE source to be kept in an external file.

The message appears as a warning:

    WARNING:Code + Source size > 255 sectors!!
WARNING:You need to use ENTER REF to enter
Oct 1999 460.02 LOCASE ERRORS & UPDATE INCLUDES
DEFINES that are presented to SYSTEM/OPAL in lower-case are now correctly handled. This change also supports SUPERVISOR enhancements for larger terminal screen sizes.

Sep 1999 460.01 HANDLE CHAR REC FORMATS AND CORRECT DEFINE
SYSTEM/OPAL will now correctly handle ENTER files with a character-based format i.e. FRAMESIZE=8 as well as FRAMESIZE=48.

Also, the summary message ld displayed for each compiled DEFINE will now show the number of sectors required for storage in the SCHEDULE file. If this value exceeds 255 sectors, SYSTEM/OPAL will give an error:

   Program size greater than 255 sectors!!

This error occurs because this is the maximum size of any DEFINE held in the SCHEDULE, including original source and generated code.

Dec 1997 440.01 CHANGES TO SUPPORT NEW OPAL/BINDLIB
Internal Metalogic change.

Jul 1996 400.04 CORRECT SCANNING OF OPTIONS
SYSTEM/OPAL now permits a comma delimiter in any SET options that ET appear after a DEFINE heading e.g.:
   DEFINE + ODTSEQUENCE TEST(MX) SET LIST,CODE:

Previously, the above would have generated a syntax error.

Jun 1995 400.03 IMPLEMENT OBJECT_PARSE SCANNER
SYSTEM/OPAL now supports the compilation of newer SUPERVISOR-OPAL contexts such as LOG, LOGEOJ, MX+GOING etc. This is now possible because SYSTEM/OPAL uses the same context-scanning procedures as SUPERVISOR itself. Any future contexts added in the future will now be automatically supported by the standalone OPAL compiler.

Dec 1994 400.02 AVOID SYNTAX WITH OBJECT_DEF PROCS
Internal Metalogic change.