Data Bases:

1. SQL

2. Pick:

Simple Model of Pick:

ED{IT} file.name itemID

An example of creating and filing a BASIC program named COUNT:

BASIC file.name {item.list} {(options)}

 The BASIC  compiler stores the object code for a BASIC program in the dictionary of the same file as the source code, using the same item ID.

RUN file.name itemID {(options)}

CATALOG file.name {item.list} {(option)}

3. jBase4.1

open database product that brings the strengths of three dimensional MultiValue (sometimes referred to as enhanced relational) technology into the mainstream computing market. 

jBASE

                  

1. Reserved Words:

ABORT CRT GETCWD MATREADU READP SYSTEM ABS DATA GETENV MATVAR READPU TAN ALPHA DATE GETLIST MATWRITE READT THEN AND DCOUNT GO MATWRITEU READU TIME ASCII DEBUG GOSUB MOD READV TIMEDATE ASSIGNED DEFC GOTO NE READVU TO AT DEL GROUP NEXT REGEXP TRANSABORT BEGIN DELETE GT NOT RELEASE TRANSEND BITCHANGE DELETELIST HEADING NULL REM TRANSQUERY BITCHECK DIM ICONV NUM REMOVE TRANSTART BITLOAD DIR IF OCONV REPEAT TRIM BITRESET DO IN OFF REPLACE TRIMB BITSET DTX INDEX ON RETURN TRIMF BREAK EBCDIC INPUT OPEN REWIND UNASSIGNED BY ECHO INPUTCLEAR OR RND UNLOCK CALL ELSE INPUTERR OUT RQM UNTIL CAPTURING END INPUTNULL PAGE RTNDATA USING CASE ENTER INPUTTRAP PASSDATA RTNLIST VAR CHAIN EQ INSERT PASSLIST SELECT WEOF CHANGE EQU INT PERFORM SENTENCE WHILE CHAR EQUATE IOCTL PERROR SEQ WITH CHDIR EXECUTE LE PRECISION SETTING WRITE CHECKSUM EXIT LEN PRINT SIN WRITELIST CLEAR EXP LN PRINTER SLEEP WRITEP CLEARFILE EXTRACT LOCATE PRINTERR SORT WRITEPU CLOSE FIELD LOCK PROCREAD SOUNDEX WRITET COL1 FIND LOCKED PROCWRITE SPACE WRITEU COL2 FINDSTR LOOP PROGRAM SQRT WRITEV COLLECTDATA FLOAT LT PROMPT STEP WRITEVU COMMON FOOTING MAT PUTENV STOP XTD CONTINUE FOR MATBUILD PWR STR CONVERT FROM MATCHES READ SUB COS FUNCTION MATPARSE READLIST SUBROUTINE COUNT GE MATREAD READNEXT SYNC

2. jBC Statements Summary

1. @ function Cursor and screen manipulation.

2. ABORT statement Program termination.

3. ABS function Returns absolute value.

4. ALPHA function Returns Boolean result for alphabetic

      check.

5. ASCII function EBCDIC to ASCII conversion function.

6. ASSIGNED function Returns Boolean result for variable

assignment.

7. BITCHANGE function Toggles the state of the specified

bit.

8. BITCHECK function Returns the current value of the specified bit.

9. BITLOAD function Assigns values in the local bit table.

10. BITRESET function Resets the value of the specified bit.

11. BITSET function Sets the value of the specified bit.

12. BREAK statement Break key manipulation. Loop Termination.

13. CALL statement Transfer of program execution to an external subroutine.

14. CALLC statement Transfer of program to an external C function.

15. CASE statement Conditional branching.

16. CATS function Concatenates the corresponding elements in two dynamic arrays.

17. CHAIN statement Transfer of process control.

18. CHANGE statement Sub-string replacement.

19. CHAR function Returns the ASCII character equivalent of a numeric expression.

20. CHARS function Returns the ASCII character equivalents of the numeric expressions in a dynamic array.

21. CHDIR function Changes the current directory.

22. CHECKSUM function Returns numeric checksum for the supplied expression.

23. CLEAR statement Initializes all variables to zero.

