Looking at error codes on the command line with PERL

General discussion about eValid, its characteristis and applications.

Looking at error codes on the command line with PERL

Postby HNeedham » Mon Mar 07, 2022 10:08 am

Morning.

Does eValid by chance able to determine Error Codes via the Command Line (in PERL)?

Thanks
HNeedham
 
Posts: 1
Joined: Mon Mar 07, 2022 9:55 am

Re: Looking at error codes on the command line with PERL

Postby eValid » Tue Mar 08, 2022 10:30 am

HNeedham wrote:Morning.

Does eValid by chance able to determine Error Codes via the Command Line (in PERL)?

Thanks


Thanks for posting your question HNeedham.

When running eValid from the command line, an important aspect of the eValid playback is to be able to read the result of the playback through the error codes issued by eValid.

This is especially important because these values allow other tools to be able to interact and perform a set of actions with eValid based on the error code that was issued.

Because one of the more common languages used to integrate Web scripting and control with eValid operation is PERL, we will describe the recovery of Error Codes using PERL script examples.

Below is an example of a sample script we have set up to extracts the return code generated from eValid and prints the output to the screen.

> PERL Example:

Example PERL script to extract return code from eValid playback

#-------------------------------------------------------------------
# Call eValid in batch mode to play back "script.evs"...@testA=("evalid -b script.evs");
#
# Then call the playback function (defined above) to print out
# the error codes...testPERL();

#-------------------------------------------------------------------
# Function "testPERL" recovers the actual error code values... sub testPERL()
{
print "\nRunning PERL Script!!!\n";
#
# Initialize the error code value...
$errorCode=0;
print "\nCheck reset errorCode = ", $errorCode, "\n";
#
# Recover the error codes from the result stored in @testA...
$errorCode=system(@testA);
#
# Print return code after eValid runs, and right-shift it
# one byte...
$Decimal = 256;
print "\n\nError= ", $errorCode/$Decimal, "\n\n";
}

#-------------------------------------------------------------------
# End of example PERL script.

> Confirmation Note:

This PERL script was confirmed using Active PERL 5.8.0.805 on a Windows 2000 machine.

We expect, but don't guarantee, that this PERL script will work on your own environment.


-- eValid Support
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to General Solution Topics

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons