2.4.1 GLpGET/GLpSET(GLpSTX)

1.
Function
Inquires/changes an internal variable used in MATH1 (and the whole DCL). (GLpSTX allows changes by a runtime option.) All internal variables can be inquired, but system-dependent internal variables cannot be changed.
2.
Call
CALL GLpGET(CP,IPARA)
CALL GLpSET(CP,IPARA)
CALL GLpSTX(CP,IPARA)
3.
Explanation of Parameters
CP (C*8) Name of an internal variable
IPARA (I,R,L) Value of an internal variable



The following is a list of names that can be specified as CP.



'NBITSPW' (I) Bit length of 1 word. System-dependent (usually 32)
'NCHRSPW' (I) Character length of 1 word. System-dependent (usually 4)
'INTMAX' (I) The maximum integer that can be expressed by 1 word. System-dependent (See Notes.)
'REALMAX' (R) The maximum floating-point number that can be expressed by 1 word. System-dependent (See Notes.)
'REALMIN' (R) The minimum positive floating-point number that can be expressed by 1 word. System-dependent (See Notes.)
'IIUNIT' (I) Number of the standard input device. System-dependent (usually 5)
'IOUNIT' (I) Number of the standard output device. System-dependent (usually 6).
'MSGUNIT' (I) The output device for message output. (Initial value same as 'IOUNIT').
'MAXMSG' (I) The maximum number of messages (Initial value: 20)
'MSGLEV' (I) If the output message level is below 0, will output all messages. If 1, will output warning and error messages. Above 2, will only output error message. (Initial value: 0)
'NLNSIZE' (I) The maximum number of characters in a message printed in a single line (Initial value: 78). When a message is printed, the first column of each line begins with a blank, so the actual number of characters for each line is 'NLNSIZE'+1.
'LMISS' (L) Specifies whether missing-value handling will be performed. Performed when .TRUE., and not performed when .FALSE.. (Initial value: .FALSE.).
'IMISS' (I) Specifies the integer-type missing value for missing-value handling. (Initial value: 999)
'RMISS' (R) Specifies the floating-point-number-type missing value for missing-value handling. (Initial value: 999.0)
'IUNDEF' (I) Integer-type value indicating 'not specified'. (Initial value: -999)
'RUNDEF' (I) Floating-point-number-type value indicating 'not specified'. (Initial value: -999.0)
'LEPSL' (L) Specifies whether error is included when comparing floating-point numbers .(See Chapters 8,9,10,11.) If .TRUE., error is included; if .FALSE., error is not included. (Initial value: .FALSE.)
'REPSL' (R) The standard value of relative error in comparison including error. System-dependent (see Notes).
'RFACT' (R) A scaling factor (Initial value: 1.0) that is multiplied with the standard value of relative error in comparison including error. 'REPSL'*'RFACT' is used as the relative error.

4.
Notes
(a)
The following subroutines are available for managing internal variables.
GLPQNP(NCP) Calculates the total number NCP of internal variables
GLPQID(CP,IDX) Determines the position IDX of an internal variable CP
GLPQCP(IDX,CP) Inquires the name CP of an internal variable at position IDX
GLPQVL(IDX,IPARA) Inquires the value IPARA of an internal variable at position IDX
GLPSVL(IDX,IPARA) Changes the value IPARA of an internal variable at position IDX
(b)
The  GLpGET calls the above GLPQID to determine the position of an internal variable, and inquires about the value by  GLPQVLGLpSET calls GLPQID to determine the position of an internal variable and changes the value by GLPSVL. Therefore, if the specified internal variable is not found, the error message GLPQID is printed.
(c)
Appropriate types of constants or variables should be specified for IPARA .
(d)
The name of an internal variable  is checked by the character function LCHREQ which compares character strings (case non-sensitive). Therefore, if  LCHREQ is correctly installed, small-case letters can be used for specification.
(e)
The minimum positive floating-point number expressed by 'REALMIN' should not have 0 as its most significant digit (MSD) of its fixed-point part. Care must be taken as this is not necessarily the value immediately before initiation of  UNDER FLOW. In other words, a floating-point-number-type variable is usually normalized so that the MSD of its fixed-point part is not 0. However, in certain systems, small numbers for which such normalization will result in lack of the exponent part are expressed by setting the higher digits in the fixed-point part to 0. Such values are treated as floating-point numbers, but they do not have the precision of a normal floating-point number. In other words, the 'REALMIN' is the minimum positive floating-point number with normal precision.
(f)
The standard value of relative error represented by 'REPSL' is the maximum value of relative error of floating-point-number representation multiplied by a factor of 10. This factor of 10 is arbitrary, and the safety factor multiplied by 10 is selected as a guideline for the precision of calculation results. The relative error of the floating-point-number representation can be determined logically from the form of internal representation, but it can also be determined by switching ON/OFF the least significant digit of the fixed-point part of floating-point numbers. The position of the fixed-point part in a word depends on the system, but in most cases, the least significant bit in the word is the least significant bit of the fixed-point part.  src/env2/repsl contains programs that performs such checks.
(g)
Of the system-dependent parameters, 'INTMAX', 'REALMAX', 'REALMIN',  and 'REPSL' generally take the following values in mainframe large-scale computers and in UNIX computers.
  Mainframe  UNIX
'INTMAX' 2147483647 2147483647
'REALMAX' 0.7237005E+76 3.4028236E+38
'REALMIN' 0.5397605E-78 1.1754944E-38
'REPSL' 0.95E-5 1.2E-6