24. CLEARCOMMON statement Initializes all unnamed common variables to a value of zero.

25. CLEARDATA statement Clears data that has been stacked by the DATA statement.

26. CLEARFILE statement Clears all the data from a file.

27. CLEARSELECT statement Clears active select lists.

28. CLOSE statement Closes a previously opened file.

29. CLOSESEQ statement Closes a previously opened sequential file.

30. COL1 / COL2 functions Position determination subsequent to use of the FIELD function.

31. COLLECTDATA statement Retrieves data passed from the PASSDATA clause of an EXECUTE statement

32. COMMON statement Declares a list of variables and matrices that can be shared among programs.

33. COMPARE function Compares two strings.

34. CONTINUE statement Used to skip code in a loop.

35. CONVERT function Converts a character string to another.

36. COS function Returns the cosine of an angle.

37. COUNT function Returns the number of times that one string occurs in another.

38. CRT statement Outputs data to the terminal.

39. DATA statement Stores data for stacked input.

40. DATE function Returns the date in internal form.

41. DCOUNT function Counts the number of elements in a string separated by a specified delimiter.

42. DEBUG statement Passes control to the jBC debugger.

43. DECRYPT function Decodes an encrypted string.

44. DEFC statement Declares an external C function to the jBC compiler.

45. DEFFUN statement Declares an external jBC function to the jBC compiler.

46. DEL statement Removes a specified element from a dynamic array.

47. DELETE statement Deletes a record from a file.

48. DELETELIST statement Deletes a stored list.

49. DELETESEQ statement Deletes a sequential file.

50. DIMENSION statement Declares fixed length arrays to the compiler.

51. DISPLAY statement Outputs data to the terminal.

52. DOWNCASE function Converts all uppercase characters in an expression to lowercase.

53. DQUOTE function Encloses a value in double quotation marks.

54. DTX function Returns the hexadecimal representation of a decimal expression.

55. EBCDIC function Converts a string value from ASCII to EBCDIC.

56. ECHO statement Turns on or off the echoing of characters typed at the keyboard.

57. ENCRYPT function Encrypts strings.

58. END statement Designates the end of a program or subroutine.

59. ENTER statement Unconditionally passes control to another executable program.

60. EQUATE statement Declares a symbol equivalent to a literal, variable or simple expression.

61. EXECUTE statement Allows execution of other programs and commands.

62. EXIT statement Halts the execution of a program.

63. EXP function Returns the mathematical constant e to the specified power.

64. EXTRACT function Archaic method of extracting elements from a dynamic array.

65. FADD function Performs addition on two floating point numbers.

66. FDIV function Performs division on two floating point numbers.

67. FIELD function Returns one or more delimited fields from a string.

68. FIELDS function Returns a dynamic array of delimited fields from a dynamic array of strings.

69. FILELOCK statement Attempts to lock an entire file for exclusive use by this program.

70. FIND statement Finds the location of a specified string within a dynamic array.

71. FINDSTR statement Finds the location of a specified string within a dynamic array.

72. FMT function Formats a string to a specified pattern.

73. FMUL function Performs multiplication on two floating point numbers.

74. FOLD function Re-delimits a specified string with attribute marks.

75. FOOTING statement Defines a footing to be included at the bottom of an output page.

76. FORMLIST statement Creates an active select list from a dynamic array.

77. FOR statement Defines the start of a fixed increment loop construct.

78. FSUB function Performs subtraction on two floating point numbers.

79. FUNCTION statement Declares a user-defined function.

80. GET statement Gets input from an opened serial device.

81. GETCWD function Returns the name of the current working directory.

82. GETENV function Determines the value of the specified environment variable.

83. GETLIST statement Retrieves a previously stored list.

84. GOSUB statement Causes execution of a local subroutine.

85. GOTO statement Causes program execution to jump to the code at a specified label.

86. GROUP function Returns one or more delimited fields from a string.

87. GROUPSTORE statement Replaces one group of characters in a string with another group of characters.

88. HEADING statement Defines a heading to be included at the top of an output page.

89. HUSH statement Turns on or off the echoing of characters typed at the keyboard.

90. ICONV function Converts data in external format to internal format.

