During a file-system cleanup I noticed a strange behavior of awk (HP-UX 11iv3 / IA64). When summing up the size of files in one directory it gives different numbers when using print as opposed to printf:
find . -type f -name '*.dmp.Z' -mtime +35 -exec ls -l {} \+ | \
awk 'BEGIN{ OFMT="%f" } {... (1 Reply)
Using a ksh script, I'm dumping the data from our sybase database into an output file. This output file is for what ever reason cut at 2GB.
There is enough space on the unix machine and as there is no error message is received I have no clue to start looking for a solution.
#!... (1 Reply)
#!/bin/ksh
file="/pkgs/roots/scripts/ISQL_op.txt"
isql -H 11.11.11.111:1111 -U myUser -P myPwd -o $file << eof
go
select * from Table1
go
eof
my cron entry
00 08 03 11 * /pkgs/roots/scripts/testc.ksh
file permission of the script is correct, i have used absolute path everywhere.
... (2 Replies)
hi all
i m running following code
# set up environment
. /u/pimms/pimms_global.ksh
echo "Get record from database"
#echo ${PIMMS_ID}
#echo ${PIMMS_PWD}
#echo "1"
isql -U${PIMMD_ID} -P${PIMMS_PWD} -S$SRV << eof > /sybase/applications/pimms/bin/automate1.txt
use pimms
... (6 Replies)
Hi
I am formatting informix isql output(vertical) to horizontal format. Suppose I have the following content in the flat file from isql output -
item_nbr 0
usfn_label Subscriber Class
usfn_name SBCLASS
usfn_value bl5
item_nbr 1
usfn_label Switch Name
usfn_name switchName... (2 Replies)
Hi all,
I have wrote a script to redirect the output of Sybase query to a file.
Its a single XML message i am fetching with sybase query.
The problem i faced here is the XML message line crosses the normal line limit in unix.
Could some please help me how to get complete xml message... (1 Reply)
I am trying to run a query which returns a sum value(a number).
I want to get it in a variable so that i can refer to that variable in different places.
when i am running the following command
variable=`isql -Uuser -Sserver -Ppassword
1> select sum(count(*)) from xyz..abc where clm_id... (2 Replies)
I am using ISQL command in ksh script.
Suppose if i get NULL value from the query which i run,how can i handle it?
I am getting a NULL result set and the following error is coming.
############### output of isql command for getting the sum of JEs ################
-----------
NULL... (4 Replies)
Hello,
I have a file of strings a below:-
4358RYFHD9845
28/COC/UYF984
9834URD 98HJDU
I need to extract all the first numeric character of every sting as follows:-
4358
28
9834
thanks to suggest ASAP
Regards,
Jasi
Use code tags, thanks. (7 Replies)
Discussion started by: jassi10781
7 Replies
LEARN ABOUT MOJAVE
dbix::class::resultclass::hashrefinflator5.18
DBIx::Class::ResultClass::HashRefInflator(3) User Contributed Perl Documentation DBIx::Class::ResultClass::HashRefInflator(3)NAME
DBIx::Class::ResultClass::HashRefInflator - Get raw hashrefs from a resultset
SYNOPSIS
use DBIx::Class::ResultClass::HashRefInflator;
my $rs = $schema->resultset('CD');
$rs->result_class('DBIx::Class::ResultClass::HashRefInflator');
while (my $hashref = $rs->next) {
...
}
OR as an attribute:
my $rs = $schema->resultset('CD')->search({}, {
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
});
while (my $hashref = $rs->next) {
...
}
DESCRIPTION
DBIx::Class is faster than older ORMs like Class::DBI but it still isn't designed primarily for speed. Sometimes you need to quickly
retrieve the data from a massive resultset, while skipping the creation of fancy result objects. Specifying this class as a "result_class"
for a resultset will change "$rs->next" to return a plain data hash-ref (or a list of such hash-refs if "$rs->all" is used).
There are two ways of applying this class to a resultset:
o Specify "$rs->result_class" on a specific resultset to affect only that resultset (and any chained off of it); or
o Specify "__PACKAGE__->result_class" on your source object to force all uses of that result source to be inflated to hash-refs - this
approach is not recommended.
METHODS
inflate_result
Inflates the result and prefetched data into a hash-ref (invoked by DBIx::Class::ResultSet)
CAVEATS
o This will not work for relationships that have been prefetched. Consider the following:
my $artist = $artitsts_rs->search({}, {prefetch => 'cds' })->first;
my $cds = $artist->cds;
$cds->result_class('DBIx::Class::ResultClass::HashRefInflator');
my $first = $cds->first;
$first will not be a hashref, it will be a normal CD row since HashRefInflator only affects resultsets at inflation time, and prefetch
causes relations to be inflated when the master $artist row is inflated.
o Column value inflation, e.g., using modules like DBIx::Class::InflateColumn::DateTime, is not performed. The returned hash contains
the raw database values.
perl v5.18.2 2013-12-16 DBIx::Class::ResultClass::HashRefInflator(3)