ICL 1900 Series George 3 Operating System Commands

SETPARAM (SP)

Function

Creates, or resets to a new value, one of the variable parameters available to the current command processor level.

Format

SETPARAM parameter identifier,new value

The parameter identifier may be represented in one of four ways:

  1. As an alphabetic character between A and X inclusive, indicating the number of the parameter. 'A' represents the first parameter, 'B' the second, and so on to the twenty fourth.

  2. As an enclosed string, optionally preceded by a decimal number n in the range 1 to 24. The number indicates that the parameter being refered to is the nth parameter beginning with the specified string. If n is missing, a value of 1 is assumed. In comparisons between the parameter and the string, occurrences of space characters in both the parameter and the string are ingnored. If the string is null (for example()), no comparison is made and it is assumed the the nth parameter is the one being reffered to.

  3. As an alphabetic character between A and X inclusive preceded by the character @. The alphabetic character has the same significance as in 1. However, the parameter referred to by this alphabetic character must have one of the formats 1, 2, 3 or 4, and will refer the command to the parameter at the level avove the current level. Thus @A refers to the current 1st parameter and if this is set to B then the second parameter at the level above the current level will be set to the new value.

  4. As an enclosed string, optionally preceded by a decimal number n, itself preceded by the character @. The enclosed string has the same significance as in 2, and the @ character generates the same operation as in 3 except that when the character string is found, the remainder of the parameter is one of the formats 1, 2, 3 or 4 and indicates a parameter at the level above.

It should be noted that with formats 3 and 4 a parameter several command processor levels above the current level may be accessed but all parameters accessed on the way must exist.

The new value may be represented in one of thirteen ways:

  1. enclosed string
    Leading and trailing spaces are ignored in setting the new value, but internal spaces are always significant.

  2. MESSAGE(number1,number2)
    The value of the parameter is set to all or part of the current program event message. The part of the message is indicated by the two numbers that follow MESSAGE in parentheses. These give the character positions in the message text of the first and last characters required. For example, where the last message text was ABCDEF

        MESSAGE(2,8-4)

    would indicate the new value to be BCD.

  3. DISPLAY(number1,number2)
    The value of the parameter is set to all or part of the current display. The part of the display text is indicated in the same way as case 2.

  4. REPLY(number1,number2)
    The value of the parameter is set to all or part of the last message sent to the monitoring system, excluding messages in the COMMANDS and ONLINE categories, using a procedure analogous to case 2.

  5. (enclosed string)(number1,number2)
    The value of the parameter is set to all or part of the parameter specified, using a procedure analogous to case 2.

  6. VALUE enclosed string
    The value of the parameter is set to the evaluated enclosed string, which should be a number. The number is always converted to decimal.

  7. TEXT(number list)
    The value of the parameter is set to the evaluated number list. Each number, being single length, is regarded as four characters with leading zero characters removed. Thus, #41 will be treated as the character A, #4141 as the two characters AA, #004100 as the two characters A0 and 0 as the character 0. The characters from every number in the list are concatenated and leading and trailing spaces are removed.

  8. INSTPARA(installation parameter)
    The value of the parameter is set to the current value of the specified installation parameter, exceting MINTRACE, MOPTRACE and JOBTRACE, when the setting will have the format action on monitoring file, and CONTEXT, when the setting will consist of the appropriate combinations of A, B, C seperated by commas.

  9. DATE
    The value of the parameter is set to the current date in the format DDMMMYY where DD is the day, MMM is the month (in alpha characters) and YY the year.

  10. TIME
    The value of the parameter is set to the current time in the format HH.MM.SS where HH is the hour, MM is the minutes and SS the seconds.

  11. JOB
    The value of the parameter is set to the jobname. The command must be in USER context.

  12. USER
    The value of the parameter is set to the username. The command must be in USER context.

  13. ENVIRONMENT(n1,n2)
    The value of the parameter is set to the reply to the GIVE/5 extracode, converted to decimal. n1 and n2 are the lowest and highest numbered bits required: they must lie between 1 and 47 inclusive but the difference between them must not be greater than 22 (that is, no more than 23 bits mmay be specified at one time). For example, (18,28) specifies 11 bits and is therefore permitted but (18,47) specifies 30 bits and is not allowed. If only one bit is required, only n1 need be specified.

It should be noted that only the first four characters of any operator need be given. So the example in 2 may be written MESS(2,8-4).

Additional representations of new value are available via Mend Exchange Scheme options:

  1. FSIZE(parameter list) - (M263)
    The value of the parameter is set to the size of a file, or the total of files in a directory or directory tree, according to the parameter list as specified in the HOWBIG command.

  2. HIGEN(entrant description) - (M262)
    The value of the parameter is set to the highest generation of the entrant description specified.

  3. LOGEN(entrant description) - (M262)
    The value of the parameter is set to the lowest generation of the entrant description specified.

  4. NEXT(prompt-string) - (M281)
    The value of the parameter is set to the next command to be issued.
    In MOP context, it prompts the job's terminal with the given string and the typed reply is returned as the result of the SETPARAM.
    In a background job, the result is the next record from the job description file (successive records being taken if %;NEXT(..); is repeated in one command.
    Note that this facility enables a parameter to be set to a completely arbitary string.
    The prompt-string may be empty or omitted.

Forbidden contexts

None

A SETPARAM command must not be issued at command processor level zero or at the top break-in level.

Execution

When a macro command is issued a block of 24 variable length parameter locations is made available for use by the macro. Initially, only the locations coressponding to the parameters of the macro (if any) are set. SETPARAM is used to manipulate the contents of any of the 24 locations; the action of SETPARAM can be thought of in terms of altering or creating parameters of the macro. The blocks of locations is deleted on termination of the macro. In the current mark it is possibleto alter or create parameters at levels above the current macro. This is done using a 'call by name' technique as described earlier (that is, using the @ character); it has thus become possible to communicate between macros.

Examples

A job is currently obeying commands of a macro expansion. The macro command was issued with two parameters 'OLD1' and 'OLD2'. The text of the current program message is 'WHATSNEW?'.

  1. Any of the following commands will reset 'OLD2' to 'NEW'.

        SETPARAM B,(NEW)
        SETPARAM 2"OLD",(NEW)
        SETPARAM 2(),MESSAGE(3*2,8)
        SETPARAM "OLD2",MESSAGE(6,16/2)

  2. The following command will set the fourth current parameter location to 'NEW'.

        SETPARAM D,"NEW"

  3. The following versiom of the command will set the fourth current parameter location to 17.

        SETPARAM D,VALUE(#10+4+5)

Error Messages

EXPRESSION z INVALID
NO DISPLAY
MO MESSAGE (that is program event message)
NO REPLY
PARAMETER SPECIFIED BY z NON EXISTANT
PARAMETER FORMAT ERROR
NOT ENOUGH COMMAND LEVELS FOR CALL BY NAME
CALL BY NAME FORMAT ERROR
THE COMMAND MAY NOT BE ISSUED FROM A CONSOLE OR READER