arsperl-users Mailing List for ARSperl (Page 29)
Brought to you by:
jeffmurphy
You can subscribe to this list here.
| 1996 |
Jan
(6) |
Feb
(7) |
Mar
(16) |
Apr
(5) |
May
(21) |
Jun
(5) |
Jul
(5) |
Aug
(13) |
Sep
(4) |
Oct
(12) |
Nov
(7) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1997 |
Jan
(38) |
Feb
(65) |
Mar
(32) |
Apr
(37) |
May
(47) |
Jun
(45) |
Jul
(28) |
Aug
(38) |
Sep
(41) |
Oct
(81) |
Nov
(21) |
Dec
(45) |
| 1998 |
Jan
(18) |
Feb
(26) |
Mar
(44) |
Apr
(34) |
May
(36) |
Jun
(44) |
Jul
(31) |
Aug
(34) |
Sep
(56) |
Oct
(40) |
Nov
(20) |
Dec
(25) |
| 1999 |
Jan
(49) |
Feb
(50) |
Mar
(33) |
Apr
(51) |
May
(54) |
Jun
(43) |
Jul
(91) |
Aug
(34) |
Sep
(120) |
Oct
(102) |
Nov
(101) |
Dec
(25) |
| 2000 |
Jan
(55) |
Feb
(105) |
Mar
(44) |
Apr
(89) |
May
(123) |
Jun
(51) |
Jul
(98) |
Aug
(120) |
Sep
(101) |
Oct
(77) |
Nov
(58) |
Dec
(39) |
| 2001 |
Jan
(36) |
Feb
(50) |
Mar
(57) |
Apr
(62) |
May
(81) |
Jun
(55) |
Jul
(46) |
Aug
(51) |
Sep
(37) |
Oct
(60) |
Nov
(38) |
Dec
(41) |
| 2002 |
Jan
(70) |
Feb
(41) |
Mar
(49) |
Apr
(55) |
May
(93) |
Jun
(48) |
Jul
(88) |
Aug
(52) |
Sep
(92) |
Oct
(63) |
Nov
(37) |
Dec
(63) |
| 2003 |
Jan
(62) |
Feb
(78) |
Mar
(101) |
Apr
(90) |
May
(104) |
Jun
(31) |
Jul
(29) |
Aug
(66) |
Sep
(50) |
Oct
(114) |
Nov
(111) |
Dec
(49) |
| 2004 |
Jan
(19) |
Feb
(68) |
Mar
(59) |
Apr
(30) |
May
(54) |
Jun
(33) |
Jul
(115) |
Aug
(69) |
Sep
(33) |
Oct
(80) |
Nov
(25) |
Dec
(47) |
| 2005 |
Jan
(34) |
Feb
(26) |
Mar
(28) |
Apr
(57) |
May
(53) |
Jun
(59) |
Jul
(42) |
Aug
(25) |
Sep
(26) |
Oct
(33) |
Nov
(20) |
Dec
(2) |
| 2006 |
Jan
(35) |
Feb
(15) |
Mar
(14) |
Apr
(7) |
May
(22) |
Jun
(22) |
Jul
(22) |
Aug
(3) |
Sep
(7) |
Oct
(20) |
Nov
(25) |
Dec
(8) |
| 2007 |
Jan
(44) |
Feb
(26) |
Mar
(24) |
Apr
(34) |
May
(23) |
Jun
(61) |
Jul
(18) |
Aug
(39) |
Sep
(28) |
Oct
(31) |
Nov
(31) |
Dec
(23) |
| 2008 |
Jan
(18) |
Feb
(5) |
Mar
(18) |
Apr
(15) |
May
(17) |
Jun
(18) |
Jul
(13) |
Aug
(10) |
Sep
(71) |
Oct
(25) |
Nov
(5) |
Dec
(14) |
| 2009 |
Jan
(3) |
Feb
(6) |
Mar
(19) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
(23) |
Aug
|
Sep
|
Oct
(2) |
Nov
(15) |
Dec
(7) |
| 2010 |
Jan
(5) |
Feb
(6) |
Mar
|
Apr
|
May
(10) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2011 |
Jan
(16) |
Feb
(24) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(13) |
Dec
|
| 2012 |
Jan
(17) |
Feb
(14) |
Mar
(14) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(7) |
Oct
(14) |
Nov
(4) |
Dec
(4) |
| 2013 |
Jan
(1) |
Feb
(12) |
Mar
(7) |
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
(21) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
(4) |
| 2014 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(27) |
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Peter F. <Pet...@LP...> - 2007-08-22 19:32:59
|
I am having trouble using the OO interface on a remedy 7 system. When I do
a "new ARS::form" or $h->openForm I get a eries of messages about caching
fields, then I see:
...
caching field: Ticket Status
datatype: char
caching field: Assignee Group+
datatype: char
caching field: Identifier
datatype: char
caching field: Change Scheduled Start Date
datatype: time
caching field: Priority*
datatype: enum
Sorry. I'm not sure what to do with non-regularLists of enums.
(this enum is type "customList")
listStyle =
Died at /usr/lib/perl5/site_perl/5.8.8/i686-linux/ARSOOform.pm line 74.
at /usr/lib/perl5/site_perl/5.8.8/i686-linux/ARSOOform.pm line 74...
--
Regards,
Peter
The President, he's got his war
Folks don't know just what it's for
Nobody gives us rhyme or reason
Have one doubt, they call it treason
Lyrics from "Compared to What?"
by Eugene McDaniels, circa 1969
|
|
From: Peter F. <Pet...@LP...> - 2007-08-22 15:10:45
|
Never mind - I found the error. There is an error in Makefile.PL in my
version of ARSPerl. The CVS version has been fixed. In my (old) copy,
there is a line:
$ARS_LIBS .= " -lpthread -licuuc -licui18n";
This has been changed in CV to:
$ARS_LIBS .= " -lpthread -licuucbmc -licui18nbmc";
Once I made the changes it runs clean. I found the solution through a
google search. For some reason the archive search did not find it.
--
Regards,
Peter
The President, he's got his war
Folks don't know just what it's for
Nobody gives us rhyme or reason
Have one doubt, they call it treason
Lyrics from "Compared to What?"
by Eugene McDaniels, circa 1969
On Wed, August 22, 2007 10:11, Jeff Murphy wrote:
>
> download the API from http://arswiki.org/projects/arapi/downloads
>
>
> Peter Farr wrote:
>> I am upgrading from API version 5.1 to 7.01 on Linux and have run into
>> difficulties. I downloaded the new API tarball and extracted it, then
>> pointed the ARSPerl Makefile.PL to the new location, did a make clean,
>> make and make install... no errors. When I do a use ARS in Perl, though,
>> I
>> see the following errors:
>>
>> Can't load '/usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so'
>> for
>> module ARS: /usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so:
>> undefined symbol: ucnv_open_3_2 at
>> /usr/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230.
>> at GetField.pl line 38
>> Compilation failed in require at GetField.pl line 38.
>> BEGIN failed--compilation aborted at GetField.pl line 38.
>>
>> I am using the sample GetField.pl to test.
>>
>> I have added the API lib directory to /etc/ld.so.conf and reran
>> ldconfig,
>> but it makes no difference. Flipping back to the 5.1 libs clears up the
>> problem.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Jeff M. <jcm...@je...> - 2007-08-22 14:11:00
|
download the API from http://arswiki.org/projects/arapi/downloads Peter Farr wrote: > I am upgrading from API version 5.1 to 7.01 on Linux and have run into > difficulties. I downloaded the new API tarball and extracted it, then > pointed the ARSPerl Makefile.PL to the new location, did a make clean, > make and make install... no errors. When I do a use ARS in Perl, though, I > see the following errors: > > Can't load '/usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so' for > module ARS: /usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so: > undefined symbol: ucnv_open_3_2 at > /usr/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230. > at GetField.pl line 38 > Compilation failed in require at GetField.pl line 38. > BEGIN failed--compilation aborted at GetField.pl line 38. > > I am using the sample GetField.pl to test. > > I have added the API lib directory to /etc/ld.so.conf and reran ldconfig, > but it makes no difference. Flipping back to the 5.1 libs clears up the > problem. |
|
From: Peter F. <Pet...@LP...> - 2007-08-22 14:02:17
|
I am upgrading from API version 5.1 to 7.01 on Linux and have run into
difficulties. I downloaded the new API tarball and extracted it, then
pointed the ARSPerl Makefile.PL to the new location, did a make clean,
make and make install... no errors. When I do a use ARS in Perl, though, I
see the following errors:
Can't load '/usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so' for
module ARS: /usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/ARS/ARS.so:
undefined symbol: ucnv_open_3_2 at
/usr/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230.
at GetField.pl line 38
Compilation failed in require at GetField.pl line 38.
BEGIN failed--compilation aborted at GetField.pl line 38.
I am using the sample GetField.pl to test.
I have added the API lib directory to /etc/ld.so.conf and reran ldconfig,
but it makes no difference. Flipping back to the 5.1 libs clears up the
problem.
--
Regards,
Peter
The President, he's got his war
Folks don't know just what it's for
Nobody gives us rhyme or reason
Have one doubt, they call it treason
Lyrics from "Compared to What?"
by Eugene McDaniels, circa 1969
|
|
From: Michiel B. <mic...@gm...> - 2007-08-16 07:25:19
|
Hi Monty, You're right; 1.71 is not on sf.net; however since 1.74 is only minor revisions up from 1.71 I would advise you to download and use that one. That will (almost certainly) run your 1.71 scripts just fine. Here's the link for the 1.71 release: http://sourceforge.net/project/showfiles.php?group_id=116013&package_id=125945&release_id=269706 Kind regards, Michiel On 8/16/07, monty <med...@co...> wrote: > I have to move a production webserver from one server to another, this > involves rebuilding a rather ancient perl install from the ground up on the > wintel platform, I have been searching for days for arsperl 1.71, takingover > this job from someone else I cannot find the *.* file..any help welcomed > thanks |
|
From: monty <med...@co...> - 2007-08-16 07:25:19
|
Anyone have the 1.71 release of arsperl? cannot find anywhere not even = on sourceforge anymore..I desperately need for my job, migrating old = webapp and cannot engineer it to use new version just yet, not enough = time to change all the code required to do so.=20 |
|
From: monty <med...@co...> - 2007-08-16 06:18:15
|
I have to move a production webserver from one server to another, this involves rebuilding a rather ancient perl install from the ground up on the wintel platform, I have been searching for days for arsperl 1.71, takingover this job from someone else I cannot find the *.* file..any help welcomed thanks ----- Original Message ----- From: <ars...@ar...> To: <ars...@ar...> Sent: Thursday, August 09, 2007 11:29 AM Subject: Arsperl-users Digest, Vol 16, Issue 4 > Send Arsperl-users mailing list submissions to > ars...@ar... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/arsperl-users > or, via email, send a message with subject or body 'help' to > ars...@ar... > > You can reach the person managing the list at > ars...@ar... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Arsperl-users digest..." > > > Today's Topics: > > 1. Re: Incorrect format for a diary field (Peter Farr) > 2. ARSPerl newbie: How to list field values from a form? (Ravi) > 3. Re: ARSPerl newbie: How to list field values from a form? > (Thilo Stapff) > 4. Re: ARSPerl newbie: How to list field values from a form? > ( Jarl Gr?neng ) > 5. Re: ARSPerl newbie: How to list field values from a form? > (Clayton Scott) > 6. Re: ARSPerl newbie: How to list field values from a form? > (Thilo Stapff) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 2 Aug 2007 15:48:52 -0400 (EDT) > From: "Peter Farr" <Pet...@LP...> > Subject: Re: [Arsperl-users] Incorrect format for a diary field > To: "ARSperl User Discussion" <ars...@ar...> > Message-ID: > <285...@pe...> > Content-Type: text/plain;charset=iso-8859-1 > > Thanks Jeff. > -- > Regards, > Peter > > > On Tue, July 31, 2007 14:39, Jeff Murphy wrote: >> Peter Farr wrote: >>> I am trying to use the ARS Perl interface to extract some data from >>> Remedy >>> (v5 and v7). I will say up front that I am not extremely >>> Remedy-literate. >>> When I open some (many) forms using: >>> >>> $f = new ARS::form(-form => $schema, -connection => $ars); >>> >>> I get error 339 "Incorrect format for a diary field". Is there some way >>> around this? >>> >>> ARSPerl-1.90 on Linux 2.6. ars_APIVersion() tells me I am compiled >>> against >>> API version 7 on one system and version 9 on the other. I get the same >>> message on either system. >>> >> >> >> >> try >> >> my $a = new ARS($server, $user, $pass); >> my $f = $a->openForm($schema); >> my @e = $f->query('1 = 1'); >> print join(', ', @e), "\n"; >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Arsperl-users mailing list >> Ars...@ar... >> https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > > > > > ------------------------------ > > Message: 2 > Date: Wed, 08 Aug 2007 13:16:53 -0400 > From: Ravi <ra...@co...> > Subject: [Arsperl-users] ARSPerl newbie: How to list field values from > a form? > To: ARSperl User Discussion <ars...@ar...> > Message-ID: <46B...@co...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi:I am trying query a schema and print a fieldname and values for all > records with a qualifying filter. I can't seem to figure out which > function to use and how. This is what I have now and I get 0 records. Is > asr_GetListEntry the right function? Does someone have a sample script > or point me to the right one in the example dir? > > $schema = "My:Alarm Base"; > $qs = qq/'Category' = "Voice"/; > ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) || > die "error in ars_LoadQualifier"; > > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); > > foreach $entry_id (sort keys %entries) { > printf("%s %s\n", $entry_id, $entries{$entry_id}); > } > > > Thanks > Ravi > > > > > ------------------------------ > > Message: 3 > Date: Thu, 09 Aug 2007 11:01:16 +0200 > From: Thilo Stapff <thi...@ap...> > Subject: Re: [Arsperl-users] ARSPerl newbie: How to list field values > from a form? > To: ARSperl User Discussion <ars...@ar...> > Message-ID: <46B...@ap...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > ars_GetListEntry needs at least one more parameter (firstRetrieve, > usually = 0): > > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0); > > instead of > > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); > > > Moreover, you should always check for errors after calling an API > function, e.g. > > die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr; > > > You might also try using the field ID of "Category" instead of the field > name in the qualifier string. > > > Regards, > Thilo Stapff > > > Ravi wrote: >> Hi:I am trying query a schema and print a fieldname and values for all >> records with a qualifying filter. I can't seem to figure out which >> function to use and how. This is what I have now and I get 0 records. Is >> asr_GetListEntry the right function? Does someone have a sample script >> or point me to the right one in the example dir? >> >> $schema = "My:Alarm Base"; >> $qs = qq/'Category' = "Voice"/; >> ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) || >> die "error in ars_LoadQualifier"; >> >> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >> >> foreach $entry_id (sort keys %entries) { >> printf("%s %s\n", $entry_id, $entries{$entry_id}); >> } >> >> >> Thanks >> Ravi >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Arsperl-users mailing list >> Ars...@ar... >> https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > > > > ------------------------------ > > Message: 4 > Date: Thu, 9 Aug 2007 19:17:50 +0200 > From: " Jarl Gr?neng " <jar...@gm...> > Subject: Re: [Arsperl-users] ARSPerl newbie: How to list field values > from a form? > To: "ARSperl User Discussion" <ars...@ar...> > Message-ID: > <a97...@ma...> > Content-Type: text/plain; charset=ISO-8859-1 > > I does not like the die parameter if you got an error. You may miss > the clean-up part. > > - > Jarl > > On 8/9/07, Thilo Stapff <thi...@ap...> wrote: >> ars_GetListEntry needs at least one more parameter (firstRetrieve, >> usually = 0): >> >> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0); >> >> instead of >> >> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >> >> >> Moreover, you should always check for errors after calling an API >> function, e.g. >> >> die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr; >> >> >> You might also try using the field ID of "Category" instead of the field >> name in the qualifier string. >> >> >> Regards, >> Thilo Stapff >> >> >> Ravi wrote: >> > Hi:I am trying query a schema and print a fieldname and values for all >> > records with a qualifying filter. I can't seem to figure out which >> > function to use and how. This is what I have now and I get 0 records. >> > Is >> > asr_GetListEntry the right function? Does someone have a sample script >> > or point me to the right one in the example dir? >> > >> > $schema = "My:Alarm Base"; >> > $qs = qq/'Category' = "Voice"/; >> > ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) || >> > die "error in ars_LoadQualifier"; >> > >> > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >> > >> > foreach $entry_id (sort keys %entries) { >> > printf("%s %s\n", $entry_id, $entries{$entry_id}); >> > } >> > >> > >> > Thanks >> > Ravi >> > >> > >> > ------------------------------------------------------------------------- >> > This SF.net email is sponsored by: Splunk Inc. >> > Still grepping through log files to find problems? Stop. >> > Now Search log events and configuration files using AJAX and a browser. >> > Download your FREE copy of Splunk now >> http://get.splunk.com/ >> > _______________________________________________ >> > Arsperl-users mailing list >> > Ars...@ar... >> > https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Arsperl-users mailing list >> Ars...@ar... >> https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > > > ------------------------------ > > Message: 5 > Date: Thu, 9 Aug 2007 14:03:05 -0400 > From: "Clayton Scott" <cla...@gm...> > Subject: Re: [Arsperl-users] ARSPerl newbie: How to list field values > from a form? > To: "ARSperl User Discussion" <ars...@ar...> > Message-ID: > <1f3...@ma...> > Content-Type: text/plain; charset=ISO-8859-1 > > Using "die" is just an example. > > You could also "warn" and continue, or whatever you want. > Just check the value of $ars_errstr. > > if ($ars_errstr){ > # do what you need to do if there is an error > } > > On 8/9/07, Jarl Gr?neng <jar...@gm...> wrote: >> I does not like the die parameter if you got an error. You may miss >> the clean-up part. >> >> - >> Jarl >> >> On 8/9/07, Thilo Stapff <thi...@ap...> wrote: >> > ars_GetListEntry needs at least one more parameter (firstRetrieve, >> > usually = 0): >> > >> > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0); >> > >> > instead of >> > >> > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >> > >> > >> > Moreover, you should always check for errors after calling an API >> > function, e.g. >> > >> > die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if >> > $ars_errstr; >> > >> > >> > You might also try using the field ID of "Category" instead of the >> > field >> > name in the qualifier string. >> > >> > >> > Regards, >> > Thilo Stapff >> > >> > >> > Ravi wrote: >> > > Hi:I am trying query a schema and print a fieldname and values for >> > > all >> > > records with a qualifying filter. I can't seem to figure out which >> > > function to use and how. This is what I have now and I get 0 records. >> > > Is >> > > asr_GetListEntry the right function? Does someone have a sample >> > > script >> > > or point me to the right one in the example dir? >> > > >> > > $schema = "My:Alarm Base"; >> > > $qs = qq/'Category' = "Voice"/; >> > > ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) || >> > > die "error in ars_LoadQualifier"; >> > > >> > > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >> > > >> > > foreach $entry_id (sort keys %entries) { >> > > printf("%s %s\n", $entry_id, $entries{$entry_id}); >> > > } >> > > >> > > >> > > Thanks >> > > Ravi >> > > >> > > >> > > ------------------------------------------------------------------------- >> > > This SF.net email is sponsored by: Splunk Inc. >> > > Still grepping through log files to find problems? Stop. >> > > Now Search log events and configuration files using AJAX and a >> > > browser. >> > > Download your FREE copy of Splunk now >> http://get.splunk.com/ >> > > _______________________________________________ >> > > Arsperl-users mailing list >> > > Ars...@ar... >> > > https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > >> > >> > >> > ------------------------------------------------------------------------- >> > This SF.net email is sponsored by: Splunk Inc. >> > Still grepping through log files to find problems? Stop. >> > Now Search log events and configuration files using AJAX and a browser. >> > Download your FREE copy of Splunk now >> http://get.splunk.com/ >> > _______________________________________________ >> > Arsperl-users mailing list >> > Ars...@ar... >> > https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Arsperl-users mailing list >> Ars...@ar... >> https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > > -- > > Clayton Scott > cla...@gm... > > > > ------------------------------ > > Message: 6 > Date: Thu, 09 Aug 2007 20:29:12 +0200 > From: Thilo Stapff <thi...@ap...> > Subject: Re: [Arsperl-users] ARSPerl newbie: How to list field values > from a form? > To: ARSperl User Discussion <ars...@ar...> > Message-ID: <46B...@ap...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I'm not sure what you are talking about. > > ARTermination() is always called on exit because ARS.xs implements a > destructor function for ARControlStructPtr objects. > > Perl also closes filehandles automatically. > > If you have other resources which need cleanup, you can wrap your code > into an "eval" block: > > > eval { > ... > > ars_GetListEntry( .... ); > die "Error message\n" if $ars_errstr; > > ... > } > > warn $@ if $@; > > # do cleanup here > > > So, in my opinion, in most cases the use of "die" should be just fine. > > > Best regards, > Thilo > > > Jarl Gr?neng wrote: >> I does not like the die parameter if you got an error. You may miss >> the clean-up part. >> >> - >> Jarl >> >> On 8/9/07, Thilo Stapff <thi...@ap...> wrote: >>> ars_GetListEntry needs at least one more parameter (firstRetrieve, >>> usually = 0): >>> >>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0); >>> >>> instead of >>> >>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >>> >>> >>> Moreover, you should always check for errors after calling an API >>> function, e.g. >>> >>> die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr; >>> >>> >>> You might also try using the field ID of "Category" instead of the field >>> name in the qualifier string. >>> >>> >>> Regards, >>> Thilo Stapff >>> >>> >>> Ravi wrote: >>>> Hi:I am trying query a schema and print a fieldname and values for all >>>> records with a qualifying filter. I can't seem to figure out which >>>> function to use and how. This is what I have now and I get 0 records. >>>> Is >>>> asr_GetListEntry the right function? Does someone have a sample script >>>> or point me to the right one in the example dir? >>>> >>>> $schema = "My:Alarm Base"; >>>> $qs = qq/'Category' = "Voice"/; >>>> ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) || >>>> die "error in ars_LoadQualifier"; >>>> >>>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0); >>>> >>>> foreach $entry_id (sort keys %entries) { >>>> printf("%s %s\n", $entry_id, $entries{$entry_id}); >>>> } >>>> >>>> >>>> Thanks >>>> Ravi >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by: Splunk Inc. >>>> Still grepping through log files to find problems? Stop. >>>> Now Search log events and configuration files using AJAX and a browser. >>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>> _______________________________________________ >>>> Arsperl-users mailing list >>>> Ars...@ar... >>>> https://lists.sourceforge.net/lists/listinfo/arsperl-users >>>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Arsperl-users mailing list >>> Ars...@ar... >>> https://lists.sourceforge.net/lists/listinfo/arsperl-users >>> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Arsperl-users mailing list >> Ars...@ar... >> https://lists.sourceforge.net/lists/listinfo/arsperl-users >> > > > > > ------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > ------------------------------ > > _______________________________________________ > Arsperl-users mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-users > > > End of Arsperl-users Digest, Vol 16, Issue 4 > ******************************************** |
|
From: Wesley S. <wes...@or...> - 2007-08-14 14:04:54
|
Hi all, I'm trying to install ARSperl on Solaris 9 against ARS 6.03, patch 21. SunOS xxxxx.wanadoo.nl 5.9 Generic_118558-28 sun4u sparc SUNW,Sun-Fire-V210 I noticed in the Makefile.PL that you can choose a ARSVERSION. When you pick a version <6.3 the artypes.ph is not copied to the INST_LIBDIR. However, the file ARSar-h.pm still has the following line (line 5): require 'artypes.ph'; /home/wesleys/ARSperl-1.90/example$ ./connect.pl Can't locate artypes.ph in @INC (did you run h2ph?) (@INC contains: /opt/EURONET/perl5.8.5/lib/5.8.5/sun4-solaris-thread-multi /opt/EURONET/perl5.8.5/lib/5.8.5 /opt/EURONET/perl5.8.5/lib/site_perl/5.8.5/sun4-solaris-thread-multi /opt/EURONET/perl5.8.5/lib/site_perl/5.8.5 /opt/EURONET/perl5.8.5/lib/site_perl /opt/IMS/lib .) at /opt/EURONET/perl5.8.5/lib/site_perl/5.8.5/sun4-solaris-thread-multi/ARSar-h.pm line 5. Compilation failed in require at /opt/EURONET/perl5.8.5/lib/site_perl/5.8.5/sun4-solaris-thread-multi/ARS.pm line 67. Compilation failed in require at ./connect.pl line 3. BEGIN failed--compilation aborted at ./connect.pl line 3. However, when you run the code from the src location it will run the same code: /home/wesleys/ARSperl-1.90$ /opt/perl example/connect.pl $VAR1 = bless( do{\(my $o = 4626376)}, 'ARControlStructPtr' ); The reason is that artypes.ph is present in /home/wesleys/ARSperl-1.90. Perhaps the artypes.ph can be installed when you select a version <6.3? connect.pl is a small script to check wheter you can connect to the ARS server: use ARS; use Data::Dumper; my ($server, $account, $password, $port) = ("localhost", "User", "Pass", 123456); $c = ars_Login($server, $account, $password, undef, undef, $port, undef); print Dumper $c; When I change the ARSVERSION to 6.3 everything works fine. Cheers, Wesley |
|
From: <jar...@gm...> - 2007-08-09 18:44:49
|
How can I understand that this die is an example?
--
Jar=F8
On 8/9/07, Clayton Scott <cla...@gm...> wrote:
> Using "die" is just an example.
>
> You could also "warn" and continue, or whatever you want.
> Just check the value of $ars_errstr.
>
> if ($ars_errstr){
> # do what you need to do if there is an error
> }
>
> On 8/9/07, Jarl Gr=F8neng <jar...@gm...> wrote:
> > I does not like the die parameter if you got an error. You may miss
> > the clean-up part.
> >
> > -
> > Jarl
> >
> > On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> > > ars_GetListEntry needs at least one more parameter (firstRetrieve,
> > > usually =3D 0):
> > >
> > > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
> > >
> > > instead of
> > >
> > > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> > >
> > >
> > > Moreover, you should always check for errors after calling an API
> > > function, e.g.
> > >
> > > die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errs=
tr;
> > >
> > >
> > > You might also try using the field ID of "Category" instead of the fi=
eld
> > > name in the qualifier string.
> > >
> > >
> > > Regards,
> > > Thilo Stapff
> > >
> > >
> > > Ravi wrote:
> > > > Hi:I am trying query a schema and print a fieldname and values for =
all
> > > > records with a qualifying filter. I can't seem to figure out which
> > > > function to use and how. This is what I have now and I get 0 record=
s. Is
> > > > asr_GetListEntry the right function? Does someone have a sample scr=
ipt
> > > > or point me to the right one in the example dir?
> > > >
> > > > $schema =3D "My:Alarm Base";
> > > > $qs =3D qq/'Category' =3D "Voice"/;
> > > > ($qual =3D ars_LoadQualifier($ctrl,$schema,$qs)) ||
> > > > die "error in ars_LoadQualifier";
> > > >
> > > > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> > > >
> > > > foreach $entry_id (sort keys %entries) {
> > > > printf("%s %s\n", $entry_id, $entries{$entry_id});
> > > > }
> > > >
> > > >
> > > > Thanks
> > > > Ravi
> > > >
> > > >
> > > > -------------------------------------------------------------------=
------
> > > > This SF.net email is sponsored by: Splunk Inc.
> > > > Still grepping through log files to find problems? Stop.
> > > > Now Search log events and configuration files using AJAX and a brow=
ser.
> > > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > > _______________________________________________
> > > > Arsperl-users mailing list
> > > > Ars...@ar...
> > > > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------=
----
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems? Stop.
> > > Now Search log events and configuration files using AJAX and a browse=
r.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > _______________________________________________
> > > Arsperl-users mailing list
> > > Ars...@ar...
> > > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> > >
> >
> > -----------------------------------------------------------------------=
--
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Arsperl-users mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >
>
>
> --
>
> Clayton Scott
> cla...@gm...
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: <jar...@gm...> - 2007-08-09 18:43:20
|
You can not be sure if an external module does the correct cleanup on
die. Therefore, a controlled shutdown is always good practice.
--
Jarl
On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> I'm not sure what you are talking about.
>
> ARTermination() is always called on exit because ARS.xs implements a
> destructor function for ARControlStructPtr objects.
>
> Perl also closes filehandles automatically.
>
> If you have other resources which need cleanup, you can wrap your code
> into an "eval" block:
>
>
> eval {
> ...
>
> ars_GetListEntry( .... );
> die "Error message\n" if $ars_errstr;
>
> ...
> }
>
> warn $@ if $@;
>
> # do cleanup here
>
>
> So, in my opinion, in most cases the use of "die" should be just fine.
>
>
> Best regards,
> Thilo
>
>
> Jarl Gr=F8neng wrote:
> > I does not like the die parameter if you got an error. You may miss
> > the clean-up part.
> >
> > -
> > Jarl
> >
> > On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> >> ars_GetListEntry needs at least one more parameter (firstRetrieve,
> >> usually =3D 0):
> >>
> >> %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
> >>
> >> instead of
> >>
> >> %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> >>
> >>
> >> Moreover, you should always check for errors after calling an API
> >> function, e.g.
> >>
> >> die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errst=
r;
> >>
> >>
> >> You might also try using the field ID of "Category" instead of the fie=
ld
> >> name in the qualifier string.
> >>
> >>
> >> Regards,
> >> Thilo Stapff
> >>
> >>
> >> Ravi wrote:
> >>> Hi:I am trying query a schema and print a fieldname and values for al=
l
> >>> records with a qualifying filter. I can't seem to figure out which
> >>> function to use and how. This is what I have now and I get 0 records.=
Is
> >>> asr_GetListEntry the right function? Does someone have a sample scrip=
t
> >>> or point me to the right one in the example dir?
> >>>
> >>> $schema =3D "My:Alarm Base";
> >>> $qs =3D qq/'Category' =3D "Voice"/;
> >>> ($qual =3D ars_LoadQualifier($ctrl,$schema,$qs)) ||
> >>> die "error in ars_LoadQualifier";
> >>>
> >>> %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> >>>
> >>> foreach $entry_id (sort keys %entries) {
> >>> printf("%s %s\n", $entry_id, $entries{$entry_id});
> >>> }
> >>>
> >>>
> >>> Thanks
> >>> Ravi
> >>>
> >>>
> >>> ---------------------------------------------------------------------=
----
> >>> This SF.net email is sponsored by: Splunk Inc.
> >>> Still grepping through log files to find problems? Stop.
> >>> Now Search log events and configuration files using AJAX and a browse=
r.
> >>> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >>> _______________________________________________
> >>> Arsperl-users mailing list
> >>> Ars...@ar...
> >>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >>>
> >>
> >> ----------------------------------------------------------------------=
---
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems? Stop.
> >> Now Search log events and configuration files using AJAX and a browser=
.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> Arsperl-users mailing list
> >> Ars...@ar...
> >> https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >>
> >
> > -----------------------------------------------------------------------=
--
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Arsperl-users mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Thilo S. <thi...@ap...> - 2007-08-09 18:29:49
|
I'm not sure what you are talking about.
ARTermination() is always called on exit because ARS.xs implements a
destructor function for ARControlStructPtr objects.
Perl also closes filehandles automatically.
If you have other resources which need cleanup, you can wrap your code
into an "eval" block:
eval {
...
ars_GetListEntry( .... );
die "Error message\n" if $ars_errstr;
...
}
warn $@ if $@;
# do cleanup here
So, in my opinion, in most cases the use of "die" should be just fine.
Best regards,
Thilo
Jarl Grøneng wrote:
> I does not like the die parameter if you got an error. You may miss
> the clean-up part.
>
> -
> Jarl
>
> On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
>> ars_GetListEntry needs at least one more parameter (firstRetrieve,
>> usually = 0):
>>
>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
>>
>> instead of
>>
>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
>>
>>
>> Moreover, you should always check for errors after calling an API
>> function, e.g.
>>
>> die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr;
>>
>>
>> You might also try using the field ID of "Category" instead of the field
>> name in the qualifier string.
>>
>>
>> Regards,
>> Thilo Stapff
>>
>>
>> Ravi wrote:
>>> Hi:I am trying query a schema and print a fieldname and values for all
>>> records with a qualifying filter. I can't seem to figure out which
>>> function to use and how. This is what I have now and I get 0 records. Is
>>> asr_GetListEntry the right function? Does someone have a sample script
>>> or point me to the right one in the example dir?
>>>
>>> $schema = "My:Alarm Base";
>>> $qs = qq/'Category' = "Voice"/;
>>> ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) ||
>>> die "error in ars_LoadQualifier";
>>>
>>> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
>>>
>>> foreach $entry_id (sort keys %entries) {
>>> printf("%s %s\n", $entry_id, $entries{$entry_id});
>>> }
>>>
>>>
>>> Thanks
>>> Ravi
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems? Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>> _______________________________________________
>>> Arsperl-users mailing list
>>> Ars...@ar...
>>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Arsperl-users mailing list
>> Ars...@ar...
>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Clayton S. <cla...@gm...> - 2007-08-09 18:28:23
|
Using "die" is just an example.
You could also "warn" and continue, or whatever you want.
Just check the value of $ars_errstr.
if ($ars_errstr){
# do what you need to do if there is an error
}
On 8/9/07, Jarl Gr=F8neng <jar...@gm...> wrote:
> I does not like the die parameter if you got an error. You may miss
> the clean-up part.
>
> -
> Jarl
>
> On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> > ars_GetListEntry needs at least one more parameter (firstRetrieve,
> > usually =3D 0):
> >
> > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
> >
> > instead of
> >
> > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> >
> >
> > Moreover, you should always check for errors after calling an API
> > function, e.g.
> >
> > die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr=
;
> >
> >
> > You might also try using the field ID of "Category" instead of the fiel=
d
> > name in the qualifier string.
> >
> >
> > Regards,
> > Thilo Stapff
> >
> >
> > Ravi wrote:
> > > Hi:I am trying query a schema and print a fieldname and values for al=
l
> > > records with a qualifying filter. I can't seem to figure out which
> > > function to use and how. This is what I have now and I get 0 records.=
Is
> > > asr_GetListEntry the right function? Does someone have a sample scrip=
t
> > > or point me to the right one in the example dir?
> > >
> > > $schema =3D "My:Alarm Base";
> > > $qs =3D qq/'Category' =3D "Voice"/;
> > > ($qual =3D ars_LoadQualifier($ctrl,$schema,$qs)) ||
> > > die "error in ars_LoadQualifier";
> > >
> > > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> > >
> > > foreach $entry_id (sort keys %entries) {
> > > printf("%s %s\n", $entry_id, $entries{$entry_id});
> > > }
> > >
> > >
> > > Thanks
> > > Ravi
> > >
> > >
> > > ---------------------------------------------------------------------=
----
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems? Stop.
> > > Now Search log events and configuration files using AJAX and a browse=
r.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > _______________________________________________
> > > Arsperl-users mailing list
> > > Ars...@ar...
> > > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> > >
> >
> >
> > -----------------------------------------------------------------------=
--
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Arsperl-users mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
--=20
Clayton Scott
cla...@gm...
|
|
From: <jar...@gm...> - 2007-08-09 17:24:59
|
I does not like the die parameter if you got an error. You may miss
the clean-up part.
-
Jarl
On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> ars_GetListEntry needs at least one more parameter (firstRetrieve,
> usually = 0):
>
> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
>
> instead of
>
> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
>
>
> Moreover, you should always check for errors after calling an API
> function, e.g.
>
> die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr;
>
>
> You might also try using the field ID of "Category" instead of the field
> name in the qualifier string.
>
>
> Regards,
> Thilo Stapff
>
>
> Ravi wrote:
> > Hi:I am trying query a schema and print a fieldname and values for all
> > records with a qualifying filter. I can't seem to figure out which
> > function to use and how. This is what I have now and I get 0 records. Is
> > asr_GetListEntry the right function? Does someone have a sample script
> > or point me to the right one in the example dir?
> >
> > $schema = "My:Alarm Base";
> > $qs = qq/'Category' = "Voice"/;
> > ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) ||
> > die "error in ars_LoadQualifier";
> >
> > %entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
> >
> > foreach $entry_id (sort keys %entries) {
> > printf("%s %s\n", $entry_id, $entries{$entry_id});
> > }
> >
> >
> > Thanks
> > Ravi
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Arsperl-users mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Thilo S. <thi...@ap...> - 2007-08-09 09:01:57
|
ars_GetListEntry needs at least one more parameter (firstRetrieve,
usually = 0):
%entries = ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
instead of
%entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
Moreover, you should always check for errors after calling an API
function, e.g.
die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr;
You might also try using the field ID of "Category" instead of the field
name in the qualifier string.
Regards,
Thilo Stapff
Ravi wrote:
> Hi:I am trying query a schema and print a fieldname and values for all
> records with a qualifying filter. I can't seem to figure out which
> function to use and how. This is what I have now and I get 0 records. Is
> asr_GetListEntry the right function? Does someone have a sample script
> or point me to the right one in the example dir?
>
> $schema = "My:Alarm Base";
> $qs = qq/'Category' = "Voice"/;
> ($qual = ars_LoadQualifier($ctrl,$schema,$qs)) ||
> die "error in ars_LoadQualifier";
>
> %entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
>
> foreach $entry_id (sort keys %entries) {
> printf("%s %s\n", $entry_id, $entries{$entry_id});
> }
>
>
> Thanks
> Ravi
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Ravi <ra...@co...> - 2007-08-09 05:31:32
|
Hi:I am trying query a schema and print a fieldname and values for all
records with a qualifying filter. I can't seem to figure out which
function to use and how. This is what I have now and I get 0 records. Is
asr_GetListEntry the right function? Does someone have a sample script
or point me to the right one in the example dir?
$schema = "My:Alarm Base";
$qs = qq/'Category' = "Voice"/;
($qual = ars_LoadQualifier($ctrl,$schema,$qs)) ||
die "error in ars_LoadQualifier";
%entries = ars_GetListEntry($ctrl, $schema, $qual, 0);
foreach $entry_id (sort keys %entries) {
printf("%s %s\n", $entry_id, $entries{$entry_id});
}
Thanks
Ravi
|
|
From: Peter F. <Pet...@LP...> - 2007-08-05 20:33:00
|
Thanks Jeff.
--
Regards,
Peter
On Tue, July 31, 2007 14:39, Jeff Murphy wrote:
> Peter Farr wrote:
>> I am trying to use the ARS Perl interface to extract some data from
>> Remedy
>> (v5 and v7). I will say up front that I am not extremely
>> Remedy-literate.
>> When I open some (many) forms using:
>>
>> $f = new ARS::form(-form => $schema, -connection => $ars);
>>
>> I get error 339 "Incorrect format for a diary field". Is there some way
>> around this?
>>
>> ARSPerl-1.90 on Linux 2.6. ars_APIVersion() tells me I am compiled
>> against
>> API version 7 on one system and version 9 on the other. I get the same
>> message on either system.
>>
>
>
>
> try
>
> my $a = new ARS($server, $user, $pass);
> my $f = $a->openForm($schema);
> my @e = $f->query('1 = 1');
> print join(', ', @e), "\n";
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Paizo <pai...@gm...> - 2007-08-03 07:31:38
|
Thank you all, very helpfull :)
by now it take 5 minuts instead of 60, an impressive improvement!
2007/8/2, Priddy, Tim <tim...@in...>:
>
> my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) =3D
> localtime ( $entry{$field_id[3]} );
>
> my $timestamp_a =3D sprintf "%02d/%02d/%04d %02d.%02d.%02d", $mday, $mon =
+
> 1, $year + 1900, $hour, $min, $sec;
>
>
>
> I'd recommend that you also start using:
>
>
>
> use warnings;
>
> use strict;
>
>
>
> -----Original Message-----
> From: ars...@ar... [mailto:
> ars...@ar...] On Behalf Of Thilo Stapff
> Sent: Thursday, August 02, 2007 8:50 AM
> To: ARSperl User Discussion
> Subject: Re: [Arsperl-users] Performance problems
>
>
>
> $field_ids[3] contains just the field id itself.
>
>
>
> The value of the field is in $entry{$field_id[3]}}.
>
>
>
> You should also note that gmtime returns the month as numbers 0..11
>
> instead of 1..12.
>
> Anyway, an easier (and problably more reliable) method for date
>
> formatting would be to use a module from CPAN (e.g. Date::Format).
>
>
>
>
>
> Regards,
>
> Thilo
>
>
>
>
>
> Paizo wrote:
>
> > i tried the following:
>
> >
>
> >
>
> > foreach my $entry_id (sort keys %entries) {
>
> > my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids)=
;
>
> >
>
> > print "$field_ids[3]\n";# test: print number 3 the first clicle the=
n
>
>
> > nothing
>
> >
>
> > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =3D
>
> > gmtime($field_ids[3]);
>
> >
>
> > $year +=3D 1900;
>
> > $mon +=3D 1;
>
> >
>
> > if ($mday < 10) {
>
> > $timestamp_a =3D "0".$mday.q{/};
>
> > } else {
>
> > $timestamp_a =3D $mday.q{/};
>
> > }
>
> >
>
> > if ($mon < 10) {
>
> > $timestamp_a .=3D "0".$mon.q{/}.$year." ";
>
> > } else {
>
> > $timestamp_a .=3D $mon.q{/}.$year." ";
>
> > }
>
> >
>
> > if ($hour < 10) {
>
> > $timestamp_a .=3D "0".$hour.".";
>
> > } else {
>
> > $timestamp_a .=3D $hour.".";
>
> > }
>
> >
>
> > if ($min < 10) {
>
> > $timestamp_a .=3D "0".$min.".";
>
> > } else {
>
> > $timestamp_a .=3D $min.".";
>
> > }
>
> >
>
> > if ($sec < 10) {
>
> > $timestamp_a .=3D "0".$sec;
>
> > } else {
>
> > $timestamp_a .=3D $sec;
>
> > }
>
> >
>
> > print "$timestamp_a\n\n"; #test: print 01/01/1970 00.00.03 in the
>
> > first cile then always 01/01/1970 00.00.00
>
> >
>
> > $field_ids[3] =3D $timestamp_a;
>
> > print datafile join("|", @entry{@field_ids} ) . "\n";
>
> >
>
> > }
>
> >
>
> >
>
> > hope its more clear.
>
> >
>
> >
>
> >
>
> > 2007/8/2, Clayton Scott <cla...@gm...
>
> > <mailto:cla...@gm...>>:
>
> >
>
> > On 8/2/07, Paizo <pai...@gm...
>
> > <mailto:pai...@gm...>> wrote:
>
> > > i have another ( stupid question, still new to perl :| ) , if
>
> > inside the the
>
> > > loop:
>
> > > [ loop snipped ]
>
> > > i want to convert some dates that are in seconds since 1970 to
>
> > something
>
> > > like dd/mm/yyyy hh.mm.ss
>
> > > if i try to read $field_ids[3] and always get "3" instead of the
> real
>
> > > content :/
>
> > > what i miss?
>
> >
>
> > Without more code, and data I really can't tell.
>
> >
>
> > If you want the value for a field in the form you more likely want
> to
>
> > use the entry hash:
>
> >
>
> > $entry{'field_id'}
>
> >
>
> > If you want to inspect these data structures you can use the
>
> > Data::Dumper module.
>
> >
>
> > use Data::Dumper;
>
> > ....
>
> >
>
> > print Dumper \@field_ids;
>
> >
>
> > foreach my $entry_id (sort keys %entries) {
>
> > my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id,
> @field_ids);
>
> > print Dumper \%entry;
>
> > print datafile join("|", @entry{@field_ids} ) . "\n";
>
> > }
>
> >
>
> > --
>
> >
>
> > Clayton Scott
>
> > cla...@gm... <mailto:cla...@gm...>
>
> >
>
> >
> -------------------------------------------------------------------------
>
> > This SF.net email is sponsored by: Splunk Inc.
>
> > Still grepping through log files to find problems? Stop.
>
> > Now Search log events and configuration files using AJAX and a
> browser.
>
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
>
> > _______________________________________________
>
> > Arsperl-users mailing list
>
> > Ars...@ar... <mailto:Ars...@ar...>
>
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
> >
>
> >
>
> >
>
> >
>
> > --
>
> > --------------------
>
> > A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta
>
> > trigusto co i gusti seegheta, sarexe e schie co na fettina de poenta.
>
> > El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito e=
l
>
> > pigiama de banane e el ghe ga messo in testa a corona de poegge medie e
>
> > lo ga fatto diventare Re dei Gelati Biricchini.
>
> > -----------------------
>
> > Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e
>
> > fete de poenta, stile estat=E8 o quea dea ciocoeata
>
> > Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da
>
> > tociare o erbagatta/straciatella/calsina co coe de sorxe da tociare
>
> > ------------
>
> > Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli
>
> > col el gusto crema al diserbo e parafl=F9 ricoperta da una soffice cros=
ta
>
> > de pus co al posto del bacheto un termometro anale pratico pa misurarse
>
> > a freve dopo aver magn=E0 el geato (chi xe che no lo fa al giorno
>
> > d'oggi?!?!). Garantite scorese bitonali e solfeggi anali.
>
> >
>
> >
>
> > -----------------------------------------------------------------------=
-
>
> >
>
> >
> -------------------------------------------------------------------------
>
> > This SF.net email is sponsored by: Splunk Inc.
>
> > Still grepping through log files to find problems? Stop.
>
> > Now Search log events and configuration files using AJAX and a browser.
>
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
>
> >
>
> >
>
> > -----------------------------------------------------------------------=
-
>
> >
>
> > _______________________________________________
>
> > Arsperl-users mailing list
>
> > Ars...@ar...
>
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
>
>
>
>
> -------------------------------------------------------------------------
>
> This SF.net email is sponsored by: Splunk Inc.
>
> Still grepping through log files to find problems? Stop.
>
> Now Search log events and configuration files using AJAX and a browser.
>
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>
> _______________________________________________
>
> Arsperl-users mailing list
>
> Ars...@ar...
>
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
>
--=20
--------------------
A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta trig=
usto
co i gusti seegheta, sarexe e schie co na fettina de poenta.
El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito el
pigiama de banane e el ghe ga messo in testa a corona de poegge medie e lo
ga fatto diventare Re dei Gelati Biricchini.
-----------------------
Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e fete
de poenta, stile estat=E8 o quea dea ciocoeata
Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da tociare o
erbagatta/straciatella/calsina co coe de sorxe da tociare
------------
Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli col e=
l
gusto crema al diserbo e parafl=F9 ricoperta da una soffice crosta de pus c=
o
al posto del bacheto un termometro anale pratico pa misurarse a freve dopo
aver magn=E0 el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite
scorese bitonali e solfeggi anali.
|
|
From: Priddy, T. <tim...@in...> - 2007-08-02 21:30:31
|
my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) =3D =
localtime ( $entry{$field_id[3]} ); =
=20
my $timestamp_a =3D sprintf "%02d/%02d/%04d %02d.%02d.%02d", $mday, $mon =
+ 1, $year + 1900, $hour, $min, $sec;
=20
I'd recommend that you also start using:
=20
use warnings;
use strict;
=20
-----Original Message-----
From: ars...@ar... =
[mailto:ars...@ar...] On Behalf Of Thilo Stapff
Sent: Thursday, August 02, 2007 8:50 AM
To: ARSperl User Discussion
Subject: Re: [Arsperl-users] Performance problems
=20
$field_ids[3] contains just the field id itself.
=20
The value of the field is in $entry{$field_id[3]}}.
=20
You should also note that gmtime returns the month as numbers 0..11=20
instead of 1..12.
Anyway, an easier (and problably more reliable) method for date=20
formatting would be to use a module from CPAN (e.g. Date::Format).
=20
=20
Regards,
Thilo
=20
=20
Paizo wrote:
> i tried the following:
>=20
>=20
> foreach my $entry_id (sort keys %entries) {
> my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, =
@field_ids);
>=20
> print "$field_ids[3]\n";# test: print number 3 the first clicle =
then=20
> nothing
>=20
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =3D=20
> gmtime($field_ids[3]); =20
> =20
> $year +=3D 1900;
> $mon +=3D 1;
> =20
> if ($mday < 10) {
> $timestamp_a =3D "0".$mday.q{/};
> } else {
> $timestamp_a =3D $mday.q{/};
> }
> =20
> if ($mon < 10) {
> $timestamp_a .=3D "0".$mon.q{/}.$year." ";
> } else {
> $timestamp_a .=3D $mon.q{/}.$year." ";
> }
> =20
> if ($hour < 10) {
> $timestamp_a .=3D "0".$hour.".";
> } else {
> $timestamp_a .=3D $hour.".";
> } =20
>=20
> if ($min < 10) {
> $timestamp_a .=3D "0".$min.".";
> } else {
> $timestamp_a .=3D $min.".";
> } =20
>=20
> if ($sec < 10) {
> $timestamp_a .=3D "0".$sec;
> } else {
> $timestamp_a .=3D $sec;
> }
>=20
> print "$timestamp_a\n\n"; #test: print 01/01/1970 00.00.03 in the =
> first cile then always 01/01/1970 00.00.00
>=20
> $field_ids[3] =3D $timestamp_a;
> print datafile join("|", @entry{@field_ids} ) . "\n";
>=20
> }
>=20
>=20
> hope its more clear.
>=20
>=20
>=20
> 2007/8/2, Clayton Scott <cla...@gm...=20
> <mailto:cla...@gm...>>:
>=20
> On 8/2/07, Paizo <pai...@gm...
> <mailto:pai...@gm...>> wrote:
> > i have another ( stupid question, still new to perl :| ) , if
> inside the the
> > loop:
> > [ loop snipped ]
> > i want to convert some dates that are in seconds since 1970 to
> something
> > like dd/mm/yyyy hh.mm.ss
> > if i try to read $field_ids[3] and always get "3" instead of =
the real
> > content :/
> > what i miss?
>=20
> Without more code, and data I really can't tell.
>=20
> If you want the value for a field in the form you more likely want =
to
> use the entry hash:
>=20
> $entry{'field_id'}
>=20
> If you want to inspect these data structures you can use the
> Data::Dumper module.
>=20
> use Data::Dumper;
> ....
>=20
> print Dumper \@field_ids;
>=20
> foreach my $entry_id (sort keys %entries) {
> my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, =
@field_ids);
> print Dumper \%entry;
> print datafile join("|", @entry{@field_ids} ) . "\n";
> }
>=20
> --
>=20
> Clayton Scott
> cla...@gm... <mailto:cla...@gm...>
>=20
> =
-------------------------------------------------------------------------=
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a =
browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar... <mailto:Ars...@ar...>
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>=20
>=20
>=20
>=20
> --=20
> --------------------
> A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta =
> trigusto co i gusti seegheta, sarexe e schie co na fettina de poenta.
> El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito =
el=20
> pigiama de banane e el ghe ga messo in testa a corona de poegge medie =
e=20
> lo ga fatto diventare Re dei Gelati Biricchini.
> -----------------------
> Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e=20
> fete de poenta, stile estat=E8 o quea dea ciocoeata
> Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da=20
> tociare o erbagatta/straciatella/calsina co coe de sorxe da tociare
> ------------
> Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli=20
> col el gusto crema al diserbo e parafl=F9 ricoperta da una soffice =
crosta=20
> de pus co al posto del bacheto un termometro anale pratico pa =
misurarse=20
> a freve dopo aver magn=E0 el geato (chi xe che no lo fa al giorno=20
> d'oggi?!?!). Garantite scorese bitonali e solfeggi anali.
>=20
>=20
> =
------------------------------------------------------------------------
>=20
> =
-------------------------------------------------------------------------=
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a =
browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>=20
>=20
> =
------------------------------------------------------------------------
>=20
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
=20
=20
-------------------------------------------------------------------------=
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Arsperl-users mailing list
Ars...@ar...
https://lists.sourceforge.net/lists/listinfo/arsperl-users
|
|
From: Thilo S. <thi...@ap...> - 2007-08-02 15:50:22
|
$field_ids[3] contains just the field id itself.
The value of the field is in $entry{$field_id[3]}}.
You should also note that gmtime returns the month as numbers 0..11
instead of 1..12.
Anyway, an easier (and problably more reliable) method for date
formatting would be to use a module from CPAN (e.g. Date::Format).
Regards,
Thilo
Paizo wrote:
> i tried the following:
>
>
> foreach my $entry_id (sort keys %entries) {
> my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
>
> print "$field_ids[3]\n";# test: print number 3 the first clicle then
> nothing
>
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
> gmtime($field_ids[3]);
>
> $year += 1900;
> $mon += 1;
>
> if ($mday < 10) {
> $timestamp_a = "0".$mday.q{/};
> } else {
> $timestamp_a = $mday.q{/};
> }
>
> if ($mon < 10) {
> $timestamp_a .= "0".$mon.q{/}.$year." ";
> } else {
> $timestamp_a .= $mon.q{/}.$year." ";
> }
>
> if ($hour < 10) {
> $timestamp_a .= "0".$hour.".";
> } else {
> $timestamp_a .= $hour.".";
> }
>
> if ($min < 10) {
> $timestamp_a .= "0".$min.".";
> } else {
> $timestamp_a .= $min.".";
> }
>
> if ($sec < 10) {
> $timestamp_a .= "0".$sec;
> } else {
> $timestamp_a .= $sec;
> }
>
> print "$timestamp_a\n\n"; #test: print 01/01/1970 00.00.03 in the
> first cile then always 01/01/1970 00.00.00
>
> $field_ids[3] = $timestamp_a;
> print datafile join("|", @entry{@field_ids} ) . "\n";
>
> }
>
>
> hope its more clear.
>
>
>
> 2007/8/2, Clayton Scott <cla...@gm...
> <mailto:cla...@gm...>>:
>
> On 8/2/07, Paizo <pai...@gm...
> <mailto:pai...@gm...>> wrote:
> > i have another ( stupid question, still new to perl :| ) , if
> inside the the
> > loop:
> > [ loop snipped ]
> > i want to convert some dates that are in seconds since 1970 to
> something
> > like dd/mm/yyyy hh.mm.ss
> > if i try to read $field_ids[3] and always get "3" instead of the real
> > content :/
> > what i miss?
>
> Without more code, and data I really can't tell.
>
> If you want the value for a field in the form you more likely want to
> use the entry hash:
>
> $entry{'field_id'}
>
> If you want to inspect these data structures you can use the
> Data::Dumper module.
>
> use Data::Dumper;
> ....
>
> print Dumper \@field_ids;
>
> foreach my $entry_id (sort keys %entries) {
> my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
> print Dumper \%entry;
> print datafile join("|", @entry{@field_ids} ) . "\n";
> }
>
> --
>
> Clayton Scott
> cla...@gm... <mailto:cla...@gm...>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar... <mailto:Ars...@ar...>
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
>
>
>
> --
> --------------------
> A me cugin na volta xe ndà dal geataro e el ga domandà na coppetta
> trigusto co i gusti seegheta, sarexe e schie co na fettina de poenta.
> El geataro pena sentio cheà goduriosa scelta, el se ga messo subito el
> pigiama de banane e el ghe ga messo in testa a corona de poegge medie e
> lo ga fatto diventare Re dei Gelati Biricchini.
> -----------------------
> Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e
> fete de poenta, stile estatè o quea dea ciocoeata
> Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da
> tociare o erbagatta/straciatella/calsina co coe de sorxe da tociare
> ------------
> Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli
> col el gusto crema al diserbo e paraflù ricoperta da una soffice crosta
> de pus co al posto del bacheto un termometro anale pratico pa misurarse
> a freve dopo aver magnà el geato (chi xe che no lo fa al giorno
> d'oggi?!?!). Garantite scorese bitonali e solfeggi anali.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
|
|
From: Paizo <pai...@gm...> - 2007-08-02 15:20:40
|
i tried the following:
foreach my $entry_id (sort keys %entries) {
my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
print "$field_ids[3]\n";# test: print number 3 the first clicle then
nothing
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =3D
gmtime($field_ids[3]);
$year +=3D 1900;
$mon +=3D 1;
if ($mday < 10) {
$timestamp_a =3D "0".$mday.q{/};
} else {
$timestamp_a =3D $mday.q{/};
}
if ($mon < 10) {
$timestamp_a .=3D "0".$mon.q{/}.$year." ";
} else {
$timestamp_a .=3D $mon.q{/}.$year." ";
}
if ($hour < 10) {
$timestamp_a .=3D "0".$hour.".";
} else {
$timestamp_a .=3D $hour.".";
}
if ($min < 10) {
$timestamp_a .=3D "0".$min.".";
} else {
$timestamp_a .=3D $min.".";
}
if ($sec < 10) {
$timestamp_a .=3D "0".$sec;
} else {
$timestamp_a .=3D $sec;
}
print "$timestamp_a\n\n"; #test: print 01/01/1970 00.00.03 in the firs=
t
cile then always 01/01/1970 00.00.00
$field_ids[3] =3D $timestamp_a;
print datafile join("|", @entry{@field_ids} ) . "\n";
}
hope its more clear.
2007/8/2, Clayton Scott <cla...@gm...>:
>
> On 8/2/07, Paizo <pai...@gm...> wrote:
> > i have another ( stupid question, still new to perl :| ) , if inside th=
e
> the
> > loop:
> > [ loop snipped ]
> > i want to convert some dates that are in seconds since 1970 to somethin=
g
> > like dd/mm/yyyy hh.mm.ss
> > if i try to read $field_ids[3] and always get "3" instead of the real
> > content :/
> > what i miss?
>
> Without more code, and data I really can't tell.
>
> If you want the value for a field in the form you more likely want to
> use the entry hash:
>
> $entry{'field_id'}
>
> If you want to inspect these data structures you can use the
> Data::Dumper module.
>
> use Data::Dumper;
> ....
>
> print Dumper \@field_ids;
>
> foreach my $entry_id (sort keys %entries) {
> my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
> print Dumper \%entry;
> print datafile join("|", @entry{@field_ids} ) . "\n";
> }
>
> --
>
> Clayton Scott
> cla...@gm...
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
--=20
--------------------
A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta trig=
usto
co i gusti seegheta, sarexe e schie co na fettina de poenta.
El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito el
pigiama de banane e el ghe ga messo in testa a corona de poegge medie e lo
ga fatto diventare Re dei Gelati Biricchini.
-----------------------
Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e fete
de poenta, stile estat=E8 o quea dea ciocoeata
Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da tociare o
erbagatta/straciatella/calsina co coe de sorxe da tociare
------------
Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli col e=
l
gusto crema al diserbo e parafl=F9 ricoperta da una soffice crosta de pus c=
o
al posto del bacheto un termometro anale pratico pa misurarse a freve dopo
aver magn=E0 el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite
scorese bitonali e solfeggi anali.
|
|
From: Clayton S. <cla...@gm...> - 2007-08-02 14:48:50
|
On 8/2/07, Paizo <pai...@gm...> wrote:
> i have another ( stupid question, still new to perl :| ) , if inside the the
> loop:
> [ loop snipped ]
> i want to convert some dates that are in seconds since 1970 to something
> like dd/mm/yyyy hh.mm.ss
> if i try to read $field_ids[3] and always get "3" instead of the real
> content :/
> what i miss?
Without more code, and data I really can't tell.
If you want the value for a field in the form you more likely want to
use the entry hash:
$entry{'field_id'}
If you want to inspect these data structures you can use the
Data::Dumper module.
use Data::Dumper;
....
print Dumper \@field_ids;
foreach my $entry_id (sort keys %entries) {
my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
print Dumper \%entry;
print datafile join("|", @entry{@field_ids} ) . "\n";
}
--
Clayton Scott
cla...@gm...
|
|
From: Paizo <pai...@gm...> - 2007-08-02 14:35:14
|
Thanks guys, that helps a lot :)
>I'd also like to know some more details about what's going wrong with
>ars_GetFieldTable. Maybe this is a bug in ARSperl and your informations
>could help me to fix it.
Don't remeber exaclty, sometimes ( rare )
(%fids =3D ars_GetFieldTable($ctrl, $schema)) ||
die "ars_GetFieldTable: $ars_errstr";
fail and print out the classic ARERR code...i remember it was like "you
don't have permissions..." but i forgot the error code number :/
i have another ( stupid question, still new to perl :| ) , if inside the th=
e
loop:
# Getting Entries
foreach my $entry_id (sort keys %entries) {
my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
print datafile join("|", @entry{@field_ids} ) . "\n";
}
i want to convert some dates that are in seconds since 1970 to something
like dd/mm/yyyy hh.mm.ss
if i try to read $field_ids[3] and always get "3" instead of the real
content :/
what i miss?
2007/8/2, Clayton Scott <cla...@gm...>:
>
> Paizo wrote:
> > Hi Listeners,
> >
> > I have some performance problem executing a perl script working like
> below:
> >
> > [ code snipped ]
> > That's take up too 1 hour for finish while using the same qualification
> with
> > AR System User take less than 2 minuts....
> >
> > How can i speed up that code?
> >
> > Thanks,
>
>
> One way to get an excellent increase in speed is to fetch all of the
> fields for each entry at once instead of individually.
>
> You should work hard to reduce the number of ars_ calls required
> because they involve the slowest part of this set up: the network.
>
> I'll show you a modified version of your final loop that does this.
> But first put your field id fetching into a loop and your field ids
> into an array so that they are easier to add/remove fields and pass
> the field ids on to the ars_GetEntry call.
>
> # Getting Field Ids
> my @field_names =3D ('something1', ... ,'somthingn');
> my @field_ids;
>
> foreach my $field_name ( @field_names ){
> my $field_id;
> ($field_id =3D ars_GetFieldByName($ctrl, $ARSschema, $field_name) ||
> die "bla bla bla.\n";
> push @field_ids, $field_id;
> }
>
> # Getting Entries
> foreach my $entry_id (sort keys %entries) {
> my %entry =3D ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
> print datafile join("|", @entry{@field_ids} ) . "\n";
> }
>
> I hope this helps,
>
> --
>
> Clayton Scott
> cla...@gm...
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
--=20
--------------------
A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta trig=
usto
co i gusti seegheta, sarexe e schie co na fettina de poenta.
El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito el
pigiama de banane e el ghe ga messo in testa a corona de poegge medie e lo
ga fatto diventare Re dei Gelati Biricchini.
-----------------------
Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e fete
de poenta, stile estat=E8 o quea dea ciocoeata
Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da tociare o
erbagatta/straciatella/calsina co coe de sorxe da tociare
------------
Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli col e=
l
gusto crema al diserbo e parafl=F9 ricoperta da una soffice crosta de pus c=
o
al posto del bacheto un termometro anale pratico pa misurarse a freve dopo
aver magn=E0 el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite
scorese bitonali e solfeggi anali.
|
|
From: Clayton S. <cla...@gm...> - 2007-08-02 11:44:10
|
Paizo wrote:
> Hi Listeners,
>
> I have some performance problem executing a perl script working like below:
>
> [ code snipped ]
> That's take up too 1 hour for finish while using the same qualification with
> AR System User take less than 2 minuts....
>
> How can i speed up that code?
>
> Thanks,
One way to get an excellent increase in speed is to fetch all of the
fields for each entry at once instead of individually.
You should work hard to reduce the number of ars_ calls required
because they involve the slowest part of this set up: the network.
I'll show you a modified version of your final loop that does this.
But first put your field id fetching into a loop and your field ids
into an array so that they are easier to add/remove fields and pass
the field ids on to the ars_GetEntry call.
# Getting Field Ids
my @field_names = ('something1', ... ,'somthingn');
my @field_ids;
foreach my $field_name ( @field_names ){
my $field_id;
($field_id = ars_GetFieldByName($ctrl, $ARSschema, $field_name) ||
die "bla bla bla.\n";
push @field_ids, $field_id;
}
# Getting Entries
foreach my $entry_id (sort keys %entries) {
my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
print datafile join("|", @entry{@field_ids} ) . "\n";
}
I hope this helps,
--
Clayton Scott
cla...@gm...
|
|
From: Thilo S. <thi...@ap...> - 2007-08-02 11:13:12
|
In the "foreach" loop, you are executing a separate API call for every
field. It should be much faster to fetch the whole entry with one call:
%entry = ars_GetEntry( $ctrl, $ARSschema, $entry_id, $x1,..,$xn );
die "ars_GetEntry($ARSschema,$entry_id): $ars_errstr" if $ars_errstr;
print datafile join("|", map {$entry{$_}} ($x1,..,$x)), "\n";
Using ars_GetListEntryWithFields (if you aren't fetching large char
(over 255 character) or diary fields) or ars_GetMultipleEntries might
improve the performance even a bit further.
By the way, instead of having n variables $x1,...,$xn for the field ids,
a better solution would be to store them in an array:
my @names = ($var1,...,$varN);
my @fieldIds;
foreach my $name ( @names ){
push @fieldIds, ars_GetFieldByName( $ctrl, $schema, $name );
}
and then call
%entry = ars_GetEntry( $ctrl, $ARSschema, $entry_id, @fieldIds );
I'd also like to know some more details about what's going wrong with
ars_GetFieldTable. Maybe this is a bug in ARSperl and your informations
could help me to fix it.
Best regards,
Thilo
Paizo wrote:
>
> Hi Listeners,
>
> I have some performance problem executing a perl script working like below:
>
>
>
> $var1 = "something1";
> ($x1 = ars_GetFieldByName($ctrl, $ARSschema, $var1)) || die "bla bla
> bla.\n";
>
> ...
>
> $varn = "somethingn";
> ($xn = ars_GetFieldByName($ctrl, $ARSschema, $var1)) || die "bla bla
> bla.\n";
>
> #####i used ars_GetFieldByName because ars_GetFieldTable didn't work
> always ( i don't know why )
>
> #######then i load the qualifier:
>
> ($qual = ars_LoadQualifier($ctrl, $ARSschema, $str_qual)) ||
> die "ars_LoadQualifier: $ars_errstr";
>
> ...
>
> ####i retrieve the results ( don't take too much time ):
>
> (%entries = ars_GetListEntry($ctrl, $ARSschema, $qual, 0, 0)) || die
> "ars_GetListEntry: $ars_errstr";
>
> #### then i cicle for save the data in a file ( that is the bottle neck ):
>
> foreach $entry_id (sort keys %entries) {
>
> $something1 = ars_GetEntry($ctrl, $ARSschema, $entry_id,$x1);
> ...
> $somethingn = ars_GetEntry($ctrl, $ARSschema, $entry_id,$xn);
>
> print datafile "$something1|$something2|...|$somethingn\n";
>
> }
>
>
> That's take up too 1 hour for finish while using the same qualification
> with AR System User take less than 2 minuts....
>
> How can i speed up that code?
>
> Thanks,
>
> Paizo
>
>
> --
> --------------------
> A me cugin na volta xe ndà dal geataro e el ga domandà na coppetta
> trigusto co i gusti seegheta, sarexe e schie co na fettina de poenta.
> El geataro pena sentio cheà goduriosa scelta, el se ga messo subito el
> pigiama de banane e el ghe ga messo in testa a corona de poegge medie e
> lo ga fatto diventare Re dei Gelati Biricchini.
> -----------------------
> Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e
> fete de poenta, stile estatè o quea dea ciocoeata
> Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da
> tociare o erbagatta/straciatella/calsina co coe de sorxe da tociare
> ------------
> Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli
> col el gusto crema al diserbo e paraflù ricoperta da una soffice crosta
> de pus co al posto del bacheto un termometro anale pratico pa misurarse
> a freve dopo aver magnà el geato (chi xe che no lo fa al giorno
> d'oggi?!?!). Garantite scorese bitonali e solfeggi anali.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
|
|
From: Paizo <pai...@gm...> - 2007-08-02 10:50:52
|
Hi Listeners,
I have some performance problem executing a perl script working like below:
$var1 =3D "something1";
($x1 =3D ars_GetFieldByName($ctrl, $ARSschema, $var1)) || die "bla bla
bla.\n";
...
$varn =3D "somethingn";
($xn =3D ars_GetFieldByName($ctrl, $ARSschema, $var1)) || die "bla bla
bla.\n";
#####i used ars_GetFieldByName because ars_GetFieldTable didn't work always
( i don't know why )
#######then i load the qualifier:
($qual =3D ars_LoadQualifier($ctrl, $ARSschema, $str_qual)) ||
die "ars_LoadQualifier: $ars_errstr";
...
####i retrieve the results ( don't take too much time ):
(%entries =3D ars_GetListEntry($ctrl, $ARSschema, $qual, 0, 0)) || die
"ars_GetListEntry: $ars_errstr";
#### then i cicle for save the data in a file ( that is the bottle neck ):
foreach $entry_id (sort keys %entries) {
$something1 =3D ars_GetEntry($ctrl, $ARSschema, $entry_id,$x1);
...
$somethingn =3D ars_GetEntry($ctrl, $ARSschema, $entry_id,$xn);
print datafile "$something1|$something2|...|$somethingn\n";
}
That's take up too 1 hour for finish while using the same qualification wit=
h
AR System User take less than 2 minuts....
How can i speed up that code?
Thanks,
Paizo
--=20
--------------------
A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta trig=
usto
co i gusti seegheta, sarexe e schie co na fettina de poenta.
El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito el
pigiama de banane e el ghe ga messo in testa a corona de poegge medie e lo
ga fatto diventare Re dei Gelati Biricchini.
-----------------------
Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e fete
de poenta, stile estat=E8 o quea dea ciocoeata
Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da tociare o
erbagatta/straciatella/calsina co coe de sorxe da tociare
------------
Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli col e=
l
gusto crema al diserbo e parafl=F9 ricoperta da una soffice crosta de pus c=
o
al posto del bacheto un termometro anale pratico pa misurarse a freve dopo
aver magn=E0 el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite
scorese bitonali e solfeggi anali.
|