[ic] Accessing $Db or $Sql in Jobs?
Jeff Fearn
jefffearn at gmail.com
Wed Jan 5 20:41:07 EST 2005
Hi, how do you make $Db or $Sql accessable to usertags run using the
jobs functionality?
I have a job which uses a new usertag, however $Db and $Sql are empty.
I have used $Db and $Sql in another usertag; which is used in the
order routing; without a problem. I am assuming this is something to
do with this tag being used via the job queue ... this may be a very
bad assumption :}
I have tried setting "AllowGlobal foundation" in interchange.cfg,
which I really don't want to do, with no effect.
The job just contains:
[x12_945]
The tag code is:
UserTag x12_945 Routine <<EOR
sub
{
# Make sure we have the EDI module installed
eval
{
use X12::Base;
};
if($@)
{
::logError("Could not load X12::Base Module. X12-945
processing failed!\n");
return(1);
}
# Both of these always die
my $dbh = $Sql{orderline} or die("No SQL orderline database!\n");
my $ref = $Db{orderline} or die("No orderline database!\n");
.....
}
TIA, Jeff.
More information about the interchange-users
mailing list