91. IF statement Allows conditional execution of statements.

92. IN statement Gets raw data from the input device.

93. INCLUDE statement Includes code from other files.

94. INDEX function Returns the position of a character or characters within another string.

95. INDICES function Returns information about a file's secondary index.

96. INMAT function Returns the number of dimensioned array elements.

97. INPUT statement Gets data from the input device.

98. INPUTCLEAR statement Clears the type-ahead buffer.

99. INPUTNULL statement Allows null input to be seen by the INPUT statement.

100. INS statement Allows the insertion of elements into a dynamic array.

101. INSERT function Allows the insertion of elements into a dynamic array.

102. INT function Truncates a numeric value to the nearest integer.

103. IOCTL function Returns file information.

104. LEFT function Extracts the first n characters from a string.

105. LEN function Returns the character length of an expression.

106. LN function Returns the value of the natural logarithm of a supplied expression.

107. LOCATE statement Finds the position of an element in a specified dimension of a dynamic array.

108. LOCK statement Sets an execution lock.

109. LOOP statement Defines the start of a loop construct.

110. LOWCASE function Converts all uppercase characters in an expression to lowercase.

111. LOWER function Lowers delimiters in a string to their next lowest value.

112. MAT statement Array element assignment.

113. MATBUILD statement Creates a dynamic array from a dimensioned array.

114. MATCHES function Allows pattern matching to be applied to an expression.

115. MATPARSE statement Assigns the elements of a dynamic array to a dimensioned array.

116. MATREAD statement Reads a record and maps the elements into a dimensioned array.

117. MATREADU statement Reads and locks a record and maps the elements into a dimensioned array.

118. MATWRITE statement Transfers the contents of a dimensioned array to a specified record on disc.

119. MATWRITEU statement Transfers the contents of a dimensioned array to a specified record on disc and preserves locks.

120. MOD function Returns the arithmetic modulo of two numeric expressions.

121. MSLEEP statement Pauses program execution for a specified number of milliseconds.

122. NEG function Returns the inverse of a value.

123. NOT function Inverts the Boolean value of an expression.

124. NULL statement Does nothing.

125. NUM function Returns Boolean true if the supplied value is numeric.

126. OBJEXCALLBACK statement Communicates with a calling OBjEX program.

127. OCONV function Converts data in internal format to external format.

128. ONGOSUB/ONGOTO statements Transfers program execution to a label based upon a calculation.

129. OPEN statement Opens a file or device to a descriptor variable.

130. OPENDEV statement Opens a file or device for sequential reading and/or writing.

131. OPENINDEX statement Opens a specific index definition for a file.

132. OPENPATH statement Opens a file given an absolute or relative path.

133. OPENSEQ statement Opens a file for sequential reading and/or writing.

134. OPENSER statement Opens a device for serial IO.

135. OUT statement Sends raw characters to the current output device.

136. PAGE statement Causes the current output device to page.

137. PAUSE statement Allows processing to be suspended until an external event occurs.

138. PERFORM statement Allows execution of other programs and commands.

139. PRECISION statement Defines the number of digits of precision to be subsequently used.

140. PRINT statement Sends data to the current output device.

141. PRINTER statement Controls the destination of output from the PRINT statement. PRINTERR statement Prints standard jBASE error messages.

142. PROCREAD statement Retrieves data passed from a jCL program to a jBC program.

143. PROCWRITE statement Passes data back to the primary input buffer of a calling jCL program.

144. PROGRAM statement Documents source code.

145. PROMPT statement Defines the prompt characters used by INPUT.

146. PUTENV function Sets environment variables for the current process.

147. PWR function Raises a number to a specified power.

148. QUOTE function Encloses a value in double quotation marks.

149. RAISE function Raises delimiters in a string to their next highest value.

150. READ statement Reads a record from an opened file into a variable.

151. READL statement Reads a record and takes a read-only shared record lock.

152. READLIST statement Retrieves a previously stored list.

153. READNEXT statement Moves forward through an index.

154. READPREV statement Moves backward through an index.

155. READSEQ statement Reads data from a file opened for sequential access.

156. READT statement Reads tape devices.

157. READU statement Reads a record from an opened file into a variable respecting locks.

