Constants in the pick / UniVerse database

  • How to declare a constant value in the PICK / UniVerse Database?
  • How to pass function argument to permalink?

The IBM manual for the UniVerse database contains some information about constants, but nothing special.

Note:

DEFINE statement value

- this is not what I'm looking for, because it replaces the operator with a value at compile time and does not provide a real value constant.

Does anyone know how to declare them?

Thank.

+3
source share
3 answers

This is the same operator as in UniData (UniVerse Unified Sister, both are called U2): and EQU EQUATE

For instance:

EQU statement TO value

, 2, . " ", const. - /, equates //.


. , / , ( ), , ,

:

CALL MySub(PassByRef, (PassByValue))

, (), PassByValue, . , PassByValue

+4

Pick/Universe.

, ,

EQU PI TO 3.14

,

PI = 3.14

, , EQUATE, , , . , , .

+2

EQUATE , , , $INCLUDE, . , .

"", - , , ( ), U2 - . U2 , . , , , "SOMETHING.OR.OTHER.CTRL" . , , "INVENTORY.CONSTANTS".

For indirect links, configure the entry with the first attribute that has “persistent” multivalued names, and the second field with “permanent” values ​​that are also multivalued. Like this:

INVENTORY.CONSTANTS:

001: JOHN*PAUL*GEORGE*RINGO
001: 100*57*83*19833

(where "*" is actually a sign of value).

Then the program will do the following:

SUBROUTINE SAMPLE(CONSTANT.NAME)
     .
     .
     .
OPEN "","SOMETHING.OR.OTHER.CONTROL" TO CTRL.FILE ELSE BOMB
READ CONST.REC FROM CTRL.FILE, "INVENTORY.CONTSTANTS" THEN
  LOCATE CONSTANT.NAME IN CONST.REC<1> SETTING CONST.POS THEN
    CONST.VALUE = CONST.REC<2,CONST.POS>
  END ELSE
    BOMB
  END
END ELSE
  BOMB
END
+1
source

Source: https://habr.com/ru/post/1791384/


All Articles