Adds error messages used by Supervisor/PD/StopTanking
Version 620.11 introduced a bug which would cause inconsistent results for the valid function when used with mx or per attributes. Any code using valid should be recompiled.
An ODTS would fail with an INVALID OPERATOR at 81255500 when the TRANSLATE function ENTITYDECODE was used and the text adjacent to the & was longer than the maximum supported entity size.
Correts a bug where the valid function would fault for some specific attributes. For example releaseid.
The following SYSTEM attributes have been added to allow retrieval of MCP halt-load timestamp information:
HLTIME HLDAY HLTIMESTAMP
The values should match those seen in the response to a WM command.
<MASKBIT> can now be used for linked masks enabling PDSIGNED
DFH= attributes except DFHHDRLENGTH did not work for multi-segment headers in :FL. If the error was hit, it would kill the search entirely
Using the .read method on an empty BD file would cause a bound error.
Add an optional parameter to Julian, e.g. Julian(SE,DDMMYY or MMDDYY to override USDATES setting.
NAMEID(<Title>) will return title with family and usercode or * stripped off. Ex NameID("*SYSTEM/CANDE ON TESTDISK") returns SYSTEM/CANDE
In HELP ATT SYSTEM METER attributes were incorrectly listed as SYSTEM MET. HELP ATT = SYSTEM METER worked but HELP ATT = SYSTEM MET does not.
If the .Mix(FIFILECOUNT) method was used on an invalid mix number 3 would be returned instead of 0.
Supports Supervisor change to allow a CALL DO of specific logcontext ODTS from a general logcontext ODTS.
Fix SYSTEMSTATUS 17 attributes by implementing AddressF links.
A $Variable.Distribute(",",JsonObject) where the JsonObject had a value with an escaped quote (\") was not able to be distributed.
A $Variable.Distribute(",",JsonObject) where the JsonObject had a value with an embedded comma, such as {"name":"value1,value2"}, was not distributed correctly. Now when a JsonObject is distributed, the strings are excluded from the search for the delimiter.
If using .Read to read a file from a PC by specifying a *UNC prefix and the PC could not be reached, Supervisor could hang for 2 minutes. This is the default timeout time for the connection to a PC. Supervisor now imposes a default timeout time of 5 secords but allows this to be changed by specifying the TimeLimit attribute. Ex $myAtts:='title=*UNC/"10.246.77.123"/META/"bobfiles.txt",
TIMELIMIT=10'
Using the .write method on a file with REDIRECTION=TRUE would display an error:
SUPERVISOR:OPAL WRITE method:UDDFA Error!
and take a program dump. The file would be created correctly.
Protect against errors with disk file header attributes.
This change corrects a bug in version 600.1 affectiong timestamp attributes.
Log context attribute ODTSCONTEXT now works correctly.
If a DU attribute was followed by certain PD attributes it would return 0. For example, any of the PDCOPY.. attributes.
Adding wait(.1) after the DU would detour the problem.
If the .PD method was used after a CALL DO statement and the subject of the .PD had a large number of row (Approx > 1000) the ODTS would fault with a string protect error.
A new modifier, BDRECORDS, has been added to the .Read method.
$S:=$$FL.READ(0,10,bdrecords)will read the first 10 printer backup records into the variable $S. Note that a printer backup record will almost certainly contain multiple lines.
Ex. TT DEFINE + ODTSEQUENCE BOB_READRANGE(MSG):
$Fl:=Upper(Trim(text));
Show(#recs:=$Fl.PD(Lastrecord)+1); #next:=0; Do Begin
#RD:=Min(#Recs,2); $S1:=$$FL.READ(#next,#RD,bdrecords); WHILE $S1 NEQ EMPTY DO BEGIN $LINE :=$S1.SPLIT(/); IF "2" ISIN $LINE THEN $PAGE.INSERT(#("FOUND:",#LN.SUM(1) 3,,TAKE($LINE,20)),/); END; #Next.Sum(#rd);
End Until #Recs.Sum(-#rd) Leq 0 ; SHOW($PAGE);
The above ODTS will process a printer backup file with the title passed as a parameter. Any line in the file containing the digit 2 will be added to the variable $page. This mechanism is needed to process very large printer backup files when the total size is too large to be held in a string variable.
A HELP ATT command could fail with an invalid index. Two things could cause the fault.
1. Entering the command from a terminal with a page width > 127 columns
2. Asking for help on an attribute longer than the longest valid attribute.
Both of these have been corrected.
Rounding of seconds in other time attributes now matches the MCP
The code: If $A Neq "X" Then
CASE $A of Begin "A":Show("A"); ELSE:Show("ELSE")' End;
Would give a syntax error of:
* (LINE:2)
Integer expression expected - OF (LINE:2) This is because the IF line is being treated as an expression and the CASE is therefore assumed to be an CASE expression. If the SO option STRICTODTS is set, then the compiler will now assume that any standalone IF is a statement, allowing this to compile as expected.
The first line of help for some attributes with long headings was truncated on screens configured with less than 90 columns.
Ex. HELP ATT MIXNO:MX would return a first line of
....(MIX) Returns INTEGER Link to MX, CONSTANT for the duration of th The first line will now be wrapped: ....(MIX) Returns INTEGER Link to MX, CONSTANT for the duration of the program.
Version 580.01 of Opal introduced a bug which would cause Supervisor to fault if the USERDATA(RU) attribute was used.
Using the FI mx attributes (Ex FITTILE) on a mixnumber which had opened a very high number of files with long titles, could cause a GetStatus error 41.
If a dynamic variable key was > 17 characters for a non .perm variable the internal variable tables would be corrupted and unexpected values could be returned. In particular if a long name was used for a global variable then a SHOW GLOBAL command would fault. This change will kill any ODTS using a dynamic variable > 17 chars with the error: Function variable key cannot be > 17 chars in ODTSEQUENCE. This restriction does not apply to .perm variables.
Ex. DO($S:="123456789012345678";$$S:="TEST") would get the new error DO($S:="123456789012345678";$$S.Perm:="TEST") would be fine
This change also enables the Metering Attributes: LICENSEDNETIOPCARDS,JAVAPROCCOUNT,LICENSINGNETUNITS, LICENSINGNETUNITSSCOPE,NETUNITSDISPLAYLICENSING,LICENSEDNETPORTS, NUMCUSTPROCSETS,CUSTPROCREDUNDANT,CUSTPROCPERFLEVEL,CUSTPROCNUMPROCS, CUSTPROCCURRPMLIMIT,CUSTPROCDESIREDRPMLIMIT,CUSTPROCACTUALPCT, CUSTPROCTARGETPCT,CUSTPROCCONFIGPCT,CUSTPROCLICENSEDPCT,MCN, LICCELLSERIALNO,CELLMASK,NUMCELLS,CELLSERIALNO
The following LOGEOJ attributes are enabled: PHYSICALREADS,PHYSICALWRITES,DMSREADS,DMSWRITES,DMSTRSTATES, WLMSUSPENDTIME,SYSADPRIV,TARGET,SYSADPRIVTRANSPARENT,IDENTITY, MCSNAME,MPID,D1WORKLOADGROUP,WORKLOADGROUP.
Supports changes described in Supervisor Dnote 570.16
A DEF + SITU L(LOG=1+14) which selected multiple Log Major Types lost the 1st Major Type due to a problem introduced by 560.08, which implemented DBACCESS.
An HTTP connection may be upgraded to a WEBSOCKET using the syntax, RESPOND(WEBSOCKET,<mimetype>,<text>,<url>).
Protect against a bug in some versions of the Algol compiler.
This change corrects a problem with the Opal WHEN or ONCE statement. If an Opal identifier including a hyphen was used then the statement would faild syntax.
Ex. ONCE A-B DO A-B
would have failed.
Add DOUBLEAQUOTE to the TRANSLATE function. Using the first quote in a string as the model, it doubles all occurrences of that quote in the remainder of the string. For Example: Translate('*PDUMP/"TASK 1"',DOUBLEAQUOTE) would result in the string *PDUMP/""TASK 1"".
If HELP ATT = was entered Supervisor would Fault with a Sort Error #3 and restart.
USERDATA(USER) returned a null string dues to a change introduced in patch 520.13, which was checking (UDLOCATOR & 0 UDLTYPEF) ISNT 0 to detect an invalid LOCATOR. The check is now (UDLOCATOR ISNT 0).
The error message returned by Transmit now includes the LSN and FRSN provided in the FileHandle.
The FILEHANDLE was corrupted if a TT function was used within an ON JOBMESSAGE block and A was modified.
An Illegal StackSwap Fault occurred because of a String Temporary in the Opal Machine and a StackSwap to allow off stack processing of a Zip request.
Implements the Supervisor POST function.
Add the ToHexIfNotDisplay option to the Translate function. If the string expression contains any non graphic EBCDIC characters, excluding HT,FF,CR and LF, then the string expression is translated to its hex representation.
DFH Attributes were broken in FLEX : FLAT because the Disk File Header was not properly refreshed.
The LogText attribue now returns valid data for hardware error log entries. (Major 2,Minor23)
Version 530.60 intorduced a bug which broke the SOURCENO attribute in the Operator context for log entries which were not SetStatus entries or were MCSKEYIN entries. This change fixes the problem and intoduces a new attribute SSSOURCESTATION which returns the SourcStation for SetStatus entries (LogMinor=3).
Version 540.90 changed the error message returned by the .Read method for an available value of NoFileFOundRslt. The NO FILE error message has been restored.
The read method may now read from files on a share on a PC. This is done by specifying a UNC title for the file.
A UNC title is of the form:
*UNC/<host name or address>/<share name>/<path to file>
Ex. $ID:='*UNC/PCSERVER/PUBLICSHARE/Myfolder/"myfile.txt"'; SHOW($$ID.READ);
The usercode and password used to access a server is controlled by the MAKECREDENTIALS Utility. It must be run from an ODT or Supervisor window. The MAKECREDENTIALS utility provides a method of encrypting, credentials, and creates a credentials file for each system for which the user has remote access.
MAKECREDENTIALS is a simple command mode utility that expects the following login credentials for a network host: <host> <username> <password> <user domain> (optional) These four pieces of information correspond to the IOHSTRING keywords as follows: SERVER = <host> CREDENTIALS = <username>/ <password> USERDOMAIN = <user domain>
Examples The following example shows how the MAKECREDENTIALS utility is for a host of MYSERVER (10.0.0.10), a username of OPS, and a password of frog:
RUN *SYSTEM/NXSERVICES/MAKECREDENTIALS
("MYSERVER OPS "&""""&"frog"&"""")
or if the IP address is to be used:
RUN *SYSTEM/NXSERVICES/MAKECREDENTIALS
("10.0.0.10 OPS "&""""&"frog"&"""")
Note that if the password on the PC is not all uppercase then the password must be quoted.
If a Custom attribute name is the same as an OPAL keyword or a SYSTEM attribute name, it will not be recognized. Previously each Custom Library provided a prefix to allow a synonym, to avoid this problem. Now, an underscore may be used as a prefix for an attribute name, and OPAL will strip it off before passing the attribute name to the Custom Library.
In an attempt to prevent a looping ODTS, doing reads or writes, from hogging the processor there as a wait of .1 of a second done after each read or write. This did not give control back to Supervisor and in fact in a looping situation Supervisor would become unresponsive. This mechanism has been changed so that control is passed back to Supervisor after every Read or Write. This allows Supervisor to continue handling other events and commands, including a DO- of the looping ODTS.
This change supports the WorkLoadGroup MX attributes.
System PD attributes will now consistently handle non-resident files.
There are now lower run-times to get most attribute values, however, this requires that OPALs with these attributes be recompiled:
Attributes starting NETWORK=
CM= (if using specified packs)
The normal emergency action to terminate a looping ODTS (<sup mixno> HI 999), did not work if the loop included .READ or .FILE code. This oversight has been corrected. Enterin HI999 to Supervisor will kill the looping ODTS and return a Display like: SUPERVISOR:DO+FIND_KEY:HI 999 ENTERED in ODTSEQUENCE @89143200
AS well as supporting mnemonics for the LOG attribute LOGTYPE this change allows all Mnemonics for PKSUBTYPE to be used in expressions.
This change make TakeFileIds and DropFileIds more consistent with Take and Drop. If TakeFIleIds specifies a number of IDs > the number of IDs in the Tiltle then the whole title will be returned. If DropFileIds specifies a number of IDs > the number of IDs in the title then it is treated as TakeFileIds(0) and The Usercode and Family are returned.
If TakeFileIds is passed a negative value equal to the number of IDs in the title the the whole title instead of the empty string will be returned.
If the READ function detects an INVALIDTRANSLATIONRSLT when opening the file, it sets DEPENDENTINTMODE and tries again.
Previously the EXTMODE attribute was set to ASCII when writing a STREAM file. Now, this is only done if the EXTMODE has not been label-equated.
This change supports a new SUPERVISOR OPAL attribute named VALIDEMAIL that allows the caller to validate an email address according to the specifications of RFC 822. Please see SUPERVISOR DNote 541.54 for more information.
Dynamic variables should be overwritten when the heap size is exceeded, the least recently used first. Unfortunately a bug caused any dynamic variable interrogated to lose its dynamic status and it would therefore not be overwritten.
Dynamic variables again work as intended.
The COLLECT function can be used with the modifier JSONOBJECT, to collect variables into a JSON object in the form {"name":"value",...} or {} if there are none.
The LABEL and EIOSTATUS attributes in the PER context have been corrected so they return appropriate null values for unit types that are not valid e.g. LABEL is invalid for an External I/O device such as NP and EIOSTATUS is invalid for a non-EIO devices such as pack or tape. Previously, use of these attributes for invalid devices would have returned corrupted strings.
Further, the use of VIA(UNIT(.. or VIA(UNITSTR(.. within a PER context could have caused the Opal compiler to perform unexpected GetStatus optimisation on the Opal expressions being used. This would cause expressions such as VIA(UNIT(#U):DUCAPACITY(LABEL)) to return null values.
ATTINFO can be used to return attribute information for a CUSTOM Context attribute, if it is called from OPAL code which is running in a CUSTOM Context. The attribute information is provided by the CUSTOM Context Library when the attribute is bound.
The DISTRIBUTE function can be used with the modifier JSONOBJECT, to distribute a JSON object in the form {"name":"value",...}
The change applied by OPAL DNote530.26 caused problems for the Opal WRITE method when an I/O failed because of insufficient disk space. In this case, instead of the function returning an 'Error:' string as the function result, WRITE incorrectly returned 'OK'. This problem has been corrected and WRITE will now return the appropriate error.
This change supports the new OPAL attributes described in OPAL GSTABLEGEN DNote 540.40 for SUPERVISOR's AFTER context.
This changes supports the NEXTACTIVITYDAY attribute in SUPERVISOR's AFTER context.
Using a numeric case statement label > 65535 will now give a syntax error.
The WRITE method may now only be used to update files originally created by a previous WRITE operation. Previously, not all files were protected from WRITE operations but this issue had now been resolved.
If the file passed to the WRITE method does not have NEWFILE=TRUE set in the file attributes then WRITE will create a new file if no permanent file exists. However, in this case, the result returned by WRITE was inadvertently set to 'OK UPDATE' instead of the expected 'OK'. The file would still have been created. This behaviour has been corrected.
Also, .WRITE will now reject attempts to append to an existing file if the source file is already open EXCLUSIVE by another application.
Previously, use of the Hash-Paren function was unintentionally being interpreted as a Dynamic List causing problems in string compare operations where ',' appear in the target string.
For example:
$Z INCL #("ABC,DEF") was interpreted as $Z INCL {"ABC","DEF"}
Meaning that the condition returned true if either "ABC" or "DEF" was present in $Z instead of the full target string because the comma is interpreted as a list separator. This problem is now fixed.
The NameSpace option in the Clear function and .COLLECT method was case sensitive. Since $variables are not case sensitive, this has been corrected.
.Collect now works correctly with .Global and .Perm
The Heap space used by variables cleared using Clear(<name space>) will now be reused.
The limit on the number of variable which may be held in the Heap has been increased from 256 to 1000.
The TRIM function will now accept the ALL modifier; this option causes TRIM to remove not only leading and trailing spaces but will condense multiple spaces inside the string to a single space. The exception to this behaviour is that quoted text sections inside the target are left untouched.
For example:
TRIM(' This is a test with embedded " Quoted string"',ALL))
would return:
This is a test with embedded " Quoted string"
In a Custom Context, any identifier which is neither a reserved word nor a system attribute, is assumed to be a Custom Attribute. If the Custom Context Library doesn't implement the attribute, its value is EMPTY, and if Logging is active, a message is logged to the SUPERVISOR Log.
The Clear and Collect functions will no longer fail when the maximum number of variables has been used.
Previously, a DEFINE ? of a SITUATION previously defined with a context of TIME,MX would erroneously display as:
DEFINE + SITUATION TEST (TIME,MX=LIBS,S,W,BOT,DBS):
The DEFINE would then require modification because MX=BOT is not a permitted subcontext when used with the TIME modifier. This change addresses the problem by allowing TIME,MX to be correctly displayed.
The change described in OPAL DNote 540.04 caused the LASTRECORD attribute to return the value 0 instead of -1 for all empty files. This problem has been corrected.
This change supports the new MAILLIB context within SUPERVISOR allowing the capture of MAILLIB email transactions, errors and events by WHENs that use the MAIL context. For more information, please refer to SUPERVISOR DNote 540.94.
The TITLE attribute extracted from a DFHBINARY raw header will now include the name of disk family of the original file. The default EXTMODE for both LOG and METAFLAT extract files, as described in DNote 540.52, is now set to SINGLE and not EBCDIC.
Further, the DFHIMAGE and DFHBINARY PD attributes now consistently return disk file headers which always have a valid checksum in the last word of the header.
The syntax of the WFL Function has been extended to allow a JobNumber to be supplied instead of WFL statements.
#JobNo:=WFL("<statements>","<id">) starts a WFL Job.
#JobNo:=WFL(<jobnumber>,"<id">) restarts the WFL Job specified by the <jobnumber>, after a Halt/Load.
A WFL Job identified by its <jobnumber> can only be restarted if it is waiting in a System Queue. The WFL function associates the current slot with the <jobnumber>, so that messages are returned to the ON JOBMESSAGE block, and it forces the WFL Job out of its Queue.
Previously, the INCL, ISIN, HDIS and TLIS string operators would compile successfully if mistakenly used to compare arithmetic expressions. However, when the code was executed the Opal code could fault or return indeterminate results. The OPAL compiler will now give the appropriate syntax errors in such cases.
This change implements several new capabilities with the Opal WRITE method. If the file specification passed to WRITE includes a FORMID assignment then WRITE will check for the following string values:
RECORD - Data is written 'as is' to the file without any checks by WRITE for line termination (CR) in the Opal string.
LOG - As with RECORD but it is assumed that the caller is creating an Extract of one or more SUMLOGs. This data will have been created from a SUPERVISOR EVAL of a LOG context script. LOG file may also be appended by EVAL.
Both LOGANALYZER and SUPERVISOR's EVAL command will be able to access these extract files. A new LOG context attribute, LOGBINARY, is now available to capture the raw log record. The file is created with a FORMID set to 'APPLICATION/X-MCP-LOG'.
METAFLAT - As with LOG but it is assumed that the caller is creating an extract of disk file directory. The intent is that the Extract file will be available for access by the FILES and command using object/FLEX. The file is created with a FORMID set to 'APPLICATION/X-MCP-HEADER'.
The following example OPALs show how to create a log extract file:
DEFINE + ODTSEQUENCE WRITELOG2(LOG): If Not LASTEVAL Then $REC:= LOGBINARY & $REC Else Begin $LOG:='TITLE=*EXTRACT/LOGA ON DEV,FORMID="LOG",NEWFILE=TRUE'; Show($$LOG.WRITE($REC)); End;
To extract all operator commands from all SUMLOGs over the past 3 days:
EVAL (OPERATOR:TRUE) [@BACK 3 DAYS FOR 3 DAYS] DO WRITELOG
Note that EVAL returns log entries in reverse chronological order so each new log entry is prefixed to the $REC string: this mechanism is not intended to write large extract files.
The WRITE method will now honour NEWFILE=TRUE if it is set in the file specification; previously, this was ignored and the existing file was always appended.
The ASAP variant of the LOG function has been deimplemented; all Advanced Scheduling logging will be handled by the SITE log.
Using the WRITE method to append data to existing FILEKIND=DATA files would have incorrectly segmented data strings into 80-character chunks, ignoring the actual MAXRECSIZE of the original output file. This problem has been fixed.
.READ can now read KEYYEDIO files. The expected use is to read the header record of a file.
Ex
If MYKEYEDIO had a header record with the following description
01 HDR 03 FILLER PIC X(15). 03 SEQNO PIC 9(5) COMP. 03 RATE PIC 99V9999 COMP.
Then the following code could be used to get these values.
$FILE:="*MYKEYEDIO ON LIVE"; $BUF:=$$FILE.READ(0,1,RECORDS); $HEXREC:=HEXSTRING(DROP($BUF,15)); %Skip over filler and convert hex $SEQNO:=$HEXREC.SPLIT(5); $RATE:=$HEXREC.SPLIT(2)&"."&$HEXREC.SPLIT(4);
Previously, it was possible for Flex to fault with a SEG ARRAY ERROR at 92742500 if a SELECT or REPORT used a combination of FILEIDS and FILENAMEID attributes and the selected file had a very long TITLE. This problem is fixed.
The change described by DNote 540.45 caused some PDSUBKINDLIST calls to incorrectly return null values. This problem has been fixed.
This change fixes a possible String Protect fault when using the ENTITYENCODE option of the Translate function.
The new SUBKINDLIST attribute, described by DNote 540.42, is now disabled for all calls other than Flat and normal Getstatus calls.
The .Read method will now read files with filekind BACKUPPRINTER
A bag had been fixed where the .COLLECT method could cause a string protect fault.
The SUBKINDLIST attribute has been added to the PD context for FLEX and SUPERVISOR. See HELP ATTR SUBKINDLIST for more information.
Various disk file header attributes such as DFHLOCATION, DFHCATALOGED etc. now return consistent values for a all disk files when used in a FLAT search.
Transmit of an EMPTY string caused a Bounds Error.
Syntax of Transmit Function is now,
$DCWResult:=Transmit(<filehandle>,<text>) If $DCWResult is not EMPTY, then the Transmit failed and it contains the DCWrite Error Message.
If the <text> is ?END, an EOF indication is sent to the Remote File.
An occasional issue with the MCPDISPLAYTOSTANDARD MCP entrypoint, used by the ZIPFILE and UNZIPFILE functions to validate file parameters, caused various faults in SUPERVISOR's ZIPHANDLER process when processing the zip request. The way that this MCP procedure is used has been detoured to avoid the problem.
This DNote documents new OPAL features that support the data and file compression facilities recently implemented in MAGUS. The features are available for both FLEX and SUPERVISOR and comprise 2 new functions, 2 file methods and simple progress bar support. The Metalogic Zip implementation is described elsewhere by various DNotes in the METANOTES/MAGUS files - see notes 540.05, 540.12, 540.14 etc.
Both sets of functions handle GZip, ZLib and MZip compression - the latter is Metalogic's own compression format and is intended currently for use on MCP systems.
In general, GZip is used for interchange of files between MCP and non-MCP systems. It offers the best compression, but requires more CPU to do it and to calculate the CRC-32 Checksum. MZip is most useful for interchange of files between MCP systems. It is optimized for speed on the MCP Architecture and it retains the MCP File Attribute information. ZLIB is useful for interchange of byte stream data, such as between a Browser and an HTTP Server. Although Gzip is also valid in an HTTP ACCEPT-ENCODING, ZLib (compress) uses less CPU for the Adler-32 Checksum.
GZIP will only compress FILESTRUCTURE=STREAM files.
The syntax and usage of the zip file methods are shown below:
-- .ZIPFILE - ( <string exp.> -+--------------+-+-----------+-- ) -| +- , -+- MZIP -+ +- <Specs> -+ +- GZIP -+ +- ZLIB -+
-- .UNZIPFILE - ( <string exp.> --+--------------+-- ) -------| +- <DontWait> -+
<Specs>
-- , ---+-- HIGH --+------+--------------+-------| +-- LOW ---+ +- <DontWait> -+
<DontWait>
-- , - DONTWAIT -+---------------+------------| +- = <integer> -+
Both ZIPFILE and UNZIPFILE are methods similar to .READ in that they use dynamic variable references to access a physical file. To create a zip file:
$ZIP:="(META)BIG/FILE/GZ ON DEV"; $SOURCE:="(META)BIG/FILE ON DEV"; $RES:= $$ZIP.ZIPFILE($SOURCE,MZIP,HIGH); If MZIPLASTERROR Neq MZIPOK Then Show("MZIP error ->",$RES);
Here the calling OPAL will wait until the ZIPFILE operation is complete and the slot is marked as 'WAIT ZIP' if interrogated using am EV ? or SLOT command.
If the calls fails, the $RES variable is assigned the error message and the MZIPLASTERROR attribute is set to MZIPERROR. Each error message is prefixed by "Err".
The <Specs> modifier allows the caller to specify a compression model identified by HIGH or LOW and a means of tracking progress of any zip operation. HIGH compression yields smaller archives but consumes more CPU; LOW compression is the default.
The optional <Dontwait> specification allows the caller to track the progress of a zip/unzip operation from OPAL. A new statement, called ON PROGRESS, is available which is regularly called by the zip routines to return updated progress information. Currently, only one progress attribute is available - MYSELF(PROGRESS). Here is an example:
$ZIP:="(META)BIG/FILE/GZ ON DEV"; $SOURCE:="(META)BIG/FILE ON DEV"; $RES:= $$ZIP.ZIPFILE($SOURCE,MZIP,HIGH,DONTWAIT); If MZIPLASTERROR Neq MZIPOK Then Show("MZIP error ->",$RES); Else ON PROGRESS DO Begin SHOW("Zip progress ",MYSELF(PROGRESS)," %"); End;
By default, SUPERVISOR triggers ON PROGRESS every second but this may be overridden by assigning an integer value to DONTWAIT:
$RES:= $$ZIP.ZIPFILE($SOURCE,MZIP,HIGH,DONTWAIT=5);
The syntax and usage of the zip string functions are shown below:
-- ZIP -- ( -- <input string> --+-----------------+-- ) -------| +- , -+-- MZIP ---+ +-- GZIP ---+ +-- ZLIB ---+
-- UNZIP -- ( -- <compressed string> -- ) ---------------------|
Both ZIP and UNZIP can only be used to compress and decompress a single data stream. For ZIP, either MZIP, GZIP or ZLIB should be specified though MZIP is the default. MZIP is Metalogic's own compression mechanism and is optimised for MCP systems. Files that have been compressed by MZIP cannot currently be unpacked on non-MCP systems.
A ZIP function example:
$ZIPSTRING:=Repeat("ABCDEF",20000); %12,000 chars If Not $Z:=ZIP($ZIPSTRING,GZIP) Hdis "Err" Then SHOW("Compressed string-> ",Length($ZIPSTRING)) Else SHOW("Zip Error-> ",$Z);
All ZIP and UNZIP errors are returned as the function result and are prefixed by "Err". In SUPERVISOR environments, the attribute MZIPLASTERROR returns a non-zero value if the operations fails.
Previously, the FILEID function did not quote file name nodes that should have been i.e. the level "ABC.TXT" would have been returned as ABC.TXT by FILEID. This behaviour has been corrected.
In FLEX usage, expressions such as FILEID("A/B/C",0) and FILEID(FILENAMEID,0), where the target did not have a usercode, would have always returned the usercode of the caller. FLEX now returns an empty string in such circumstances and is compatible with SUPERVISOR behaviour.
The DROPFILEIDS and TAKEFILEIDS functions now accept negative values for the number of file identifiers to be processed. A negative values tells the function to start processing from the right instead of the left.
The Transmit function is used to transmit text to a Remote File Program which is waiting for Input.
Example:
$Result:=Transmit(<frsn>,<text>);
If the <text> is successfully transmitted to the program, the function returns EMPTY, otherwise it returns the result of the Write To Object Job (DCWrite Type 65) DCWRITE request.
The $.Reverse method reverses the order of the characters in a string variable.
Both the TAKEFILEIDS and DROPFILEIDS functions will now consistently assign correct lengths for the string values returned.
The error number associated with failed ZIP,UNZIP,ZIPFILE and UNZIPFILE operations is now included in the error message content returned to the caller. Also, all Flex-initiated zip and unzip calls are now exempt from PROCESSOR LOOP DETECTED problems if the operation takes too long.
Previously, the generation of the LOGTEXT attribute by LOG-based EVALs caused significant initial pbit overhead for the SUPERVISOR stack. This overhead has now been eliminated allowing improved EVAL elapsed and CPU times.
An Invalid Index would occur if a $S.Distribute was passed an EMPTY Delimiter.
Support Long File Names in ZIPFILE.
COLLECT.
Implement the $.Collect Function, with the same syntax as the $.Distribute Function.
Example:
$Rejected:=$Collection.Collect("&",NameEqlValue,"NS_");
This example finds all local string variables with a namespace prefix of NS_ and creates a list of <name>=<value> elements, separated by an &, and stores them into $Collection. The list includes EMPTY string variables.
If a <value> contains an &, then it is added to the comma separated list of names returned in $Rejected.
TRIM.
Extend the syntax of the Trim function to allow selective trimming of leading or trailing spaces (LEFT, RIGHT or BOTH).
Examples:
$Result:=Trim($Source); % Trim Leading & Trailing Spaces $Result:=Trim($Source,RIGHT); % Trim Trailing Spaces
TAKEFILEIDS.
TakeFileIds and DropFileIds return EMPTY if the request cannot be satisfied. TakeFileIds(0) now returns the <usercode> ON <familyname, if present. A TakeFileIds(n), where n is the number of FileIds, now returns n FileIds.
The syntax for Clear has been extended to allow a NameSpace to be defined.
Clear(<namespace>)
The <namespace> is a <string>, and any string variable which starts with that prefix is cleared.
In this case, Clear can also be used as a Function, in which case it returns a comma separated list of the names of the string variables which were cleared.
$Names:=Clear("Pre_");
The syntax for $.Distribute has been extended to allow a NameSpace to be defined.
$.Distribute(<separator>,<scheme>,<namespace>) <separator> is a <string> which separates the <name><value> pairs, the syntax of which is defined by the <scheme> mnemonic, such as NameEqlValue.
The <namespace> is a <string> which is used as a Prefix for each <name> when creating the Variable Name. It must be a valid <identifier>.
The maximum <namespace> length is 8 characters. The maximum Variable Name is 17 characters. If the <namespace><name> combination is greater than the maximum Variable Name, the <name><value> is not Distributed.
A new OPAL statement, LOG, is now available for writing log entries to the various Metalogic files from an OPAL script. Syntax is shown below:
- LOG - ( -+- ASAP --+- , --+----------------+-- <Text> -- ) ---| +- MAIL --+ +- <Category> , -+ +- SITE --+ +- SUP ---+ +- TP ----+
The MAIL, SUP and TP mnemonics allow write access to the MAILLIB, SUPERVISOR and TRIM logs respectively. <Category> is optional and is constrained to 3 characters. If unprovided, "Msg" is assumed.
ASAP and SITE are special log files for customer use and are fully supported from SUPERVISOR using the new ASAP LOG and SITE LOG commands. More details to follow.
Previously, the .WRITE method would have caused the main SUPERVISOR process to halt on a 'REQUIRES PK' waiting entry if the disk family assigned to the output file was unavailable. This problem has been corrected.
Further changes to the ZIPFILE and UNZIPFILE functions. Documentation as yet unavailable.
If a RECORD statement references a Mnemonic which is not defined on that system, a Warning is given instead of an Error. At Run Time a reference to an undefined Mnemonic results in termination of the ODTS with the message BAD RECORD MNEMONIC.
The change applied by OPAL DNote 540.17 caused OPAL to mishandle hyphen characters used in variable expressions. This behaviour has been corrected.
Preliminary support for ZIP and UNZIP functions, ZIPFILE and UNZIPFILE methods in both SUPERVISOR and FLEX.
In some cases, SUPERVISOR did not recognise the hyphen character as valid when used in an identifier e.g. a DEFINE interrogation or modify. This oversight has been corrected.
Previously, long LOG CONFIG records greater than 1500 words received by a LOG-based WHEN could have caused SUPERVISOR to fault with a variety of errors including PROCESSOR LOOP. EVAL-based LOG requests were not affected by this problem which has now been fixed.
Processor loop detection within the OPAL machine now provides extra information for determining the causes of unusual loop detection.
.READ(NOSEQ) would ignore records which were all spaces. A record consisting of a single space will now be returned.
Previously the use of .WRITE(#(<opal string>) where the opal string contained lookups could result in the end of the string being repeated in the file.
Extend the syntax of the .READ method to allow a read of a Range of Bytes or Records in a file.
...READ(<index>,<count>,<units>[,<delimiter>])
<index> - the index at which to start the read, in <units>. <count> - the number of <units> to read. <units> - RECORDS or BYTES <delimiter> - Optional <string> delimiter or / to separate multiple RECORDS
If BYTES is specified for a file which is Blocked, the File is assumed to be a ByteStream consisting of the concatenated Records, where each Record is MAXRECSIZE in Bytes long.
This internal change now allows the '_' and '-' characters to be used in the file name used by a container search e.g. FILES (*)= IN "A_B" was previously not allowed.
Further, use of the HELP ATTR command from FLEX utility when run from a non-privileged usercode will now return all matching attributes instead of a restricted subset.
The Age attribute now takes an optional mnemonic parameter INDAYS the default if no parameter is passed and INSECONDS. The time between the current time and the timestamp time is calculated and returned in units of whole days or seconds. If the timestamp of a file was 1 second before midnight yesterday and Age was interrogated at 1 second after midnight then it would return 0 days or 2 seconds.
Further to DNote 540.07, this change supports the resolution of several anomalies with quoted wild-card file searching for FLEX.
This change supports the FLEX file search enhancement described by FLEX DNote 540.10.
The .Insert method was intended to be used as a Statement but if used in an expression it could cause a fault. The null string will now be returned.
The new Flex attribute Age returns the the number of days since the date of the file TIMESTAMP.
Previously, the use of certain PD attribute functions such as CONTAINER and LASTRECORD returned null values if used by a PD variable method or by VIA using a PDKEY title reference. These attributes now return correct values. Additionally, LASTRECORD will now return appropriate values for non-blocked files (i.e. FILESTRUCTURE=STREAM) where the value 0 was always returned.
INPUTPARAM Returns the text of the most recent command.
Ex REP HEAD INPUTPARAM Followed by FILES =BoB= ON DEV:FL Would return FILES =BoB= ON DEV:FL followed by the list of files
Because GETSTATUS MixRequest Type 0 calls have been de-implemented on MCP 54.1, an old call supporting the REASONTEXT attribute has been removed.
This change supports the LOGICALREEL and LOGICALLIST attributes in the TAPEDB context and is described by TAPELIBUPDATER DNote 530.08 in more detail.
A timing hole existed where it was possible for SUPERVISOR to hang on a NO FILE condition when an OPAL WRITE attempted to append to an existing file which was in the process of being removed. This hole has now been closed and SUPERVISOR ensures that the file is physically available prior to the use of WRITE.
The READ method changes described by DNote 530.64 had the unintended side-effect of causing the reading of DATA files to behave incorrectly. This problem has been fixed.
Using the wrong index with certain metering attributes could cause an ODTS to fault with a bounds error. Ex. Attributes with a prefix of METERIMAGE. These attributes will now return 0 for numeric attributes or the empty string for string attributes, when an invalid index is used. Corrections for TS attributes with prefix DECODEDMEM or DECODEDIO have been made.
The change described in OPAL DNote 530.62 caused the WFL statement in a FLEX DO file to fail compilation if used in a compound statement. Also, the KEYIN and COMS functions would still have given 'Unsafe' warnings when used as standalone statements. Both these problems have been addressed.
The READ method has been extended to allow read access to files with a FILEKIND of DASDLDATA and all codefile types. Various OPAL tools such as HEX and HEXSTRING can be used to manipulate data from files such as the above.
New Attributes: TZABBREVIATION (SYSTEM) Returns STRING in the form of an Identifier
TIMEZONE is a synonym for this AttributeSemantics : Time zone abbreviation.
TZNAME (SYSTEM) Returns STRING in the form of an Identifier Semantics : Full time zone name.
TZNUMBER (SYSTEM) Returns INTEGER Semantics : The predefined time zone number or zero.
TZOFFSETDIRECTION (SYSTEM) Returns INTEGER Semantics : Indicates if the time zone offset is added to or subtracted from the universal time to get local time. 0 indicates no time zone, 1 indicates add the offset and 2 indicates subtract the offset.
TZOFFSETHOURS (SYSTEM) Returns INTEGER Semantics : Hours offset (0 through 24).
TZOFFSETMINUTES (SYSTEM) Returns INTEGER Semantics : Minutes offset (0 through 59).
TZOFFSETTIME (SYSTEM) Returns INTEGER Semantics : Total offset time in minutes as a positive or negative integer.
The new string variable .Insert is intended to be used to maintain lists.
-- <String variable> . Insert (<string expression> --------------->
>--+----------------+-----+---------------------+---------------| |-- , -+- UP ----| |-- , --<delimiter> --| |- DOWN --| |- ASC ---| |- DES ---| |- FRONT -| +- BACK --+
If the optional delimiter is a string expression. If omitted "," is assumed.
If the optional modifier is omitted then BACK is assumed.
The string expression is added the the String variable. If the modifier is BACK it is added to the end with <delimiter> as a separator. If the modifier if FROM it is added to the beginning with <delimiter> as a separator.
If the modifier is UP or ASC (Ascending) then it is inserted before the first item in the list which is greater than it.
If the modifier is DOWN or DES (Descending) then it is inserted before the first item in the list which is less than it.
Note that is a sorted list is desired, care should be taken to only use .Insert ,with an appropriate modifier, to maintain it.
Ex. $L1.Insert("A");$L1.Insert("C");$L1.Insert("B"); would leave $L1="A,C,B"
$L2.Insert("A",Front);$L2.Insert("C",Front);$L2.Insert("B",Front); would leave $L2="B,C,A"
$L3.Insert("A",UP);$L3.Insert("C",UP);$L3.Insert("B",UP); would leave $L3="A,B,C"
$L4.Insert("A",DOWN,":=");$L4.Insert("C",DOWN,":="); $L3.Insert("B",DOWN,":="); would leave $L3="C:=B:=A"
The .Cut and .Copy methods have been extended to accept an integer expression in place of the pattern. This variant will Cut or copy the specified element of a list, counting from 1.
Ex. If $L="a,b,c,d" Then $L.Cut(2) would return "b" and leave SL="a,c,d"
All methods may now be used as Statements, in which case any result which would normally be returned is discarded and no 'unsafe' warning given.
Selected functions may now be used as statements in the same way as methods.
For Supervisor the functions which may be used as statements are: DBS,INPUT,KEYIN,MAIL,PING,RESPOND,TT,WFL
For Flex only MAIL may be used
The OPAL compiler now has the ability to provide exponentiation in arithmetic expressions similar to that in Algol using the ** operator. For example:
#A:= 2**10; % => 2 raised to the power of 10 i.e 1024
Two new attributes, LOGNAME and LOGSUBSTRING, have been added to the LOG context. These attributes allow both standard form and substandard form names to be extracted from a LOG record where a suitable OPAL context does not exist. Both attributes return results as normal display form names.
The LOGNAME attribute requires a parameter to point to a specific word in the log record where a standard form name is held. SUPERVISOR expects the standard form to start on a word boundary and is checked to make sure that it is legal otherwise an empty string is returned.
The LOGSUBSTRING attribute requires a word index into the raw log record that directly references a substandard string e.g. 48"08" "MYSTRING" would return as "MYSTRING".
The SOURCENO attribute in the OPERATOR context now returns correct values and several synonyms have been provided to better describe the various values it returns (e.g. hostname, station name, ODT). Further, the USERCODE attribute has been added to the OPERATOR context.
OPAL scripts that attempt to use integer functions with numbers greater than 2**38-1 would fail with an INTEGER OVERFLOW fault. The OPAL machine will now give the error:
"Value greater than 2**39-1 passed to INTEGER function"
Previously, using the TADS attribute within a SUPERVISOR PD context script would cause an INVALID INDEX @ 93820000 if more than 15 files were processed. This problem has been corrected.
OPAL now supports several ways to get attribute information for a specific file (using the PD context) from any contexts. The mechanisms are described below:
Firstly, the VIA function has been extended to allow attributes that are defined as 'LINK to PD' or 'LINK to USER' in other semantics to be used as references to the PD and USER contexts respectively.
HELP ATTR CODEFILETITLE
---- HELP ATTRIBUTES ---- CODEFILETITLE (SL) Returns STRING Link to PD in the form of File title Semantics : Returns the active codefile name for this SL.
For example, the CODETITLE attribute in the MX context returns the title of the codefile used by this process. Because this attribute is linked to the PD context, it is possible to easily return information about the file:
DEFINE + ODTSEQUENCE MXPD(MX): #SEG:= VIA(CODETITLE:SEGMENTS)
The SEGMENTS attribute is a member of the PD context and, if the codefile is resident, VIA allows the file size to be retrieved. Multiple attributes can be returned by using the #(..) function with VIA; in this example, the USERCODE attribute in the LOGBOJ context allows Userdata information about the job usercode to be retrieved:
DEFINE + ODTSEQUENCE BOJUSER(LOGBOJ): $UINFO:=VIA(USERCODE:#(FAMILY,,MAXPW,,MINPW))
To return the file size of the CM-ed MCP codefile:
DO (SHOW("MCP FILE SIZE: ",VIA(WM:SEGMENTS)))
Since there is only a small subset of LINK or reference attributes, a list of eligible attributes for SUPERVISOR can be viewed using the HELP variant which uses the keyword REF instead of ATTR:
HELP REF =:MX HELP REF CODE=
The other two methods may be used from any context and do not use LINK attributes.
A new string variable method called PD has been implemented. Similar to the MX, PER, TAPEDB methods, a string expression can be used instead of a reference attribute and means that its usage is unrestricted. For example:
DEFINE + ODTSEQUENCE PDTEST: $FILE:= "*SYSTEM/FILEDATA ON DISK"; SHOW("INFO = ",$FILE.PD(#(RELEASEID,,CREATIONDATE)))
Alternatively, the PDKEY attribute, used with VIA, similarly allows a file title to be specified by a string expression. This has been provided to be compatible with the current VIA implementation but the PD method is preferred. The above example is shown below using PDKEY:
DEFINE + ODTSEQUENCE PDTEST: $FILE:= "*SYSTEM/FILEDATA ON DISK"; SHOW("INFO = ",VIA(PDKEY($FILE):#(RELEASEID,,CREATIONDATE)))
Reference attributes that LINK to the VL context now work correctly.
The VALID function will now return correct settings when used to check the validity of the following PD attributes: PRODUCT, OWNER, GROUP, SI_PRODUCT, SI_TAPENAME and WORKLOADGROUP. This change applies to both SUPERVISOR and FLEX.
This changes supports the TT nesting problem described by SUPERVISOR DNote 531.42 .
This change supports a new SUPERVISOR context called STATIONS. The STATIONS context allows access to all active and inactive MCP datacom station information similar to that returned by the SYSTEM/DCSTATUS utility. These MCP datacom tables include both pseudo and physical stations and, where a station is in-use by a MCS, additional session information is provided.
Please refer to SUPERVISOR DNote 531.40 for more information; see HELP ATTR =:STATIONS for a list of available attributes.
This change supports another new SUPERVISOR context called SESSIONS. The SESSIONS context allows access to information about all MCP job and MCS sessions currently active in the system. This feature is made possible due to the new SESSIONS ODT command now available in MCP 53.1 and later versions of 52.1
Please refer to SUPERVISOR DNote 531.35 for additional information; see HELP ATTR =:SESSIONS for a list of available attributes.
This change supports a new SUPERVISOR context called SHOWOPEN. The SHOWOPEN context allow the retrieval of information about all open, in-use files on a specified disk family and includes both temporary and permanent files. If the family is the DL JOBS family, then Job File information will be returned. Please refer to SUPERVISOR DNote 531.33 for more information and refer to HELP ATTR =:SHOWOPEN for a list of available attributes.
Add Translate(<string>,JavascriptEscape) to escape '" and \ using the Javascript escape syntax \",\' and \\.
Add the CARDINAL attribute to return the name of the cardinal attribute for a specified context.
Add the ATTINFO(<attribute name>,MNEMONICS) function to return a list of Metalogic defined mnemonics for the specified attribute.
Supports the changes described in Opal Gstablegen 530.40.
The TAPEFEET attribute works again in FAMILYMANAGER or FILE:FLAT. It is now a Function Link, not an Attribute Function and so no longer needs OPAL compiler support.
Previously, TIMETOTEXT calls that used the HHMMSSDDD parameter would not correctly handle modulated seconds values greater than 59.5 causing the calculated minute value to be incorrectly incremented by 1. For example:
TIMETOTEXT(59.5,HHMMSSDDD)
Would return 00:01:59.500 instead of 00:00:59.500.
This minor problem has been corrected.
The TimeToText function will now accept a mnemonic parameter of HHMM to return a time in the form 19:20. Note that seconds are truncated so if TimeTotext(#Seconds,HHMMSS) returned "19:20:59" then TimeToText($Seconds,HHMM) would return "19:20"
A new SUPERVISOR context, METALOG, has been implemented. This context allows retrieval of log entries from Metalogic's internal log files maintained by SUPERVISOR, MAILLIB and TRIM. Unlike SUMLOG-based scripts, METALOG Opals can only be used with the EVAL command as no event support is available. Please refer to SUPERVISOR DNote 531.21 for more information and HELP ATTR =:METALOG will show the small subset of supported attributes.
The change described in OPAL DNOte 530.43 caused both FLEX and SUPERVISOR PD attribute mnemonic comparisons to fail with a LOGICAL ASSERTION compiler fault. Such expressions would include UNITS=WORDS, FILEKIND NEQ DCALGOLSYMBOL etc. This fault has been corrected.
Version 530.42 introduced a bug when using the Time or TimeToText functions. If either function was used more than once, then the subsequent calls could return corrupted values.
This problem has been corrected.
Some new attributes for the DEFINE context have been added to provide additional information concerning the method used to compile an individual DEFINE. These attributes include REFERENCE, REMOTESOURCE, SOURCEKIND and SOURCEHOSTNAME.
This changes supports a new SUPERVISOR context called SL. The SL context allow the retrieval of information for all MCP SL functions from OPAL scripts using EVAL. Please refer to SUPERVISOR Dnote 531.20 for more information and refer to HELP ATTR =:SL for a list of attributes currently available.
Internal change: the current mechanism for attribute mnemonic handling has been changed because array limits had been exceeded (GSMNEMINFO). There are no issues with existing compiled code.
The ATTINFO function described in the OPAL Manual has been changed.
-- ATTINFO - ( <string exp>, <string exp> , -- DETAIL ---------- ) -| |- SEMANTICS ----|
The ATTINFO function returns selected information about an attribute.
The first parameter specifies the name of the attribute.
The second parameter defines the Context to which the Attribute belongs.
The third parameter selects the type of information to be returned.
If DETAIL is specified, then a list of name=value; elements are returned, which may be dereferenced using the $.Distribute method.
These names are defined,
AtLink- Returns the name of a <context> if the value of the attribute can be used as the Cardinal Attribute of the linked context, otherwise EMPTY.AtKind - If the attribute has $AtLink, "DO" is returned if the attribute is a link to another object, otherwise "EVAL" is returned if the attribute is a link to a list of objects.
AtProxy- If the attribute has $AtLink, a "1" is returned if the attribute is a proxy attribute and represents other information for the web interface.
AtArgs - Returns the number of parameters.
AtType - Returns the user type of the attribute (eg. INTEGER).
AtValue- Returns the format of the attribute value (eg. SECONDS).
AtErr - If an error occurs, the reason for the error, otherwise it is empty.
If there is an error, AtErr contains the reason, otherwise all names are returned, so that a $.Distribute will either assign a value, or reset the corresponding variable.
Examples:
AttInfo("LibUserList","Mix",DEATIL) returns AtLink=MIX;AtKind=EVAL;AtProxy=;AtArgs=0; AtType=STRING;AtValue=STRING;AtErr=;
AttInfo("UseTime","PD",DEATIL) returns AtLink=;AtKind=;AtProxy=;AtArgs=0; AtType=REAL;AtValue=SECONDS;AtErr=;
If SEMANTICS is specified, then the function returns the Semantics for the attribute, with new lines indicated by <br/>.
Example:
AttInfo("UseTime","PD",SEMANTICS) returns ACCESSTIME returns the time of day when the file entry was last accessed.
The TIMETOTEXT function has been implemented.
--- TIMETOTEXT(<arithmetic expression>, ---- HHMMSS --------)-| |-- HHMMSSDDD ---|
TIMETOTEXT generates a string with hours, minutes and seconds and fractions of a second, separated by colons, according to the mnemonic specified as the second parameter. <arithmetic expression> is assumed to be a real value in seconds.
Example:
TIMETOTEXT(7266.5) returns 02:01:06.500
A new SUPERVISOR context called DEFINE has been implemented. This context allows Opal scripts to interrogate SUPERVISOR's OPAL program dictionary with the EVAL command and return useful information for any DEFINE in that dictionary. Please refer to SUPERVISOR DNote 531.15 for more detailed information.
Numbers larger than the biggest integer (549755813887) would not sort correctly.
Real values would not sort correctly unless a decimal width was specified. Eg.(CPUrate 2.9).
Any numeric expression used in a Sort clause is now help in a special internal format and will sort correctly. Note that in the associated ODTS or Display the decimal width will still need to be used to view decimal values.
Eg. TT EV (MX=A,LIBS:TRUE) DISP (CPURATE 2.6 NAME)[10] SORT (CPURATE)
The / character used in an Opal string to cause a new line should not be used in a Sort clause, either inline or
compiled. If it is used in this way the Sort will be disabled.
When sorting ascending the following characters would sort in the wrong order
]$*)bcdekmn
This problem has been corrected.
The use of Metalogic CONFIG variables with identifiers longer than 17 characters may now be used in all OPAL expressions.
Sort Key lengths were miscalculated for Real field widths. This has now been fixed.
The use of a boolean expression in an Opal string would cause the expression to be coerced to a numeric value. Usually this would be 0 for false and 1 for true. Unfortunately NEQ used with two strings would always return -0 as would the EQV operator and the NOT operator.
A boolean expression will now be coerced to a string of True or False.
Ex.#(1=3) will return "False" #(Not 1=3) will return "True"
Displays are now conditioned so that if used as a sort key, they act a little differently. They will return a fixed length for an ODTString segment (12 chars or 64 for a String) if no width is given explicitly. This allows Opal to calculate the key length. Negative numbers are complemented so that they give a string that sorts lower as they become more negative.
A new function, COMPLEMENT, bit complements a string to reverse its sort precedence. For example:
SORT - (X) is equivalent to SORT + (Complement(X))
A new FLEX attribute, called GETDISKFARMSERIAL, is now available. Its usage is meant for FLEX scripts that create COPYWRITE Disk Farms with serial number identification on remote PC systems. Typically, this would be used for COPY & CATALOG requests from MCP hosts that use Archiving and not cataloging systems. When referenced, GETDISKFARMSERIAL retrieves the COPYWRITE_CATSN config variable to determine the next Copywrite-Disk Farm serial number to be used. The Metalogic Tape Library database must be available and the configured serial number must have a numeric component.
When called, GETDISKFARMSERIAL starts with the current COPYWRITE_CATSN serial number and searches the TRIM database looking for the next available free serial. When a free serial number is found, an entry is constructed in the TRIM database (the tape will have a pre-filled volumeid of ALLOCDISKFARM) and the serial number value held in COPYWRITE_CATSN will be incremented by one. This mechanism prevents two concurrent COPY&CATALOG requests from using the same serial number.
Add ATTINFO(<attname>,PROXY) function which returns TRUE if an attribute represents some information which can be obtained from the attribute value in a Scripting Environment.
Previously, it was possible for SUPERVISOR to DS after a fatal I/O error (e.g. I/O ERROR WRITE ON INPUT FILE) using the WRITE method to a file with incompatible file attributes. This problem has been addressed by improved checks prior to the output file open and protecting any file WRITEs so that SUPERVISOR will not be DS-ed in the future.
The PING function has been implemented to allow a NW TCPIP PING command to be tracked by an OPAL script. PING accepts two parameters: the first is a hostname or IP address string while the second is an optional integer indicating the number of ping messages to be sent to that host. If the second parameter is absent, one message only will be sent.
---- PING -- ( -- <host/ip address> --+-------------------+------| +-- , -- <count> ---+
If a hostname is provided, PING will use the SYSTEM/RESOLVERSUPPORT library to resolve the name to an IP address. An error will be returned if the host lookup fails. If a valid IP address has been determined, SUPERVISOR issues a NW TCPIP PING command to that address and the script will wait for the ping to complete.
Since TCPIP PING operations are processed asynchronously, beware that it is possible for another PING to the same IP address to be detected prematurely. Unfortunately, Unisys NW TCPIP PING encoded command and report entries do not have any markers to identify an individual request though SUPERVISOR uses a specific SIZE specification in the PING command to help identify that the command has been processed.
A maximum of 20 messages can be sent by any PING command; note that if the IP address is not contactable, each ping will time-out after 60 seconds. This means that a 20-message ping to an unavailable IP address will take up to 20 minutes for PING to complete.
Note that if PING is used inside an event-based WHEN, then events normally destined for that WHEN will not be received whilst the slot is waiting for the PING to complete. An EV? interrogation of the waiting slot will show "(WAIT PING)" for the slot status and a SLOT command will show the IP addressed being PING-ed.
Once SUPERVISOR has detected that the PING has completed, an integer result value is returned to the caller and the script can determine information about the ping using a number of new attributes. The mnemonic values returned can be viewed with the HELP ATTR PINGRESULT command.
For example:
DEFINE + ODTS PING(MSG): #P:= PING(TRIM(TEXT),3); SHOW(PINGTEXT);
TT DO PING DELL8500
PING to DELL8500 Hostname resolved to 10.0.0.35 PING result was PINGSUCCESS PING has sent 3 messages, received 3 messages, 0 % loss PING request duration was 0.024 seconds Average PING response time was 0.008 seconds
TT DO PING 10.0.0.71
PING to 10.0.0.71 ERROR: NO RESPONSE TO PING
Note that PING looks up the hostname using RESOLVERSUPPORT so any mapped TCPIP hostnames that do not have a DNS entry will return a DNSUNKNOWNHOST error.
This changes supports the new SYSTEM MAIL attribute subset as described in SUPERVISOR DNote 530.71.
The OPAL WRITE method is now protected from generating a SECTORS REQUIRED waiting entry when the disk family destination does not have sufficient space to write to the file. Previously, this situation would have caused SUPERVISOR to halt.
The WRITE method now unconditionally sets the NORESOURCEWAIT attribute on all destination files to protect against this situation. If a disk shortage is detected, the WRITE call will return the error 'Error:Insufficient disk space' and a new file will not be created.
A new attribute called DFHIMAGE has been implemented for both FLEX and SUPERVISOR (PD context). DFHIMAGE returns an image of the Disk File Header of the selected file. By default, this is returned in JavaScript array format with each header word in hexadecimal format delimited by commas. For example:
[128,'3F3F0A4003E8','801000000000','000000000052',...]
The first entity in the array indicates the size of the header in words.
Support for Supervisor version 530.58
Add EBCDICToXML to Translate function. It translates from EBCDIC to valid XML ASCII characters, which are the ASCII graphics plus CR,LF and HT.
Various formatting improvements have been applied in the presentation of the PRINT ATTR and HELP ATTR responses for both SUPERVISOR and FLEX. The SUPERVISOR attributes EOJCAUSE and EOJTYPE now show as returning an INTEGER mnemonic value instead of BOOLEAN and their semantics have been updated.
The invalid use of some Methods could cause a compiler fault. Ex. Decimal($A).MX(NAME) The correct syntax error will now be returned.
The REFERENCE attributes TASK, UNIT, VDBS and PRINTS will now not show the other members of the group as synonyms. Similarly, this behaviour with the string variants such as TAPEDB and TASKSTR has been addressed.
It is now possible for OPAL attribute semantics to show double-quotes in their descriptions instead of the single version, allowing attribute usage to be correctly described.
OPAL compiler faults are now logged correctly in SUPERVISOR's log file; previously these events were ignored.
Various updates have been made to attributes belonging to the VDBS context because of documented Unisys changes to the DMINQ 25 function (in the DMAlgol programming reference manual). Please refer to OPAL GSTABLEGEN DNote 530.15 for more information.
Using the construct VIA(TASKSTR(OBJECTS would cause a compiler fault. This has been corrected.
The use of a non reference variable in a VIA( function would cause a compiler fault. It will now correctly return a syntax error.
The syntax error reporting for FLEX DO file compilation of SELECT or REPORT statements has been improved. The OPAL compiler will now write the failing line of source followed by the syntax error to the screen or print file. Please see FLEX DNote 530.04 for further information.
Variable.<property>.read and variable.<property>.write are now allowed. variable.config.store and variable.config.distribute are now allowed. Two methods are explicity excluded when using the Config property, SPLIT and CUT.
Previously, the LOG context LOGTSDAY and MTCREATIONDAY attributes returned values with the year of the julian date adjusted by +70. Both these attributes now return correct values.
Previously, using the CONTAINER Opal attribute in FLEX when processing stream files with less than 18 bytes caused FLEX to fault with an I/O ERROR: END OF FILE @97146438. This problem has now been fixed.
A new SUPERVISOR context called AFTER has been implemented. This allows the user to interrogate the SUPERVISOR AFTER schedule using OPAL programs that are processed with the EVAL command. Please see SUPERVISOR DNote 530.22 for more information.
The change applied by OPAL DNote 520.86 caused all OPAL compile error messages, displayed on screen or generated by an ENTER file, to be located at the start of each error line when it should have been offset at the character position where the error token was detected. This feature has now been returned to the previous behaviour.
A new method has been added to Opal variables. The .When method allows the evaluation of an expression in the when context. The slot number to be used is taken from the contents of the variable.
Ex. If $s="2" $s.When(OdtsName) would return the name of the Odts running in slot 2.
Defining the following ODTS would allow TT DO META_SLOTRATE to give a display of all of the active slots sorted by CPU rate.
TT DEFINE + ODTSEQUENCE META_SLOTRATE: $Slots:=Objects(When:OdtsName Neq WhenId(Action)); %ignore ourself While $Slot:=$Slots.Split Neq Empty Do BEGIN $Item:=$Slot.When(#(String8( #Rate:=Integer(CpuTime*100000/Elapsed)/1000,6),, If SituType > 0 Then #(SituType,,Situname,,) Else Empty, OdtsType,,OdtsName)); #Done:=0; $New:=Empty; While #Done=0 And $Lst Neq Empty Do Begin $Tmp:=$Lst.Split(/)&#(/); If Decimal(Take($Tmp,6)) > #Rate Then $New:=&$Tmp Else Begin $Lst:=$New&$Item&#(/)&$Tmp&$Lst; #Done:=1; End; End; If #Done=0 Then $Lst:=$New&$Item&#(/); End; Show("Active slots sorted by % Cpu rate",/ /,$Lst)An example of its use.
TT DO Meta_SlotRate
Active slots sorted by % Cpu rate 0.077 DO REC_STATUS 0.02 DO REC_PKSPACE 0.015 WHEN REC_MSG DO REC_MSG 0.014 WHEN REC_W DO REC_W 0.013 WHEN REC_C DO REC_C 0.012 WHEN REC_BOJ DO REC_BOJ 0.008 WHEN REC_GOING DO REC_GOING 0.005 DO MENU_FAMCHK 0.003 WHEN HTTP_KEEPALIVE DO HTTP_KEEPALIVE 0.003 WHEN TCPIPATTACH DO TCPIPATTACH 0.003 WHEN META_MSGMON DO META_MSGMON 0.002 WHEN TPDB_SILOW DO TPDB_SILOW 0.002 WHEN REC_SEC DO REC_SEC 0.002 WHEN XREF DO XREF 0.002 WHEN META_W DO META_W 0.001 WHEN REC_MCSSEC DO REC_MCSSEC 0.001 WHEN TPDB_AUTOCD DO TPDB_AUTOCD 0.001 WHEN META_MAKELIVE DO META_MAKELIVE 0.001 WHEN BOB_WEBSECURITY DO BOB_WEBSECURITY 0.001 WHEN META_SLOTCHECK DO META_SLOTCHECK 0.001 WHEN BOB_CLEANUP DO BOB_CLEANUP
This change supports the new WHEN context for SUPERVISOR; please see SUPERVISOR DNote 530.13 for more information.
Also, the change includes an internal Metalogic enhancement that permits attribute mnemonic values to be declared with the same name as other existing attributes. Previously, this was not permitted.
The ATTINFO(<attribute>,<infotype>) function returns selected informaton about an attribute.
This information is currently available,
LINK returns either EMPTY or the name of a <context> if the value of the attribute can be used as the value for the cardinal attribute of the linked context.
This change helps to limit the number of COPYWRITE library link and delink operations when accessing LibMaintdIr attribute information for FLEX disk farms and CD images in a TAPEDB EVAL. Previously, there would have been a link/delink pair for each tape access.