158. READV statement Reads a field from a record in an opened file into a variable.

159. READVU statement Reads a field from a record in an opened file into a variable respecting locks.

160. RECORDLOCKED function Returns the status of a record lock.

161. REGEXP function Pattern matching with regular expressions.

162. RELEASE statement Releases record locks.

163. REM function Returns the arithmetic modulo of two numeric expressions.

164. REMOVE function Successively extracts delimited strings from a dynamic array.

165. REPLACE function Archaic method of replacing elements in dynamic arrays.

166. RETURN statement Transfers execution to the caller of a subroutine/function or to a specific label in a program.

167. REWIND statement Issues a rewind command to attached device.

168. RIGHT function Extracts the last n characters from a string.

169. RND function Generates a random number.

170. RQM statement Pauses execution.

171. RTNDATA statement return specific data to the RTNDATA clause of another program's EXECUTE.

172. SADD function Performs string addition.

173. SDIV function Performs string division.

174. SELECT statement Creates a select list of elements in a specified variable.

175. SELECTINDEX statement Creates a dynamic array of keys based on a single selection of an index key.

176. SEND statement Sends output to a device.

177. SENTENCE function Returns the command used to invoke a program and the arguments it was given.

178. SEQ function Returns the numeric ASCII value of a character.

179. SIN function Returns the sine of an angle.

180. SLEEP statement Pauses program execution for a specified number of seconds or until a specified time.

181. SMUL function Performs string multiplication.

182. SORT function Sorts a dynamic array.

183. SOUNDEX function Converts strings to their phonetic equivalents.

184. SPACE function Generates strings of spaces.

185. SPOOLER function Returns spooler information.

186. SQRT function Returns the square root of a number.

187. SQUOTE function Encloses a value in single quotation marks.

188. SSUB function Performs string subtraction.

189. STOP function Program termination.

190. STR function Performs string duplication.

191. SUBROUTINE statement Declares an external subroutine.

192. SUBSTRINGS function Returns sub-strings of elements from a dynamic array.

193. SUM function Sums elements of a dynamic array.

194. SYSTEM function Returns system information.

195. SWAP function Sub-string replacement.

196. TAN function Returns the tangent of an angle.

197. TIME function Returns the current system time.

198. TIMEDATE function Returns the current time and date.

199. TRANS function Retrieves a field from a file.

200. TRANSABORT statement Aborts and reverses the current transaction.

201. TRANSQUERY function Used to determine if currently in a transaction.

202. TRANSTART statement Marks the beginning of a transaction.

203. TRANSEND statement Marks the end of a successfully completed transaction.

204. TRIM function Removes characters from a string.

205. TRIMB function Removes trailing blanks.

206. TRIMF function Removes leading blanks.

207. UNASSIGNED function Returns Boolean result for variable assignment.

208. UNLOCK statement Releases a previously locked execution lock.

209. UPCASE function Converts all lowercase characters in an expression to uppercase.

210. WAKE statement Wakes a suspended process which has executed a pause statement.

211. WEOF statement Writes an end of file mark on an attached tape device.

212. WEOFSEQ statement Writes end of file mark on a file opened for sequential access.

213. WRITE statement Writes a record to a previously opened file.

214. WRITELIST statement Writes a list to the stored list file.

215. WRITESEQ statement Writes data to a file opened for sequential access.

216. WRITET statement Writes data to a tape device.

217. WRITEU statement Writes a record to a previously opened file preserving locks.

218. WRITEV statement Writes a record field to a previously opened file.

219. WRITEVU statement Writes a record field to a previously opened file preserving locks.

220. XLATE function Retrieves a field from a file.

221. XTD function Returns the decimal representation of a hexadecimal expression.

http://www.jbase.com/support/documentation.html

ftp://ftp.jbase.com/pdf/Manuals/41manuals/jbasic.pdf

4. Universe:

UniVerse BASIC:

UniVerse BASIC is a business-oriented programming language

·        Statements

·        Built-in functions

·        Database management capabilities of UniVerse.

BASIC program

¦         Source code

¦         Object code

Variable: 64 characters, begin with an alphabetic character and can include alphanumeric

            characters, periods ( . ), dollar signs ( $ ), underscores ( _ )  and percent signs ( % ).

Functions: Modularity and Reusability

¦         Numeric functions:

¦         String functions:

Keyword : The case of a keyword is ignored; for example, READU and readu are the same

                   keyword.

Subroutines: Modularity and Reusability

¦         GOSUB statement: internal subroutine that can be embedded in a program.

¦         CALL statement: be external to the program. Common processes are often kept as external subroutines.

A BASIC source line has the following syntax:

¦         [ label ] statement [ ; statement … ] <Return>

¦         Maximum 256 characters and can extend over more than one physical line.

¦         Comments must begin with one of the following:

¦         REM * ! $*

¦         Statement Labels

¦         The label must be first on the line—that is, the label cannot begin with a space.

¦         label consists of a string of characters followed by a colon.

¦         label is completely numeric, the colon is optional.

¦         Spaces or Tabs:

¦         In a program line, spaces or tabs that are not part of a data item are ignored.

¦         improve the program’s appearance and readability.

¦         Newlines and Sequential File I/O

¦         Newline : defines where a line ends

¦         Windows platforms, a newline consists of the character sequence RETURN + LINEFEED. Sequential file I/O

¦         Special Characters:

1.      Space

2.      Tab

3.      = : Equal sign or assignment symbol

4.      + : Plus sign

5.      - : Minus sign

6.      *: Asterisk, multiplication symbol, or nonexecutable comment

7.      **:  Exponentiation

8.      / : Slash or division symbol

9.      ^ : Up-arrow or exponentiation symbol

10.  ( : Left parenthesis

11.  ) : Right parenthesis

12.  # : Number (pound or hash) sign or not equal to

13.  $ : Dollar sign

14.  ! : Exclamation point or non executable comment

15.  [ : Left bracket

16.  ] : Right bracket

17.  , Comma (not permitted in numeric data)

18.  . Period or decimal point

19.  ’ : Single quotation mark or apostrophe

20.  ; : Semicolon

21.  : : Colon or concatenation

22.  & : Ampersand (and)

23.  < : Less than (left angle bracket)

24.  : Greater than (right angle bracket)

25.  @ : At sign

26.  _ : Underscore

¦         Storing Programs:

¦         BASIC programs are stored as records in type 1 or type 19 files.

¦         Record IDs must follow the conventions for type 1 and type 19 files.

¦         Editing Programs in UniVerse:

¦         program PAYROLL is stored as a record in the file BP. To edit it with vi, enter the following command:

>VI BP/PAYROLL

¦         Getting Started

¦         CREATE.FILE command to create a type 1 or type 19 UniVerse file to store your BASIC program source.

¦         Use the UniVerse Editor or some other editor to create the source for your  BASIC program as a record in the file .

¦         Use the BASIC command to compile your program.

¦         Execute it using the RUN command.

¦         RAID command to debug your program.

·        Types of Data:

·        Character string:

·        Character constant enclose in single or double quotation marks, or backslashes ( \ ).

·        Empty string:

' ' or " " or \\

·        Numeric:

·        15 decimal digits of precision.

·        unknown (that is, the null value).

·        @NULL.

·        Variables

·        Unassigned :

·        Any attempt to use an unassigned variable produces an error message.

·        A string, which can be an alphanumeric character string, a number, or a dynamic array

·        A number, which can be fixed-point (an integer) or floating-point

·        The null value

·        A dimensioned array (that is, a vector or matrix):

·        Each value in a dimensioned array is called an element of the array.

·        A one-dimensional array is called a vector. A(1)

·        A two-dimensional array is called a matrix.

·         Dynamic

·        Field / Attribute / Dynamic Array  consist of:

o       F Field mark.

o       V Value mark

·        S Subvalue mark.

·        T Text mark. For example, the text mark ( T ) in the following string delimits elements 4 and 5/

FLD1FVAL1VSUBV1SSUBV2

1F2S3V4T5

·        A subroutine name

·        A file

·        A select list

·        System variables called @variables.

To be continued ….

http://www-306.ibm.com/software/data/u2/universe/ 

Click to go to  Home Page