Technical Training
Oracle 11g TutorialSubprogram Name: PUT Subprogram Type: Procedure Syntax:
Description: The procedure writes a text in the file, which is under Write operation. Note that is has ability to just write a piece of text into the file, but fails to change the line. Actually, it writes the text to the file buffer, which can hold maximum of 32767 bytes.
Subprogram Name: PUT_LINE Subprogram Type: Procedure Syntax:
Description: The procedure achieves the same purpose as that by PUT procedure. Only difference is that it appends the text with the line terminator. As a pre-requisite, the file must be in Write mode.
Subprogram Name: PUT_LINE_NCHAR Subprogram Type: Procedure Syntax:
Description: The procedure is the analogous of PUT_LINE to support national character set.
Subprogram Name: PUT_NCHAR Subprogram Type: Procedure Syntax:
Description: The procedure is the analogous of PUT to support national character set.
Subprogram Name: PUTF Subprogram Type: Procedure Syntax:
Description: The procedure is a formatted form of PUT with many options like new line and substitution in main text to be written into the file. Argument 1 to 5 in the Syntax denotes the substitutable text in the main text. All occurrences of %s in the main text would be replaced by these texts in sequence. For example, first occurrence would be replaced by Argument 1, second with Argument 2 and so on. The main text Format can also have new line character n.
Subprogram Name: PUTF_NCHAR Subprogram Type: Procedure Syntax:
Description: The procedure is national character set supported version of PUTF.
Subprogram Name: PUTF_RAW Subprogram Type: Procedure Syntax:
Description: Like PUT function, it accepts RAW value and writes to the buffer, which in turn would be written into the file. If the Auto flush is true, buffer content would be immediately written into the file and buffer would be flushed off.
Subprogram Name: FFLUSH Subprogram Type: Procedure Syntax:
Description: The procedure forcefully writes the buffered data immediately into the file.
Subprogram Name: FCOPY Subprogram Type: Procedure Syntax:
Description: The UTL_FILE procedure copies a portion of content from one file (source) to another file (target). The portion of the content is specified using Start Line and End Line of the source file. The source file must be opened in Read mode, while the target file should be in Write mode.
The section lists the UTL_FILE subprograms which are used to close a file.
Subprogram Name: FCLOSE Subprogram Type: Procedure Syntax:
Description: The procedure closes a file, which is currently held by the input file handler.
Subprogram Name: FCLOSE_ALL Subprogram Type: Procedure Syntax:
Description: The procedure is used to close all the file handlers of the current session.
The section lists the UTL_FILE subprograms which perform useful activity related to file operations.
Subprogram Name: FGETATTR Subprogram Type: Procedure Syntax:
Description: The procedure is used to retrieve the file statistics on the storage disk.
Subprogram Name: FGETPOS Subprogram Type: Function Syntax:
Description: The function returns the offset position in a file under operation.
Subprogram Name: FREMOVE Subprogram Type: Procedure Syntax:
Description: The procedure deletes the given file from the specified directory location.
Subprogram Name: FRENAME Subprogram Type: Procedure Syntax:
Description: In UNIX, we have MV command, whose ability to move the file contents between locations, is applied to rename an existing file. FRENAME is an analogous of MV command in oracle. It takes source file specification and destination file specification as inputs. Destination file specification is the new directory and name of the file.
Overwrite parameter allows overwriting of contents in a file, if the new file created by the program already exists in the location. By default, it is FALSE.
Subprogram Name: FSEEK Subprogram Type: Procedure Syntax:
Description: The procedure moves the file pointer within a file. It either moves to an absolute position (absolute offset) or moves from its current position in terms of bytes (relative offset).
Oracle 11g Tutorial
H I D E