7Siebel eScript Quick Reference

File and Directory Methods

This topic describes file and directory methods.

    File Manipulation Methods

    The following table describes file control methods.

    Method Description

    Clib Close File Method

    Closes an open file.

    Clib Create Temporary File Method

    Creates a temporary file.

    Clib Create Temporary File Name Method

    Gets a temporary file name.

    Clib Delete File Method

    Deletes a file.

    Clib Lock File Method

    Handles file locking and unlocking.

    Clib Open File Method

    Opens a file.

    Clib Rename File Method

    Renames a file.

    Clib Reopen File Method

    Reopens a file.

      File Manipulation Methods

      The following table describes file manipulation methods.

      Method Description

      Clib Clear Buffer Method

      Writes to disk the data that exists in the buffer, and then clears the buffer.

      Clib End of File Method

      Determines if the file cursor is at the end of the file.

      Clib Get Character Method

      Gets a character from the buffer.

      Clib Get Characters to Next Line Method

      Gets a string that includes characters from the cursor to the next newline character.

      Clib Get Cursor Position Method

      Gets the current position of the file cursor.

      Clib Get Relative Cursor Position Method

      Gets the position of the file cursor relative to the beginning of the file.

      Clib Move Cursor to Beginning of File Method

      Moves the file cursor to the beginning of a file.

      Clib Read From File Method

      Reads data from a file.

      Clib Restore Cursor Position Method

      Sets the current file cursor to a position that you specify.

      Clib Scan and Convert from Input Device Method

      Reads input from an input device and stores the data in arguments.

      Clib Set Cursor Position Method

      Sets the cursor position in a file.

      Clib Unget Method

      Pushes a character back to a file.

      Clib Write Character Method

      Writes a character to a file.

      Clib Write Formatted String Method

      Writes a formatted string to a file.

      Clib Write String to File Method

      Writes a string to a file.

      Clib Write to File Method

      Writes data to a file.

        Directory Manipulation Methods

        The following table describes directory methods.

        Method Description

        Clib Change Directory Method

        Changes directory.

        Clib Create Directory Method

        Creates a directory.

        Clib Get Current Working Directory Method

        Gets the current working directory.

        Clib Remove Directory Method

        Removes a directory.

          String Methods

          The following table describes string and byte array methods.

          Method Description

          Change String to Lowercase Method

          Converts a string to lowercase.

          Change String to Uppercase Method

          Converts a string to uppercase.

          Clib Append String Method

          Concatenates a portion of one string to another string.

          Clib Compare Strings Method

          Performs a comparison between two strings.

          Clib Convert String to Lowercase Method

          Converts a string to lowercase.

          Clib Copy String Method

          Copies a part of one string to another string.

          Clib Get Formatted String Method

          Returns a formatted string.

          Clib Get Last Substring Method

          Searches a string for the last occurrence of a character.

          Clib Get Substring Method

          Searches a string for a string.

          Clib Search String for Character Method

          Searches a string for a character.

          Clib Search String for Character Set Method

          Searches a string for a set of characters.

          Clib Search String for Not Character Set Method

          Searches a string for a character that is not in a set of characters.

          Clib Write Formatted String Method

          Writes formatted output to a string.

          Compile Regular Expressions Method

          Modifies the pattern and attributes that Siebel CRM uses with the current instance of a regular expression object.

          Create String From Substring Method

          Returns a section of a string.

          Create String From Unicode Values Method

          Converts Unicode values to a string.

          Get Character From String Method

          Returns the character that resides at a location in a string.

          Get Regular Expression from String Method

          Returns an array of strings that match a regular expression.

          Get Unicode Character From String Method

          Returns the Unicode value of the character that resides at a specific position in a string.

          Is Regular Expression in String Method

          Indicates if a string includes a regular expression.

          Parse String Method

          Parses a string and returns an array of strings according to a separator.

          Replace String Method

          Replaces a string with a string that you define.

          Search String for Last Substring Method

          Returns the position of the last instance of a substring.

          Search StringVar for Regular Expression Method

          Returns the position of a regular expression.

          Array Methods and Properties

          The following table describes array methods and properties.

          Method or Property Description

          Add Array Elements Method

          Appends new elements to the end of an array.

          Clib Search Array Method

          Searches an array for a value that you specify

          Clib Sort Array Method

          Sorts elements in an array.

          Create Array Elements Method

          Creates a string of array elements.

          Delete Last Array Element Method

          Returns the last element of the current array object, and then removes the element from the array.

          Get Array Length Method

          Returns the length of a dynamically created array.

          Get Largest Array Index Method

          Returns a number that includes the largest index of an array, plus 1.

          Insert Array Elements Method

          Inserts new elements into an array.

          Reverse Array Order Method

          Reverses the order of elements of an array.

          Set Array Length Method

          Sets the size of an array.

          Sort Array Method

          Sorts array elements.

          Mathematical Methods and Properties

          This topic describes mathematical methods and properties.

            Numeric Methods

            The following table describes numeric methods.

            Method Description

            Clib Create Random Number Method

            Creates a pseudo-random number.

            Clib Divide Method

            Performs integer division and returns a quotient and remainder.

            Clib Get Floating Point Number Method

            Calculates a floating-point number given a mantissa and an exponent.

            Clib Get Integer Method

            Returns the integer part of a decimal number.

            Clib Get Normalized Mantissa Method

            Breaks a real number into a mantissa and an exponent as a power of 2.

            Clib Initialize Random Number Generator Method

            Creates an initial value for the random number generator.

            Get Absolute Value Method

            Returns the absolute value of an integer.

            Get Ceiling Method

            Returns the smallest integer that is not less than the value that the number argument contains.

            Get Exponential Method

            Computes the exponential function.

            Get Floor Method

            Returns the greatest integer that is not greater than the value that the number argument contains.

            Get Logarithm Method

            Calculates the natural logarithm.

            Get Maximum Method

            Returns the largest of one or more values.

            Get Minimum Method

            Returns the smallest of one or more values.

            Get Random Number Method

            Returns a random real number between 0 and 1.

            Get Square Root Method

            Calculates the square root.

            Raise Power Method

            Calculates x to the power of y.

            Round Number Method

            Rounds a value up or down.

              Trigonometric Methods

              The following table describes trigonometric methods.

              Method Description

              Clib Get Hyperbolic Cosine Method

              Calculates the hyperbolic cosine.

              Clib Get Hyperbolic Sine Method

              Calculates the hyperbolic sine.

              Clib Get Hyperbolic Tangent Method

              Calculates the hyperbolic tangent.

              Get Arc Cosine Method

              Calculates the arc cosine.

              Get Arcsine Method

              Calculates the arcsine.

              Get Arctangent 2 Method

              Calculates the arc tangent of a fraction.

              Get Arctangent Method

              Calculates the arc tangent.

              Get Cosine Method

              Calculates the cosine.

              Get Sine Method

              Calculates the sine.

              Get Tangent Method

              Calculates the tangent.

                Mathematical Properties

                The following table describes mathematical properties, each of which is a numeric constant.

                Property Description

                Base E Property

                Returns the value of e, which is the base for natural logarithms.

                Logarithm 10 E Property

                Returns the value of the base 10 logarithm of e.

                Logarithm 2 E Property

                Returns the value of the base 2 logarithm of e.

                Math Natural Logarithm 10 Property

                Returns the value of the natural logarithm of 10.

                PI Property

                Returns the value of pi.

                Square Root 1/2 Property

                Returns the value of the square root of ½.

                Square Root 2 Property

                Returns the value of the square root of 2.

                  BLOB Methods

                  The following table describes BLOB methods.

                  Method Description

                  Get BLOB Data Method

                  Reads data from a specified position in a BLOB.

                  Get UTC Hours Method

                  Determines the size of a BLOB.

                  Write BLOB Data Method

                  Writes data to a specified position in a BLOB.

                  Date and Time Methods

                  The following table describes date and time methods.

                  Method Description

                  Clib Convert Integer to GMT Method

                  Converts a date and time to GMT.

                  Clib Convert Integer to Local Time Method

                  Converts an integer to local time.

                  Clib Convert Time Object to Integer Method

                  Converts a time object to an integer.

                  Clib Get Difference in Seconds Method

                  Computes the difference between two times.

                  Clib Get Formatted Date and Time Method

                  Writes a formatted date and time to a string.

                  Clib Get Local Date and Time Method

                  Returns a string that includes the local date and time.

                  Clib Get Tick Count Method

                  Returns the current processor tick count.

                  Convert Date and Time to String Method

                  Converts a date and time to a string.

                  Convert Date String to Date Object Method

                  Converts a date string to a date object.

                  Convert Date to GMT String Method

                  Converts a date object to a GMT string.

                  Convert Date to Integer Method

                  Converts a date object to an integer.

                  Convert Integer Date to JavaScript Date Method

                  Converts an integer date to a JavaScript date.

                  Convert UTC Date to Readable Date Method

                  Converts a UTC date to a format that a human can read.

                  Get Day of Month Method

                  Returns the day of the month.

                  Get Day of Week Method

                  Returns the day of the week.

                  Get Full Year Method

                  Returns the year as a four digit number.

                  Get Hours Method

                  Returns the hour.

                  Get Milliseconds Method

                  Returns the millisecond.

                  Get Minutes Method

                  Returns the minute.

                  Get Month Method

                  Returns the month.

                  Get Seconds Method

                  Returns the second.

                  Get Time Method

                  Returns the date and time, in milliseconds, of a date object.

                  Get Time Zone Offset Method

                  Returns the difference, in minutes, from GMT.

                  Get UTC Day of Month Method

                  Returns the UTC day of the month.

                  Get UTC Day of Week Method

                  Returns the UTC day of the week.

                  Get UTC Full Year Method

                  Returns the UTC year as a four digit number.

                  Get UTC Hours Method

                  Returns the UTC hour.

                  Get UTC Milliseconds Method

                  Returns the UTC millisecond.

                  Get UTC Minutes Method

                  Returns the UTC minute.

                  Get UTC Month Method

                  Returns the UTC month.

                  Get UTC Seconds Method

                  Returns the UTC second.

                  Get Year Method

                  Returns the year as a two digit number.

                  Set Date Method

                  Sets the day of the month.

                  Set Full Year Method

                  Sets the year as a four digit number.

                  Set Hours Method

                  Sets the hour.

                  Set Milliseconds Method

                  Sets the millisecond.

                  Set Minutes Method

                  Sets the minute.

                  Set Month Method

                  Sets the month.

                  Set Seconds Method

                  Sets the second.

                  Set Time Method

                  Sets the date and time in a date object, in milliseconds.

                  Set UTC Date Method

                  Sets the UTC day of the month.

                  Set UTC Full Year Method

                  Sets the UTC year as a four digit number.

                  Set UTC Hours Method

                  Sets the UTC hour.

                  Set UTC Milliseconds Method

                  Sets the UTC millisecond.

                  Set UTC Minutes Method

                  Sets the UTC minute.

                  Set UTC Month Method

                  Sets the UTC month.

                  Set UTC Seconds Method

                  Sets the UTC second.

                  Set Year Method

                  Sets the year as a two digit number.

                  Buffer Methods and Properties

                  The following information lists buffer methods and properties.

                  Method or Property Description

                  Clib Compare Memory Method

                  Compares the contents of two buffers.

                  Clib Copy Memory Method

                  Copies bytes from a source buffer to a destination buffer.

                  Clib Get Memory Method

                  Searches a buffer for the first occurrence of a character.

                  Clib Set Memory Method

                  Sets the bytes in a buffer to a character that you specify.

                  Create Buffer Method

                  Returns a section of a buffer.

                  Create Buffer Method

                  Returns a new buffer object that includes the data between two positions.

                  Cursor Position in Buffer Property

                  Stores the current position of the buffer cursor.

                  Data in Buffer Property

                  A reference to the internal data of a buffer.

                  Get Buffer Data Method

                  Returns a string that contains the same data as the buffer.

                  Get Cursor Position Value From Buffer Method

                  Returns the value of the current cursor position in a buffer.

                  Get String From Buffer Method

                  Returns a string that starts from the current cursor position.

                  Put String in Buffer Method

                  Puts a string into a buffer.

                  Put Value in Buffer Method

                  Puts a value into a buffer.

                  Siebel Library Get Pointer Address Method

                  Gets the address in memory of a buffer variable.

                  Use Big Endian in Buffer Property

                  Stores a Boolean flag for bigEndian byte ordering.

                  Use Unicode in Buffer Property

                  Stores a Boolean flag that specifies whether to use Unicode strings when calling the Get String from Buffer method or the Put String in Buffer method.

                  Write Byte to Buffer Method

                  Provides access to individual bytes in the buffer.

                  Siebel Library Methods

                  The following table describes methods that can manipulate data at specific memory locations in the Siebel Library.

                  Method Description

                  Siebel Library Get Pointer Address Method

                  Gets the address in memory of a buffer variable.

                  Siebel Library Peek Method

                  Reads and returns data from a position in memory

                  Siebel Library Write Data Method

                  Writes data to a specific position in memory.

                  Conversion Methods

                  The following table describes conversion methods.

                  Method Description

                  Convert Number to Exponential Notation Method

                  Converts a number to exponential notation.

                  Convert Number to Fixed Decimal Method

                  Converts a number to a specific number of decimal places.

                  Convert Number to Precision Method

                  Converts a number to a specific number of significant digits.

                  Convert Special Characters to URL Method

                  Replaces special characters in a string.

                  Convert String to Floating-Point Number Method

                  Converts an alphanumeric string to a floating-point decimal number.

                  Convert String to Integer Method

                  Converts an alphanumeric string to an integer number.

                  Convert Unicode to ASCII Method

                  converts Unicode characters to equivalent ASCII characters.

                  Convert Value to Boolean Method

                  Converts a value to the Boolean data type.

                  Convert Value to Buffer Method

                  Converts a value to a buffer.

                  Convert Value to Integer Method

                  Converts a value to an integer.

                  Convert Value to Number Method

                  Converts a value to a number.

                  Convert Value to Object Method

                  Converts a value to an object.

                  Convert Value to String Method

                  Converts a value to a string.

                  Convert Value to String Method

                  Converts a value to a string.

                  Convert Value to Unsigned Integer 16 Method

                  Converts a value to an unsigned integer.

                  Convert Value to Unsigned Integer 32 Method

                  Converts a value to an unsigned large integer.

                  Evaluate Expression Method

                  Returns the value in the expression argument.

                  Character Classification Methods

                  The following table describes character classification methods.

                  Method Description

                  Clib Is Alphabetic Method

                  Determines if a character is alphabetic.

                  Clib Is Alphanumeric Method

                  Determines if a character is alphanumeric.

                  Clib Is ASCII Method

                  Determines if a character is an ASCII character.

                  Clib Is Control Method

                  Determines if a character is a control.

                  Clib Is Digit Method

                  Determines if character is a decimal digit.

                  Clib Is Hexadecimal Method

                  Determines if a character is a hexadecimal-digit character.

                  Clib Is Lowercase Method

                  Determines if a letter is a lowercase alphabetic letter.

                  Clib Is Printable Method

                  Determines if a character is a printable character.

                  Clib Is Printable Not Space Method

                  Determines if character is a printing character except for space.

                  Clib Is Punctuation Mark Method

                  Determines if a character is a punctuation character.

                  Clib Is Space Method

                  Determines if a character is a white-space character.

                  Clib Is Uppercase Method

                  Determines if a character is an uppercase alphabetic character.

                  Is Finite Method

                  Determines if a value is finite.

                  Is NaN Method

                  Determines if a value is not a number (NaN).

                  Error Handling Methods

                  The following table describes error handling methods.

                  Method Description

                  Clib Clear Error Method

                  Clears the error status and resets the end-of-file flag for a file.

                  Clib Get Error Message Method

                  Returns the error message associated with an error number.

                  Clib Get Error Number Method

                  Returns the error number.

                  Clib Save Error Message In String Method

                  Saves an error message in a string.

                  Throw Statement

                  Stops running code if an error occurs.

                  Other Methods

                  The following table describes uncategorized methods.

                  Method Description

                  Clib Convert Character to ASCII Method

                  Converts a character to ASCII.

                  Clib Get Environment Variable Method

                  Returns the value of an environment variable.

                  Clib Modify Environment Variable Method

                  Creates or modifies environment variable.

                  Clib Send Command Method

                  Causes the operating system to run a command.

                  Siebel Library Call DLL Method

                  Calls a procedure from a dynamic link library in Microsoft Windows or a shared object in UNIX.

                  Undefine Method

                  Makes a variable undefined.