![]() | ||
| VISUALPQL | ![]() ![]() ![]() ![]() | Functions |
PROGRAM. The functions are listed by type and in alphabetical order with a full explanation of each.
For a detailed description of all functions, see the alphabetic list of functions.
Returns the absolute value of X.
Returns the arc cosine of X. The result is in the range 0 to PI
radians. Values of X outside the range
-1<X>1 return undefined.
Returns the truncated value of X. If
Returns the natural logarithm (base e) of X. Values less than or
equal to zero return undefined.
Returns the base 10 logarithm of X. Values less than or equal to
zero return undefined.
Returns the remainder of X divided by Y. If Y is zero, undefined is
returned.
Returns SIR2002 application directory. That is the directory where the SIR executables are installed.
See
Returns the number of dimensions for specified local array variable.
Returns the start value for the specified dimension for specified local array variable (normally 1 unless array specified to start at different value).
Returns the size of the specified dimension for specified local array variable.
See
Returns the arc sine of X. The result is in the range
-
Returns the arctangent of X. The result is in the range
-
Returns the nth Attribute name (SYSTEM(52) = attribute count).
Returns the nth Buffer name (SYSTEM(56) = buffer count).
Capitalises the first alphabetic character of the string and the
first alphabetic character following a blank. All other characters remain
unedited. For example:
Changes the lock type for the current Case (CIR) and attempts to read
the current CIR from the database. See
1 = Exclusive
Returns an integer corresponding to the category in categorical
variable A that B matches. A and B may be variables, string constants or
expressions. Returns a zero if no match is found.
Returns a string corresponding to the current value of the specified
categorical variable.
Returns the date integer equivalent to the date string X which may be a string constant, variable or expression. The date format is a string constant consisting of a combination of the letters M(month), D(day), Y(year) and I(ignore). If the month or day field is omitted, the assumed value is 1. If fewer than four Y's are specified, the following applies:
With three Y's, the millennium is taken as 1nnn for values above 583 and 2nnn for values below this:
With two Y's, if the year is greater than the year specified in the
With a single Y, the decade is taken as this decade.
If a date earlier than October 15, 1582 is specified, undefined is returned. Example:
Returns string strY centred in a string X characters in length.
Example:
Used when dealing with CGI from webserver. Puts value of CGI parameter into named buffer. Returns number of lines. Parameters are string expressions.
Used when dealing with CGI from webserver. Puts value of server variable into named buffer. Returns number of lines. Parameters are string expressions.
Used when dealing with CGI from webserver. Returns named parameter value in string variable. Parameter name is a string expression.
Used when dealing with CGI from webserver. Returns named server variable value in string variable. Server variable name is a string expression.
Returns a single character. The character returned is the character
whose internal value is N. (See the
Counts the number of values in a list that exist (not missing or
undefined). There may be up to 128 numeric variables in the list. Returns zero
(0) if no values exist.
Returns the number of values of X found during a
Client/Server function. Returns a count of columns created by the execute.
Client/Server function. Returns the label of a specific column created by the execute.
Client/Server function. Returns the length of a specific string column created by the execute.
Client/Server function. Returns the name of a specific column created by the execute.
Client/Server function. Returns the type of a specific column
created by the execute. This is one of the following:
A timestamp string is a formatted 18 byte string containing a combination date/time as follows:
Client/Server function. Returns the numeric value of a
specific column created by the execute. This does not have to be the same type as returned by
Client/Server function. Returns the string value of a
specific column created by the execute.
Places a comma between every third digit to the left of a decimal point (actual or implied) in a string with a numeric form. For example,
Returns the trigonometric cosine of X, where X is measured in
radians.
Returns the number of records for record type X within the current
case.
Returns the number of seconds from midnight to the given time.
Specify a time string X and a time format consisting of the letters H (hours), M
(minutes), S (seconds) and I (ignore). The time, X, can be a string constant,
variable, or expression. If the hour, minute or second field is omitted, the
assumed value is zero. For example:
Returns the current directory.
Returns a date string equivalent to the date integer X formatted
according to the date format which is a string constant using the letters
M(month), D(day), Y(year) and W(Day of week). All other characters are passed
directly to the result string. One or two Ms result in the month number, three
or more result in the first n letters of the month name. The case of the letters
in the date format (upper or lower), specifies the case of strings returned. For
example,
Returns a string with the date map of the specified date variable. If the record number (rtnum) is negative, the function applies to a summary variable. The varname is an expression. If this is a constant, enclose the name in single quotes. Undefined is returned if the variable is unknown or is not a date variable. For example, if the variable BIRTHDAY in record type one has the date map "MM DD YY" defined in the schema, then DATESTR equals "MM DD YY".
Returns a 27-character string containing the current date and time.
The string is composed of the following substrings:
The two arguments N1 and N are constants in the range 1 to 27 that select a substring of the 27-character string. For example, suppose the current date is May 25, 2000, and the time is 1:05 PM; the day is Thursday.
Returns name of nth index.
Returns number of record type indexed by nth index.
Returns number of indexes on default database.
Name of nth variable in nth index plus ASC/DESC and UPPER.
Returns 1 if index is unique.
Returns number of variables in nth index.
Returns a string with the name of the nth attached database. If n is zero, returns the name of the default database.
Returns 1 if a case structured database or 0 if caseless.
Returns the default family name.
Returns the default member name.
Deletes the named directory. Returns 0 for success.
Deletes the named file (use filename not attribute). Returns 0 for success.
Deletes the client from master. Get the client id from
Deletes a global. The string expression may be the global name enclosed in quotes or a string variable.
The
Returns the operating system filename of an attribute. The
attribute may be a variable or constant.
EDIT applies an edit string to data to produce the output. The edit
string is made up of circumflexes ( ^ ), which represent a character of
the input string, and any other characters to insert. Example:
Returns the name of the current text editor.
Displays an error box with the specified text and waits for
acknowledgment.
Returns 1 if X exists, 0 if X is missing or undefined. To test
several numeric variables for existence, use the
Returns the value of e raised to the X power. e is the
constant 2.71828.
Returns the nth family name in the default procfile. (
Tests two floating point numbers for equality within a limit of accuracy. The function returns 0 if approximately equal, 1 if unequal. For example, if the exponent was -3, the numbers would be equal if within .001.
Counts the files in the directory given by name. Specify a mask like '*.pql' for the count of those files in the current directory.
Displays a file browse box for user to choose existing file. Returns zero length string if user cancels.
Tests if file exists. Returns -1 if name is a directory; 0 if no such name; 1 if file exists.
Returns the nth file name in the given directory (or mask).
Displays a file browse box for user to choose output file. Returns zero length string if user cancels.
Returns various system specific data about a named file.
Returns SIR times or dates about a file
Replaces all blank characters in strX with the first character of string argument strY. The length of strX does not change. For example:
Search dialog choice or list for text and return position. Can start from partway through.
Converts X to a string.
Returns the first value in the list of up to 128 numeric variables
that is not missing or undefined.
Returns the first value of X encountered during a
Returns the height of button control (for positioning).
Returns the height of choice control( for positioning).
Returns the height of check control( for positioning).
Returns time (from Master) of difference file copy interval in minutes.
Returns the value of the named environment variable.
Client/server function. Returns the oldest error posted for this application and deletes the message. Returns a zero length string if no messages. Errors are not specific to a connection or statement, rather they are posted for this instance of SIR2002 and, if errors are not retrieved when an error condition occurs, multiple error messages may be waiting. One logical error may also give rise to multiple error messages from the server.
Gets floating point as per
Returns id of control with focus.
Returns check or radio state.
Returns floating point from a list.
Returns integer of item from a list.
Gets integer as per
Returns text of item from a list.
Returns the height of labels ( for positioning).
Gets the text from a line in a multi-line text control.
Returns the height of the maximum single line control ( for positioning).
Returns tcp/ip address for client from master.
Returns check state from menu item.
Returns id for nth client from master.
Returns time of last message for nth client from master.
Returns time of log on for nth client from master.
Returns name of nth database from master.
Returns pos of nth selected item from multiple selection.
Returns number of items in choice or list.
Gets number of lines in multi-line text.
Returns number of items selected in multiple selection.
Returns pos of current selection in list or choice or keyboard focus in multiple selection.
Returns the height of radio control( for positioning).
Returns the size of the row step ( for positioning).
Gets text from edit and from highlighted item in choice or list. (Gets label text from label, button, check and radio!).
Returns the height of text control ( for positioning).
Assigns a numeric value to a global variable. The first argument is the name of the global variable, the second argument is the numeric expression (or variable name). For example: To assign the global variable RT the value 25.5:
Assigns a string value to a global variable. The first argument is
the name of the global variable, the second argument is the string expression
(or variable name). For example: To assign the global variable TEMP the value
JOE SMITH:
0 if the assignment was made.
-1 if the first argument is not a valid global variable name.
-2 if the second argument is missing.
Do not try to use the value of globals set by
Returns the name of the nth global variable. (SYSTEM(53) = Global Count).
Invokes the HELP system, beginning with the specified help page.
The page must be in html format in the help directory. The page name can
contain directory names using forward slashes to delimit. Enclose the
name in quotes. The system will convert this to a file name prefixed with a path
pointing to the help directory and suffixed with the file
extension
Returns a numeric value equivalent to the position in the character
collating sequence of the first character in string C. The character collating
sequence for a given computer is the set of numeric codes used for internal
character representation (such as ASCII or EBCDIC).
Returns the status of a gui element.
Returns whether the journalling option is on (1) or off (0) for the
database.
Converts a "date integer", X, into an 12-character string of the form
'MMM DD, YYYY'.
Returns a "date integer" where the three numeric arguments X, Y and
Z, stand for month, day and year, respectively. A "date integer" is the number
of days since the start of the Gregorian calendar on October 15, 1582. If Z is
in the range 0 - 99, the year is 1900 + Z. If Z is in the range 100 - 999,
the year is 1000 + Z. A value of undefined is returned if a date earlier than
October 15, 1582 is specified by X, Y and Z. For example:
Returns the name of the specified keyfield for the specified record
type.
Returns "A" or "D" for the sort order of the specified keyfield. The
variable name argument is an expression.
Returns an integer value that is the length, in characters, of the
string strX, leading and trailing blanks included.
See
See
See
Returns the string with all characters converted to lower case.
Trigonometric Functions
ACOS
arc cosine (also ARCOS)ASIN
arc sine (also ARSIN)ATAN
arc tangentCOS
trigonometric cosineSIN
trigonometric sineTAN
trigonometric tangentTANH
hyperbolic tangent
Mathematical Functions
ABS
absolute valueAINT
truncation (also TRUNC)ALOG
natural logarithm (also LN or LOG)ALOG10
base 10 logarithm (also LG10 or LOG10)AMOD
remainder of division (also MOD)EXP
exponentiation (base e)FEQ
compares two floating point numbers within a toleranceRAND
random uniform number (0-1) (also RANF)REAL4
returns the REAL*4 value of a
REAL*8 numberRND
roundingSIGN
transfer of signSQRT
square rootTRUNC
truncates least significant digits
Argument List Functions
CNT
count the number of arguments that are not missingFST
return the first argument that is not missingLST
return the last argument that is not missingMAX
return the largest argument that is not missingMEAN
compute the mean of the arguments that are not missingMIN
return the smallest argument that is not missingSTDEV
compute the standard deviation of nonmissing valuesSUM
compute the sum of all arguments that are not missing
Across Record Functions
The "across records" functions may only appear in PROCESS REC or PROCESS ROW blocks . They compute a result based on a single variable in each record or row processed in the PROCESS REC or PROCESS ROW block. They ignore values that are missing or undefined. Records that contain missing or undefined values are not counted nor are they used in the calculation of averages.CNTR counts the number of times the variable occurs.FSTR returns the first value processed.LSTR returns the last value processedMAXR returns the largest value processedMEANR computes the average value (SUMR / CNTR)MINR returns the smallest valueSTDEVR
computes the standard deviationSUMR
computes the sum of values
Date and Time Functions
CDATE
converts a date string to a date integerCTIME
converts a time string to a time integerDATEC
converts a date integer to a date stringDATET
returns the current date and time as a stringJULC
converts a date integer to a date stringJULN
converts day, month, and year to a date integerNOW
returns the current time as a time integerTIME
converts hours, minutes, and seconds to a time integerTIMEC
converts a time integer to a time stringTODAY
returns current date as a date integer
Global Functions
DGLOBAL
Deletes a global variableDSN
Returns a full filename associated with an attributeGLOBALN
Assigns a numeric value to a global variableGLOBALS
Assigns a string value to a global variableNARG
Returns a numeric argument from run parameter listNGLOBAL
Returns the value of a global numeric variableSARG
Returns a string argument from run parameter listSGLOBAL
Returns the value of a global string variable
String Functions
CAPITAL
Capitalises the first letter of each word in stringCATINT
Returns an integer value of a categorical variableCATSTR
Returns a string value of a categorical variableCENTER
Returns a centred stringCHAR
Returns the character with the numeric internal valueCOMMA
Separates thousands by inserting commas in a numeric stringEDIT
Applies editing template to a data stringFILL
Replaces blanks in stringFORMAT
Converts a number to a stringICHAR
Returns the numeric internal value of a characterLEN
Returns the string length in charactersLOWER
Converts all characters in string to lower caseNUMBR
Converts a string to a numberPACK
Returns the string with compressed blanksPAD
Pads a string with character to specified lengthPATTERN
Returns whether a pattern is found in a stringPFORMAT
Converts a number to a formatted stringPICTURE
Validates a string by comparing to a pictureREPLACE
Replaces substrings with a specified stringREVERSE
Returns a string spelled backwardsSBST
Returns a substring of a stringSGET
Returns the value of a string variableSPREAD
Returns a string with single blanks between charactersSPUT
Stores string value in string variableSRST
Searches for a substringSUBSTR
Returns a substring of a stringTRIM
Trims trailing blanks from a stringTRIML
Deletes blanks from the leftTRIMLR
Deletes blanks from the left and the rightTRIMR
Deletes blanks from the rightUPPER
Converts all characters of string to upper caseVARGET
Gets value from string variable where variable name is an expression.VARPUT
Puts value into string variable where variable name is an expression.
Concurrent Functions
CASELOCK
Change lock type for and retry current CIR (also CIRLOCK)RECLOCK
Change lock type for and retry current recordSYSTEM(36)
Whether current record is lockedSYSTEM(37)
Whether current CIR is lockedSYSTEM(38)
Whether a concurrent session using MasterSYSTEM(39)
Returns the ordinal number of the default database. No Database returns 0
Miscellaneous Functions
ARRDIMN
Returns number of dimensions of a local array variableARRDIMST
Returns start value of a dimension of a local array variableARRDIMSZ
Returns number of entries of a dimension of a local array variableEXISTS
Indicates if variable exists (not missing or undefined)ERROR
Displays a text message error boxHELP
Invokes the Help systemMISNUM
Returns the "type" of missing or undefined valueMISSING
Returns the original value for missing valuesMSGTXT
Returns the error message text for an error numberPROGRESS
Controls the display of a progress barSOUND
Produces a toneSRCH
Searches a table of valuesSYSTEM
Returns various system values such as cpu time used, whether a
database access has been successful, etc.YESNO
Displays a text question box and returns response
Session Functions
APPDIR Returns application directoryATTRNAME Attribute n name (str)BUFFNAME Buffer n nameCURDIR Returns current directoryDEFFAM Default family (name)DEFMEM Default member (name)DELDIR Deletes the named directoryDELFILE Deletes the named fileEDITNAME Editor nameFAMNAME Family n name (string)FILECNT Returns a count of files in named directoryFILEIN Browses for a fileFILEIS Returns if name exists as file or directoryFILEN Returns the nth file in directoryFILEOUT Browses for an output fileFILESTAT Returns various data about named file e.g. Date/time of creation/access, size of file, etc. Times and dates are in system formatFILETIME Returns various data about times of creation/access of file with times and dates converted to SIR formatsGETENV Gets a string environment variable valueGLOBNAME Gets the numeric value from named globalMAKEDIR Creates a directoryMEMCOUNT Count of members in familyMEMNAME Name of nth memberNSUBDIR Name of nth subdirectoryOUTFNAME Name of current output filePAGELEN Length of output pagePAGENO Current output page numberPAGEWIDWidth of output pagePROCFILE Procedure file filenamePROCNAME Procedure file attribute nameRACCESS Returns the read access level of userRNMFILE Renames a fileSETDIR Sets current directorySETRC Sets a return codeSUBDIR Concatenates a subdirectory to existing directory path in correct system specific mannerSYSTEM Returns various "system" status valuesUPGET Gets User Preference (from INI file)UPSET Sets User Preference (in INI file) WACCESS Returns the write access level of userWINCNT Returns the number of lines in the output windowWINLIN Returns the nth line from the output windowWINMOVE Moves and resizes the main windowWINPOS Moves to line in output windowWINSELL Returns selected line from output windowWINSELP Returns position in line selected from output window
Schema & Database Functions
COUNT Number of records of a given type in the current caseDATEMAP
Returns the date map of a date variableDBINDN Name of nth index on default databaseDBINDR Number of record type indexedDBINDS Number of indexes on default databaseDBINDT Name of the nth variable in index followed by either ASC or DESC and UPPER if uppercase indexDBINDU Returns 1 if index is uniqueDBINDV Number of variables in indexDBNAME Name of the nth databaseDBTYPE
Returns database type, case or caselessJOUFLAG
Returns whether journalling is on for default databaseKEYNAME
Returns name of a record type key fieldKEYORDER
Returns sort order ("A" or "D") of a key fieldMAXRECS
Returns the maximum allowed number of a particular record typeMISS
Returns the original (string) for missing values (0 - 3) for a variableMKEYSIZE
Returns the size of the largest record key in the databaseMRECSIZE
Returns size of the largest record in the databaseNKEYS
Returns the number of key fields for a record typeNLABELS
Synonym for NVALLAB. Returns the number of variable value labels defined for a variableNMAX
Returns the maximum value of a numeric variable rangeNMIN
Returns the minimum value of a numeric variable rangeNOFCASES
Returns the maximum number of cases for the databaseNRECS
Returns the maximum number of record types for the databaseNUMCASES
Returns the number of cases in the databaseNUMRECS
Returns the number of records of a given type in the databaseNVALID
Returns the number of defined valid values for a variableNVALLAB
Returns the number of variable value labels defined for a variableNVARLAB
Returns the number of lines of variable labels defined for a variableNVARS
Returns the number of variables for the specified record typeNVARSC
Returns the number of variables including common vars for the specified record typeNVVAL
Returns the nth valid value of a numeric variableRECDOC
Returns the nth line of documentation for a recordRECDOCN
Returns the number of lines of documentation for a recordRECLEVEL
Returns the update level at which a record was last written to databaseRECNAME
Returns the name of the record typeRECNUM
Returns the number of the record nameRECSIZE
Returns the record size of a specified record typeRKEYSIZE
Returns the key size of a specified record typeRRECSEC
Returns the read security level of a record typeRVARSEC
Returns the read security level of a variableSMAX
Returns the maximum value of a string variable rangeSMIN
Returns the minimum value of a string variable rangeSTATTYPE
Returns whether a numeric variable is defined as observation, control
or neitherSVVAL
Returns the nth defined string valid value of a variableTIMEMAP
Returns the time map string format of a time variableUPDLEVEL
Returns the current update level of databaseVALIDATE
Validates a value of a database variable against schemaVALLAB
Returns the value label for the current value of a variableVALLABSC
Returns the value label for a specified value of a variableVALLABSN
Returns the nth value label of a variableVALLABSP
Returns the number (nth) of the value label associated with a specified value of a variable.VALLABSV
Returns a string which is the nth value associated with value labels of a variable.VARLAB
Returns the variable label for a variableVARLABSC
Returns the variable label of a specified variable (first 40 chs)VARLABSN
Returns the nth line of a variable label of a specified variableVARNAME
Returns the name of the variable using counts excluding common vars.VARNAMEC
Returns the name of the variable using counts including common vars.VARPOSIT
Returns the input position of the variableVARTYPE
Returns the storage type of a variable (string or numeric)VFORMAT
Returns a string representing the variable input formatVTYPE
Returns the SIR data type of a variable (7 types)WRECSEC
Returns the write security level of a record typeWVARSEC
Returns the write security level of a variable
Tabfile & Table Functions
TABINDNIndex name of nth indexTABINDS Number of indexes on nth tableTABINDT Variable name and seq of nth variable on indexTABINDU If nth index is uniqueTABINDV Number of variables in nth indexTABNAME Name of nth tableTABRECS Number of rows on nth tableTABVARS Number of cols (variables) in nth tableTABVINFN Various numeric data about columnTABVINFS Various string data about columnTABVNAME Column nameTABVRANG Value of valid/missing range for columnTABVTYPE Column typeTABVVALI Validates table columnTABVVLAB Value label for table columnTABVVVAL Value label value for table columnTFACCESS Access a(uto),r(ead) w(rite) of nth tabfileTFATTR Internal attribute name of nth tabfileTFCOUNT Number of connected tabfilesTFFILE Filename of nth tabfileTFGRNAME Group name of nth tabfileTFGRPW Group password of nth tabfileTFJNNAME Journal name of nth tabfileTFNAME Name of nth tabfileTFTABS Number of tables on nth tabfileTFUSNAME User name of nth tabfileTFUSPW User password of nth tabfile
Read/Write Functions
NGET
Gets the value of a numeric variableNPUT
Stores a value in a numeric variableNREAD
Pops up a box on the screen with a prompt and returns a number from the userSGET
Gets the value of a string variableSPUT
Stores a value in a string variableSREAD
Pops up a box on the screen with a prompt and returns a string from the userTWRITE
Writes a string to the scrolled output window
Menu Functions
GETMCHK Tests the state of a menu or toolbar itemDialog
FINDITEM
Search list for textGETBTNH Returns the height of button controlGETCHCH Returns the height of choice controlGETCHKH Returns the height of check controlGETFLT Gets floating point as per GETTXTGETFOCUS Returns id of control with focusGETICHK Returns check or radio stateGETIFLT Returns floating point from a listGETIINT Returns integer of item from a listGETINT Gets integer as per GETTXT. 0 if not integerGETITXT Returns text of item from a listGETLBLH Returns the height of labelsGETLTXT Gets the text from a line in a multi-line text controlGETMAXCH Returns the height of the maximum single line controlGETMSEL Returns pos of nth selected item from multiple selectionGETNITEM Returns number of items in choice or listGETNLINE Gets number of lines in multi-line text controlGETNSEL Returns number of items selected in multiple selectionGETPOS Returns pos of current selection in list or choice or keyboard focus in multiple selectionGETRADH Returns the height of radio controlGETRSTEP Returns the size of the row stepGETTXT Gets text from edit and from highlighted item in choice or list. (Gets label text from label, button, check and radio)GETTXTH Returns the height of text controlIDSTATUS Returns the status of a controlSETPOS Sets a position in a gui multi-line itemDialog Editor
DITEM...
There are a number of functions which return information about items on a DEDIT dialog, that is a dialog used for screen painting. These functions are all named DITEMxxx.
Client Server Functions
COLCOUNT Returns a count of columns created by the executeCOLLABEL Returns the label of a specific column created by the executeCOLLEN Returns the length of a specific string column created by the executeCOLNAME Returns the name of a specific column created by the executeCOLTYPE Returns the type of a specific column created by the executeCOLVALN Returns the numeric value of a specific column created by the executeCOLVALS Returns the string value of a specific column created by the executeDELMCLID Deletes the client from Master.GETDFC Returns the difference file copy interval from Master.GETERR Returns the oldest error posted for this application and deletes the message.GETMCADD Returns the client tcp/ip address from Master.GETMCLID Returns the nth client id from Master.GETMCLST Returns the time of last message for nth client from Master.GETMCON Returns the time of log on for nth client from Master.GETMDBN Returns the name for nth database from Master.NEXTROW Steps through the rows one at a timeODBCTABS Produce list of tables on the data sourceODBCCOLS Produce list of columns from the named table on the data sourceROWCOUNT
Count of rows created by the executeSETDFC Sets the difference file copy interval for Master.
CGI Functions
Buffer functions return number of lines. All parameters are string expressions.CGIBUFPN
Get buffer of value of parameterCGIBUFPN Get buffer of value of parameterCGIBUFSV Get buffer of value of server variableCGIVARPN Get parameter valueCGIVARSV Get server variable value
List of Functions from A to Z
A B C D
E F G H
I J K L
M N O P
Q R S T
U V W X
Y ZABSnum = ABS( X ) ACOS num = ACOS( X )
AINT
num = AINT( X [,n] )n is omitted or 0,
truncates to an integer value. If n is specified, truncates to that
power of 10. e.g. AINT (1266,2) truncates to 1200,
AINT(1.266,-2) truncates to 1.26.ALOG
num = ALOG( X )ALOG10 num = ALOG10( X )AMOD num = AMOD(X , Y)APPDIR str = APPDIR(0)ARCOS num = ARCOS( X )ACOS function.ARRDIMN num = ARRDIMN(array_name_exp)ARRDIMST num = ARRDIMST(array_name_exp,dim)ARRDIMSZ num = ARRDIMSZ(array_name_exp,dim)ARSIN num = ARSIN( X )ASIN function.ASIN num = ASIN( X )pi/2 to +pi/2 radians. Values outside the
range-1<X>1 return undefined.ATAN num = ATAN( X )pi/2 to +pi/2 radians.ATTRNAMEstr = ATTRNAME(n)BUFFNAMEstr = BUFFNAME(n)CAPITAL str = CAPITAL( str )
NAME = 'this is the first day of the week'
NAME = CAPITAL(NAME)
Returns: This Is The First Day Of The Week
CASELOCK num = CASELOCK(locktype)SYSTEM(37) function to
determine if current CIR is locked. The locktype codes are
(any other values set concurrent read):
2 = Concurrent Read
3 = Concurrent Write
4 = Protected Read
5 = Protected Write
6 = Exclusive CATINT num = CATINT(A, B)CATSTR str = CATSTR(A)CDATE num = CDATE(X , date format)CENY parameter, the century is taken as the century specified in the parameter otherwise the century is one greater.
INTDATE = CDATE('06/03/94', 'MMIDDIYY')CENTER str = CENTER(X , strY)RESULT = CENTER(9, 'ABC')
returns: " ABC ".
CGIBUFPNn = CGIBUFPN(buf,pn)CGIBUFSVn = CGIBUFSV(buf,sv)CGIVARPNstr = CGIVARPN(pn)CGIVARSVstr = CGIVARSV(sv)CHAR str = CHAR(N)ICHAR function.) If N is
larger than 255, N is divided by 256 and the remainder is taken. This gives the
set of standard characters. If N is missing, a null string is returned (length 0).
See CIRLOCK CASELOCK functionCNT num = CNT(X1 , X,..... , Xn)CNTR num = CNTR( X )PROCESS
REC or PROCESS ROWS loop that are not missing or
undefined. Returns zero if all values are missing or undefined.COLCOUNT num = COLCOUNT (conid,statid)COLLABEL str = COLLABEL (conid,statid,colno)COLLEN num = COLLEN (conid,statid,colno)COLNAME str = COLNAME (conid,statid,colno)COLTYPE num = COLTYPE (conid,statid,colno)
1 = String
2 = Timestamp string
3 = Date
4 = Time
5 = Integer
6 = R4
7 = R8
8 = Scaled Integer
YYYYMMDDHHMMSStttt where YYYY is the year, MM is the month, DD is the day number, HH is the 24 hour number, MM is the minutes, SS is the seconds and tttt is the thousandths of a
second. Any of these components may be zero.COLVALN num = COLVALN (conid,statid,rowno,colno)COLTYPE. e.g. Integers can be assigned to a real.COLVALS str = COLVALS (conid,statid,rowno,colno)COMMA str = COMMA( str )COMMA ('4500000') returns '4,500,000'.COS num = COS( X )COUNT num = COUNT( X )CTIME num = CTIME(X , time format)WINTIME = CTIME('18:36:45', 'HHIMMISS')CURDIRstr = CURDIR(0)DATEC str = DATEC(X , date format)DATEC(XBEG, 'Www, Mmm DDth, YYYY') produces a
result such as "Thu, May 25th, 2000DATEMAP str = DATEMAP (rtnum, varname_exp)DATESTR = DATEMAP (1, 'BIRTHDAY')DATET str = DATET(N1 , N)Date
1- 3 Day of the week (SUN,MON,etc.)
4- 5 Comma and blank
6- 8 Month of the year (JAN,FEB,etc.)
9 Blank
10-11 Day of the month
12-13 Comma and blank
14-17 Year
18-19 Comma and blank
Time
20-21 Hour (1 to 12)
22 Period
23-24 Minutes
25 Blank
26-27 AM or PM
PROGRAM
TODATE = DATET (6, 17)
NOWTIME = DATET(20, 27)
WKDAY = DATET(1, 3)
WRITE TODATE NOWTIME WKDAY
END PROGRAM
OUTPUT: MAY 25, 2000 01.05 PM THU
DBINDN str = DBINDN (index)DBINDR n = DBINDR (index)DBINDS n = DBINDS (0)DBINDT str = DBINDT (index,varno)DBINDU n = DBINDU (index)DBINDV n = DBINDV (index)DBNAME str = DBNAME (n)DBTYPEnum = DBTYPE (0)DEFFAMstr = DEFFAM(0)DEFMEMstr = DEFMEM(0)DELDIRn = DELDIR(dir_name)DELFILEn = DELFILE(file_name)DELMCLIDstr = DELMCLID(id,password)GETMCLID. Specify a password as a string variable or string in quotes if the Master is started with a password.DGLOBAL num = DGLOBAL(string_exp)DITEM DITEM...DITEM series of functions all pertain to the Dialog Editor which is used to construct screen painting applications.DITEMCOL num = DITEMCOL(n) Returns the column the nth DEDIT item is positioned at.DITEMH num = DITEMH(n) Returns the height of the nth DEDIT item.DITEMID num = DITEMID(n)Returns the id of the nth DEDIT item.DITEMROW num = DITEMROW(n) Returns the row the nth DEDIT item is positioned at.DITEMS num = DITEMS(0) Returns the number of items on DEDIT dialog.DITEMSEL num = DITEMSEL(0) Returns the number of items selected on DEDIT dialog.DITEMSID num = DITEMSID(n) Returns the id of the nth selected DEDIT item.DITEMTXT str = DITEMTXT(n) Returns the text of the nth DEDIT item.DITEMTYP num = DITEMTYP(n) Returns the type of control of the nth DEDIT item.DITEMW num = DITEMW(n) Returns the width of the nth DEDIT item.DSN str = DSN( string_exp )EDIT output_str = EDIT( input_str,edit_str )
PROGRAM
SSN = EDIT('123456789','^^^-^^-^^^^')
WRITE SSN STOP
END PROGRAM
Output: 123-45-6789EDITNAMEstr = EDITNAME(0)ERROR num = ERROR( strX )EXISTS num = EXISTS( X )CNT function.EXP num = EXP( X )FAMNAME str = FAMNAME(n)SYSTEM(57) = Count of families). FEQstr = FEQ(real1,real2,exponent)FILECNTn = FILECNT(str)FILEINstr = FILEIN(filter,default_extension)FILEISn = FILEIS(file_name_string)FILENstr = FILEN(string,n)FILEOUTstr = FILEOUT(filter,default_extension)FILESTATn = FILESTAT(filename_string,type_of_data)
Type of data
1 gid Numeric identifier of group that owns file (UNIX-specific)
2 st_atime Time of last access of file. (system date/time integer)
3 st_ctime Time of creation of file. (system date/time integer)
4 st_dev Drive number of the disk containing the file (same as st_rdev).
5 st_ino Number of the information node (the inode) for the file (UNIX-specific).
6 st_mode Bit mask for file-mode information. The _S_IFDIR bit is set if path specifies a directory; the _S_IFREG bit is set if path specifies an ordinary file or a device. User read/write bits are set according to the file's permission mode; user execute bits are set according to the filename extension.
7 st_mtime Time of last modification of file. (system date/time integer)
8 st_nlink Always 1 on non-NTFS file systems.
9 st_rdev Drive number of the disk containing the file (same as st_dev).
10 st_size Size of the file in bytes; (Can exceed I4 in size)
11 uid Numeric identifier of user who owns file (UNIX-specific)FILETIMEn = FILETIME(filename_string,type_of_data)
Type of data
1 Time of last access of file. (SIR time integer)
2 Date of last access of file. (SIR date integer)
3 Time of creation of file. (SIR time integer)
4 Date of creation of file. (SIR date integer)
5 Time of last modification of file. (SIR time integer)
6 Date of last modification of file. (SIR date integer)FILLstr = FILL(strX , strY)
RESULT = FILL (' $100.00', '*')
returns "**$100.00"FINDITEMnum = FINDITEM (id,pos,txt)FORMAT str = FORMAT( X [,W [,D ]] )FORMAT( X ) returns free-field format as wide as necessary to fit the value. FORMAT(X,W) returns a free field format of width W. FORMAT(X,W,D) returns a number with D decimal places in width W. X, W and D, can be variables, constants or expressions. W, if specified, must be greater than or equal to zero. D, if specified, can be -1 or greater than or equal to zero. -1 is equivalent to not specifying a value (free field format). If D is specified, W must be greater than D. For example:
STR = FORMAT (1.3) returns '1.3'
STR = FORMAT (1.3, 4) returns ' 1.3'
STR = FORMAT (1.3, 5, 2) returns ' 1.30'
FST num = FST( X1, X.., Xn )FSTR num = FSTR( X )PROCESS REC or PROCESS ROWS loop that is not missing or undefined.GETBTNHnum = GETBTNH (0)GETCHCHnum = GETCHCH (0) GETCHKHnum = GETCHKH (0)GETDFC n = GETDFC(0)GETENV str = GETENV(variable_str)
COMPUTE OSPATH = GETENV('PATH')
GETERRstr = GETERR (0)GETFLTdbl = GETFLT (id)GETTXT. Returns 0.0 if not f.p. number.GETFOCUSnum = GETFOCUS (0)GETICHKnum = GETICHK (id)GETIFLTdbl = GETIFLT (id,pos)GETIINTint = GETIINT (id,pos)GETINTint = GETINT (id)GETTXT. 0 if not integer.GETITXTstr = GETITXT (id,pos)
GETLBLHnum = GETLBLH (0)GETLTXTstr = GETLTXT (id,p)GETMAXCHnum = GETMAXCH (0)GETMCADDstr = GETMCADD (id)GETMCHKnum = GETMCHK (id)GETMCLIDn = GETMCLID (n)GETMCLSTn = GETMCLST (n)GETMCONn = GETMCON (n)GETMDBNstr = GETMDBN (n)GETMSELnum = GETMSEL (id,N)GETNITEMnum = GETNITEM (id)GETNLINEnum = GETNLINE (id)GETNSELnum = GETNSEL (id)GETPOSnum = GETPOS (id)GETRADHnum = GETRADH (0)GETRSTEPnum = GETRSTEP (0)GETTXTstr = GETTXT (id)GETTXTHnum = GETTXTH (0)GLOBALN num = GLOBALN(globvar_exp , numeric_exp)COMPUTE Y = GLOBALN('RT', 25.5)GLOBALS num = GLOBALS(stringexp , stringexp)COMPUTE Y = GLOBALS ('TEMP','JOE SMITH')
GLOBALN and GLOBALS return:GLOBALN or GLOBALS for text substitution
in the same program (by using the global variable name within angle
brackets) because the functions work at execution time and text substitution
happens at compile time.GLOBNAME str = GLOBNAME(n)
HELP error = HELP( help page ).htm.
For example:COMPUTE X = HELP ('visualpql/function/foreword')ICHAR num = ICHAR(C)IDSTATUS num = IDSTATUS(id)JOUFLAG num = JOUFLAG (0)JULC str = JULC( X )JULN num = JULN( X , Y , Z)
DURATION = JULN(4, 8, 87) - BEGINDAT
ENDPROJ = JUNL(TMON, TDAY, TYEAR)KEYNAME str = KEYNAME (rtnum, keynum)RTNUM is the record number. KEYNUM
is the number of the keyfield, i.e 1 is the case id, 2 is the first
key field in the record type, etc.KEYORDER str = KEYORDER (rtnum, varname_string)LEN num = LEN( strX )LN num = LN( X )ALOG function.LOG num = LOG( X )ALOG function.LOG10 num = LOG10( X )ALOG10 function. (LG10 is also allowed.)LOWER str = LOWER( string )