C ELAP Local Provisioning Utility
This appendix provides user guide information for the ELAP Local Provisioning Utility (LPU) batch command language.
C.1 Introduction
This chaper provides user guide information for the ELAP Local Provisioning Utility (LPU) batch command language.
C.2 LPU Commands
For each command listed in this section, the following information is given:
-
A description of the command
-
The command syntax
-
A description of the command parameters
-
An example of the command usage
-
Rules, dependencies, and notes relevant to the command
-
A list of related commands
C.2.1 Update Commands
ELAP supports the following update commands:
C.2.1.1 upd_lnp_sub
Update LNP 10-Digit Subscription
Use this command to enter or change LNP 10-digit telephone number (TN) subscription or pooled TN’s along with related services in the database.
Related services refer to message relay global title information. If the TN already exists, then the newly input data replaces the existing data. This command automatically creates the NPANXX for a TN-LRN record if the NPANXX does not already exist. It also creates an SP for a specified SP that does not already exist. The command updates data normally administered from the NPAC. Pooled TN’s are allocated on an even 1000-block boundary. Specific ported TN’s may overlap a pooled block and contain different routing.
Keyword
upd_lnp_sub
Parameters
TN =>
(mandatory)
The telephone number.
Range = To specify a single TN subscription: 10 decimal digits
To pool a block of 1000 TNs: 7 digits with 3 asterisks (***
) appended
SP=>
(mandatory)
Service provider ID.
Range = 1-4 alphanumeric characters
LRN
=> (mandatory)
The new location routing number.
Range = 10 decimal digits
CLASS_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CLASS MR GTT.
Range = ni 001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CLASS_SSN
=> (optional)
Subsystem number for CLASS MR GTT
Range = 0, 2–255
Default = Null
LIDB_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for LIDB MR GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
LIDB_SSN
=> (optional)
Subsystem number for LIDB MR GTT
Range = 0, 2–255
Default = Null
ISVM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for ISVM MR GTT.
Range = ni 001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
ISVM_SSN
=> (optional)
Subsystem number for ISVM MR GTT
Range = 0, 2–255
Default = Null
CNAM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CNAM MR GTT.
Range = ni 001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CNAM_SSN
=> (optional)
Subsystem number for CNAM MR GTT
Range = 0, 2–255
Default = Null
Examples
Individual TN:
upd_lnp_sub (TN => '1234567890', SP => 'A123', LRN => '1234567890', CLASS_DPC => '233-233-233', CLASS_SSN => '0');
TN Pool
upd_lnp_sub (TN => '1234567***', SP => 'A123', LRN => '1234567890', CLASS_DPC => '233-233-233', CLASS_SSN => '2');
Command Rules
The TN parameter must be 10 decimal digits or 7 decimal digits followed by 3 *s.
SP parameter must be 1-4 numbers/letters.
LRN parameter must be 10 decimal digits.
xxxxx_DPC parameter must be a valid ANSI DPC.
A service's DPC and SSN parameters must be specified together or not at all.
If the LRN parameter already exists, the SP parameter must be the same as the existing one for the LRN parameter.
Related Commands
dlt_lnp_sub, rtrv_lnp_sub
C.2.1.2 upd_lnp_npanxx
Update LNP NPANXX
Use this command to enter or change an existing LNP NPANXX record, including an LNP query or message relay default global title translation in the database.
The upd_lnp_npanxx command allows the user to enter or to change an LNP NPANXX and its associated LNP default global title translations in(to) the database. If the NPANXX already exists, then the newly input data replaces the existing data.
Keyword
upd_lnp_npanxx
Parameters
NPANXX=>
(mandatory)
Block of 10,000 numbers.
Range = 6 digits
AIN=> (mandatory)
Local Advanced Intelligent Network (AIN) indicator.
Range = Y, N
IN=> (mandatory)
Local Intelligent Network (IN) indicator.
Range = Y, N
CLASS_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CLASS Default GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CLASS_SSN
=> (optional)
Subsystem number for CLASS Default GTT.
Range = 0, 2–255
Default = Null
CLASS_RI=> (optional)
Routing Indicator for CLASS Default GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
CLASS_NEWTT=> (optional)
New Translation Type for CLASS Default GTT.
Range = 0-255
Default = Null
LIDB_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for LIDB Default GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
LIDB_SSN
=> (optional)
Subsystem number for LIDB Default GTT
Range = 0, 2–255
Default = Null
LIDB_RI=> (optional)
Routing Indicator for LIDB Default GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
LIDB_NEWTT=> (optional)
New Translation Type for LIDB Default GTT.
Range = 0-255
Default = Null
ISVM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for ISVM Default GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
ISVM_SSN
=> (optional)
Subsystem number for ISVM Default GTT
Range = 0, 2–255
Default = Null
ISVM_RI=> (optional)
Routing Indicator for ISVM Default GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
ISVM_NEWTT=> (optional)
New Translation Type for ISVM Default GTT.
Range = 0-255
Default = Null
CNAM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CNAM Default GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CNAM_SSN
=> (optional)
Subsystem number for CNAM Default GTT
Range = 0, 2–255
Default = Null
CNAM_RI=> (optional)
Routing Indicator for CNAM Default GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
CNAM_NEWTT=> (optional)
New Translation Type for CNAM Default GTT.
Range = 0-255
Default = Null
Example
upd_lnp_npanxx (NPANXX => '123456', AIN => 'Y', IN => 'Y', CLASS_DPC => '233-233-233', CLASS_SSN => '0', CLASS_RI => 'G', CLASS_NEWTT => '71');
upd_lnp_npanxx (NPANXX => '234567', AIN => 'N', IN => 'N', CLASS_DPC => '33-23-33', CLASS_SSN => '72', CLASS_RI => 'D', CLASS_NEWTT => '0');
Command Rules
NPANXX parameter must be 6 decimal digits.
AIN parameter must be Y (for Yes) or N (for No).
IN parameter must be Y (for Yes) or N (for No).
xxxxx_DPC parameter must be a valid ANSI DPC.
A service's DPC , SSN , RI , and NEWTT parameters must be specified together or not at all.
xxxxx_RI parameter must be G (for GT) or D (for DPC/SSN).
xxxxx_NEWTT parameter must be 0-255, inclusive.
A service's NEWTT parameter must be 0 unless its RI parameter is G and its SSN parameter is 0.
Notes
XXXX_RI => G is for an outgoing CDPA routing indicator of Route on Global Title.
XXXX_RI => D is for an outgoing CDPA routing indicator of Route on DPC/SSN.
Table C-1 Mapping EAGLE to upd_lnp_npanxx LPU Command
EAGLE XLAT | EAGLE RI | EAGLE SSN | EAGLE NGT | LPU RI | LPU SSN | LPU NEWTT |
---|---|---|---|---|---|---|
DPC |
GT |
- |
- |
G |
0 |
0 |
DPC |
SSN |
- |
- |
D |
0 |
0 |
DPCSSN |
GT |
0-255 |
- |
G |
2-255 |
0 |
DPCSSN |
SSN |
0-255 |
- |
D |
2-255 |
0 |
DPCNGT |
GT |
- |
0-255 |
G |
0 |
1-255 |
Related Commands
dlt_lnp_npanxx
C.2.1.3 upd_lnp_lrn
Update LNP Location Routing Number
Use this command to enter or change existing location routing number (LRN) specific information in the database.
This command allows the user to enter or to change an LNP Location Routing Number and its associated LNP message relay override global title translations in(to) the database. If the LRN already exists, then the newly input data replaces the existing data.
Keyword
upd_lnp_lrn
Parameters
LRN=>
(mandatory)
The location routing number.
Range = 10 decimal digits
SP=>
(mandatory)
Service provider ID.
Range = 1-4 alphanumeric characters
CLASS_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CLASS MR Override GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CLASS_SSN
=> (optional)
Subsystem number for CLASS MR Override GTT.
Range = 0, 2–255
Default = Null
CLASS_RI=> (optional)
Routing Indicator for CLASS MR Override GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title)
D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
CLASS_NEWTT=> (optional)
New Translation Type for CLASS MR Override GTT.
Range = 0-255
Default = Null
CLASS_RGTA=> (optional)
Replace Global Title Address (TN) with LRN for CLASS MR Override GTT.
Range = Y, N
Default = Null
LIDB_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for LIDB MR Override GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
LIDB_SSN
=> (optional)
Subsystem number for LIDB MR Override GTT
Range = 0, 2–255
Default = Null
LIDB_RI=> (optional)
Routing Indicator for LIDB MR Override GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
LIDB_NEWTT=> (optional)
New Translation Type for LIDB MR Override GTT.
Range = 0-255
Default = Null
LIDB_RGTA=> (optional)
Replace Global Title Address (TN) with LRN for LIDB MR Override GTT.
Range = Y, N
Default = Null
ISVM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for ISVM MR Override GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
ISVM_SSN
=> (optional)
Subsystem number for ISVM MR Override GTT
Range = 0, 2–255
Default = Null
ISVM_RI=> (optional)
Routing Indicator for ISVM MR Override GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
ISVM_NEWTT=> (optional)
New Translation Type for ISVM MR Override GTT.
Range = 0-255
Default = Null
ISVM_RGTA=> (optional)
Replace Global Title Address (TN) with LRN for ISVM MR Override GTT.
Range = Y, N
Default = Null
CNAM_DPC=> (optional)
ANSI destination point code in the form of network indicator-network cluster-network cluster member (ni-nc-ncm) for CNAM MR Override GTT.
Range = ni001-255
nc 001–255
(if ni = 001–005
)
000–255
(if ni = 006–255
)
ncm 000–255
Default = Null
CNAM_SSN
=> (optional)
Subsystem number for CNAM MR Override GTT
Range = 0, 2–255
Default = Null
CNAM_RI=> (optional)
Routing Indicator for CNAM MR Override GTT.
Range = G (the outgoing CDPA routing indicator of Route on Global Title) D (the outgoing CDPA routing indicator of Route on DPC/SSN)
Default = Null
CNAM_NEWTT=> (optional)
New Translation Type for CNAM MR Override GTT.
Range = 0-255
Default = Null
CNAM_RGTA=> (optional)
Replace Global Title Address (TN) with LRN for CNAM MR Override GTT.
Range = Y, N
Default = Null
Example
upd_lnp_lrn (LRN => '1234567890', SP => 'A123', CLASS_DPC => '233-233-233', CLASS_SSN => '0', CLASS_RI => 'G', CLASS_NEWTT => '71', CLASS_RGTA => 'Y');
upd_lnp_lrn (LRN => '1234567890', SP => 'A123', CLASS_DPC => '33-23-33', CLASS_SSN => '72', CLASS_RI => 'D', CLASS_NEWTT => '0', CLASS_RGTA => 'Y');
Command Rules
The LRN parameter must be 10 decimal digits.
The SP parameter must be 1-4 numbers/letters.
The xxxxx_DPC parameter must be a valid ANSI DPC.
The xxxxx_RI parameter must be G (for GT) or D (for DPC/SSN).
The xxxxx_NEWTT parameter must be 0-255, inclusive.
The xxxx_RGTA parameter must be Y (for Yes) or N (for No).
A service's DPC, SSN, RI, NEWTT, and RGTA parameters must be specified together or not at all.
A service's NEWTT parameter must be 0 unless its RI parameter is G and its SSN parameter is 0.
At least one service must be specified
If the LRN parameter already exists, the SP parameter must be the same as the existing one for the LRN parameter.
Notes
XXXX_RI => G is for an outgoing CDPA routing indicator of Route on Global Title.
XXXX_RI => D is for an outgoing CDPA routing indicator of Route on DPC/SSN.
Table C-2 Mapping EAGLE to upd_lnp_lrn LPU Command
EAGLE XLAT | EAGLE RI | EAGLE SSN | EAGLE NGT | LPU RI | LPU SSN | LPU NEWTT |
---|---|---|---|---|---|---|
DPC |
GT |
- |
- |
G |
0 |
0 |
DPC |
SSN |
- |
- |
D |
0 |
0 |
DPCSSN |
GT |
0-255 |
- |
G |
2-255 |
0 |
DPCSSN |
SSN |
0-255 |
- |
D |
2-255 |
0 |
DPCNGT |
GT |
- |
0-255 |
G |
0 |
1-255 |
RGTA is not in the Table because it maps directly and is independent of the other parameters.
Related Commands
dlt_lnp_lrn
C.2.1.4 upd_split_npa
Update Split NPANXX
Use this command to force two different NPANXXs to reference the same last 4-digit telephone number (TN) in the database. During this time, updates to either NPANXX will update the same last 4-digit entry of a 10-digit ported TN. All existing NPANXX data is copied automatically to the new NPANXX for the split. It does not matter if the old block is specified as NNPANXX and the new is specified as NPANXX (i.e. the parameters are switched); they will still point to the same set of last 4 digits.
Keyword
upd_split_npa
Parameters
NPANXX=>
(mandatory)
Block of 10,000 numbers.
Range = 6 digits
NNPANXX=>
(mandatory)
New NPANXX.
Range = 6 digits
Example
upd_split_npa (NPANXX => '123456', NNPANXX => '234567');
Command Rules
NPANXX parameter must be 6 decimal digits.
NNPANXX parameter must be 6 decimal digits.
The NPANXX parameter must not already be split.
The new block cannot have any existing TNs.
The new block cannot be the same as the old.
The new block cannot have non-null service data that does not match the service data for the old block.
Related Commands
dlt_split_npa
C.2.2 Delete Commands
ELAP supports the following delete commands:
C.2.2.1 dlt_lnp_sub
Delete LNP 10-Digit Telephone Number Subscription
This command is used to remove an LNP 10-digit ported telephone number (TN) or a Pooled Block of 1000 TN's along with its related services from the database. Related services refer to message relay global title information. This command deletes data normally administered from the NPAC.
Keyword
dlt_lnp_sub
Parameters
TN =>
(mandatory)
The telephone number.
Range = To specify a single TN subscription: 10 decimal digits
To pool a block of 1000 TNs: 7 digits with 3 asterisks (***
) appended
Examples
Individual TN:
dlt_lnp_sub (TN => '1234567890');
TN Pool
dlt_lnp_sub (TN => '1234567***');
Command Rules
The TN parameter must be 10 decimal digits or 7 decimal digits followed by 3 *s.
Notes
No error message when the TN parameter does not exist.
Related Commands
upd_lnp_sub, rtrv_lnp_sub
C.2.2.2 dlt_lnp_npanxx
Delete LNP Numbering Plan and Exchange
This command is used to delete an LNP numbering plan area and exchange (NPANXX) and its associated LNP query or message relay default global title translations from the database.
Keyword
dlt_lnp_npanxx
Parameters
NPANXX=>
(mandatory)
Block of 10,000 numbers.
Range = 6 digits
Example
dlt_lnp_npanxx (NPANXX => '123456');
Command Rules
The NPANXX parameter must be 6 decimal digits.
The NPANXX parameter cannot be part of a NPA split.
The NPANXX parameter cannot be part of a ported TN.
Notes
No error message when the NPANXX parameter does not exist.
Related Commands
upd_lnp_npanxx
C.2.2.3 dlt_lnp_lrn
Delete LNP Location Routing Number
Use this command to delete an existing location routing number (LRN) and its corresponding final overriding message relay global title translations from the database. The LRN can only be deleted if it is not referenced by a 10-digit telephone number.
Keyword
dlt_lnp_lrn
Parameters
LRN=>
(mandatory)
The location routing number.
Range = 10 decimal digits
Example
dlt_lnp_lrn (LRN => '1234567890');
Command Rules
The LRN parameter must be 10 decimal digits.
Notes
No error message when LRN parameter does not exist.
Related Commands
upd_lnp_lrn
C.2.2.4 dlt_split_npa
Delete Split NPANXX
Use this command to remove the NPANXX from the database. This command allows the user to remove 1 of the 2 different NPANXXs referencing the same last 4 digits of TN in the database.
Keyword
dlt_split_npa
Parameters
NPANXX=>
(mandatory)
Block of 10,000 numbers.
Range = 6 digits
Example
dlt_split_npa (NPANXX => '123456');
Command Rules
The NPANXX parameter must be 6 decimal digits.
The NPANXX parameter must be part of NPA split.
Notes
None
Related Commands
upd_split_npa
C.2.3 Retrieve Command
ELAP supports the rtrv_lnp_sub retrieve commands.
C.2.3.1 rtrv_lnp_sub
Retrieve LNP 10-digit Subscription
Use this command to retrieve LNP 10 digit ported TN or a single Pooled Block of 1000 TN's along with related services from the database. Related services refer to message relay global title information. The command retrieves data normally administered from the NPAC.
Keyword
rtrv_lnp_sub
Parameters
TN=>
(mandatory)
The telephone number.
Range = To specify a single TN subscription: 10 decimal digits
To pool a block of 1000 TNs: 7 digits with 3 asterisks (***
) appended
Example
Individual TN:
rtrv_lnp_sub (TN => '1234567890');
TN Pool:
rtrv_lnp_sub (TN => '1234567***');
Command Rules
The TN parameter must be 10 decimal digits or 7 decimal digits followed by 3 *s.
Notes
None
Related Commands
upd_lnp_sub, dlt_lnp_sub
Output
Found:
TN = 2345678000
LRN = 0123456789
SP = oc1
Service TT DPC SSN RI NEWTT
------- --- ----------- --- -- -----
CLASS 3 001-001-001 0 G 0
ISVM 6 001-002-003 4 D ---
TN = 2345000***
LRN = 0123456789
SP = oc1
Service TT DPC SSN RI NEWTT
------- --- ----------- --- -- -----
CLASS 3 001-001-001 0 G 0
ISVM 6 001-002-003 4 D ---
Not Found:
TN 9195551234 not found.
C.2.4 Miscellenous Commands
ELAP supports the following miscellenous commands:
C.3 Common Information
The information in these sub-sections highlights messages, formats, templates, and errors that are not specific to particular batch commands.
Success message
A success message is output when a batch file is successfully executed:
SUCCESS: The LPU batch file has been successfully executed.
Error message format
All command errors follow this format:
E1074: LPU batch failure: Batch Error: Message text at /export/home/elapall/LPU_batch line x
Message text will be replaced with the message text associated with the rule as provided in the command details.
The line number within the batch file where the error occurred replaces x.
Service parameters within error messages
When a service parameter is specified in the error message texts, one of the following templates is used to avoid repeating the message text for each possible service.
-
xxxx_DPC
-
xxxx_SSN
-
xxxx_RI
-
xxxx_NEWTT
-
xxxx_RGTA
The appropriate service's mnemonic (e.g. CLASS, LIDB, ISVM, or CNAM) replaces xxxx.
Missing mandatory parameter
For all commands, the message text for a missing mandatory parameter is the following:
Missing mandatory argument x Need to insert the missing mandatory argument.
The parameter's mnemonic (for example, TN, SP, LRN, AIN, IN, or NPANXX) replaces x.
Communication errors
A number of connection errors may occur when processing batch commands. They are listed from most common to least common. The most likely corrective actions for each are included:
-
Could not connect to local LSMS port
-
Check the LSMS Connection Allowed state. If the LSMS Connection is Disabled, then Enable the LSMS Connection.
-
Check the LSMS HS Bulk Download Enabled state. If the LSMS Bulk Download for the ELAP is currently Enabled, then Disable the LSMS Bulk Download for the ELAP.
-
Check the state of the software on both ELAP sides. If the software is stopped (side is down), then start the software.
-
The LSMSmay have been in the middle of connecting to the ELAPs. Try again.
-
-
No connection to remote LSMS port
-
The LSMS may have been in the middle of connecting to the ELAPs. Try again.
-
-
Could not connect to local LPU port
-
A user on the mate started a batch at the same time that grabbed the port before the local user's batch could. Try again.
-
-
Connection to LPU port closed by another instance
-
The local user's batch may have grabbed the port just before or just after it grabbed the mate user's batch. Try again.
-
Send and receive errors may occur when processing batch commands. They are listed in no particular order and should occur infrequently:
-
Could not send message
-
Receive header timed out
-
Could not receive header
-
Receive data timed out
-
Could not receive data
Perl errors
The following Perl-related error may occur:
Unable to create sub named "*Safe::Root0::x"
The most likely cause is a misspelled command or function name.
C.4 Perl Statements and Functions
The batch language is actually a subset of the Perl language with the addition of the functions/commands specified under “LPU Commands”. For more information on Perl, see reference [1].
The following subsections highlight some of the more useful Perl statements and functions for batch processing.
#
If not quoted, comments out rest of line.
foreach
Iterates through a list, assigning the current element to a variable. For example, the following will retrieve TNs 919-555-0000 through 919-555-9999:
foreach $extension ('0000'..'9999')
{
rtrv_lnp_sub(TN => "919555$extension");
}
Outputs string(s). For example, the following will output the TNs being deleted
foreach $tn ('9195550000'..'9195559999')
{
print ("Deleting TN $tn \n");
dlt_lnp_sub (TN => $tn);
}
scalar localtime
Returns the current time for the current locale in UNIX date command form. For example, the following:
print scalar localtime, "\n";
Output the following
Wed Apr 24 15:45:27 2002
eval
Allows user to catch an error without stopping execution of the batch. On error, the error message is put into the special variable $@ and execution continues at the next line after the eval block.
For example without an eval, the following:
set_echo(1);
upd_lnp_sub (TN=>'9194601234', LRN=>'3456789012', SP=>'tklc',
CLASS_SSN=>2);
upd_lnp_sub (TN=>'9194602341', LRN=>'3456789012', SP=>'tklc');
rtrv_lnp_sub(TN=>'9194601234');
Produces:
Processing upd_lnp_sub (
CLASS_SSN => '2',
LRN => '3456789012',
SP => 'tklc',
TN => '9194601234',
)
ERROR: An error occurred while attempting the requested operation.
E1074: LPU batch failure: Batch Error: CLASS_DPC and CLASS_SSN must be specified together at /export/home/elapall/LPU_batch line 3
However, if one puts the updates in an eval, the error can be caught and dealt with instead of exiting the batch execution. For example:
set_echo(1);
eval
{
upd_lnp_sub (TN=>'9194601234', LRN=>'3456789012', SP=>'tklc',
CLASS_SSN=>2);
upd_lnp_sub (TN=>'9194602341', LRN=>'3456789012', SP=>'tklc');
};
print $@ if $@;
rtrv_lnp_sub(TN=>'9194601234');
rtrv_lnp_sub(TN=>'9194602341');
Produces:
Processing upd_lnp_sub (
CLASS_SSN => '2',
LRN => '3456789012',
SP => 'tklc',
TN => '9194601234',
)
CLASS_DPC and CLASS_SSN must be specified together at /export/home/elapall/LPU_batch line 5
Processing rtrv_lnp_sub (
TN => '9194601234',
)
TN 9194601234 not found.
Processing rtrv_lnp_sub (
TN => '9194602341',
)
TN 9194602341 not found.
Done.
SUCCESS: The LPU batch file has been successfully executed.