| Clarion documentation | view source | Contained in the Clarion distribution. |
Clarion - Perl module for reading CLARION 2.1 data files
This is a perl module to access CLARION 2.1 files. At the moment only read access to the files is implemented. "Encrypted" (owned) files are processed transparently, there is no need to specify the password of a file.
use Clarion;
my $dbh=new Clarion "customer.dat";
print $dbh->file_struct;
for ( 1 .. $dbh->last_record ) {
my $r=$dbh->get_record_hash($_);
next if $r->{_DELETED};
print $r->{CODE}." ".$r->{NAME}." ".$r->{PHONE}."\n";
}
$dbh->close();
Create object for reading Clarion file. If file name is specified then associate the DAT file with the object. "Encrypted" files are processed transparently, you do not need to specify the password of a file.
If the third argument (skipMemo) specified, memo field will not be processed at all.
Close all open file handles.
Read and parse header of Clarion file.
If second argument given, skip processing of memo field.
Returns the number of records in the database file.
Returns the physical number of first logical record.
Returns the physical number of last logical record.
Returns a list of data (field values) from the specified record. The first parameter in the call is the number of the physical record. If you do not specify any other parameters, all fields are returned in the same order as they appear in the file. You can also put list of field names after the record number and then only those will be returned. The first value of the returned list is always the logical (0 or not 0) value saying whether the record is deleted or not.
If first argument is omited (or undef) then reads next record from file.
Returns reference to hash containing field values indexed by field names.
The name of the deleted flag is _DELETED. The first parameter in the call
is the number of the physical record (can be omited to read next record if
avaialable). If you do not specify any other parameters, all fields are returned.
You can also put list of field names after the record number and then only those
will be returned.
This returns CLARION file structure as a string.
Tested only on x86 processors. Should fail on another architecture.
Stas Ukolov <ukoloff@cpan.org>
Ilya Chelpanov <ilya@macro.ru>, http://i72.narod.ru or http://i72.by.ru
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Clarion data files and indexes description at http://i72.by.ru.
ODBC driver for Clarion .tps-files (read/write) at http://dein.h11.ru/
| Clarion documentation | view source | Contained in the Clarion distribution. |