Featured post

How to Decode TLV Quickly

In TLV, the format is Tag, Length, and Value. The TLV protocol needs this type of data. Here you will know how to decode TLV data. According to IBM , TLV data is three parts. The tag tells what type of data it is. The length field denotes the length of the value. The Value-field denotes the actual value. Structure of TLV. TLV comprises three field values.  Tag Length Value EMV formulated different tags. They have their meanings. Usually, the Tag and Length together takes 1 to 4 bytes. The Best example for TLV. In the below example, you can find the sample TAG, LENGTH, and VALUE fields. [Tag][Value Length][Value] (ex. " 9F4005F000F0A001 ") where Tag Name =  9F40 Value Length (in bytes) =  05  Value (Hex representation of bytes. Example, "F0" – 1-byte) =  F000F0A001 In the above message, tag 9F40 has some meaning designed by EMV company. Here  you can find a list of EMV Tags. How to read the TLV Tag: 1 or 2 bytes Length: Length of the Value. F0-00-F0-A0-01 ==> 5 By

PL/SQL Sample code and error handling mechanism

SAMPLE PL/SQL


CREATE TABLE dummy
( dummy_value       VARCHAR2(1));
DECLARE
  -- Define local variable.
  my_string VARCHAR2(1) := ' ';
  my_number NUMBER;
BEGIN
  -- Select a white space into a local variable.
  SELECT ' ' INTO my_string FROM dummy;
  -- Attempt to assign a single white space to a number.
  my_number := TO_NUMBER(my_string);
EXCEPTION
 WHEN no_data_found THEN
   dbms_output.put_line('SELECT-INTO'||CHR(10)||SQLERRM);
END;
/

Output and Error:
The program returns the following output, which illustrates formatting user- defined exceptions. 

The CHR(10) inserts a line return and provides a clean break between the program's SQLCODE and SQLERRM messages:

RAISE my_error SQLCODE [1] 
SQLERRM [User-Defined Exception]

Comments

Popular posts from this blog

How to Fix Python Syntax Errors Quickly

Hyperledger Fabric: 20 Real Interview Questions

7 AWS Interview Questions asked in Infosys, TCS