Dear Friends ,
Could you please help me to develope a ISO 8583 Message Parser in C or any body is having it .
Thanks in advance
Nadeer
Printable View
Dear Friends ,
Could you please help me to develope a ISO 8583 Message Parser in C or any body is having it .
Thanks in advance
Nadeer
Searching the web shows quite a few different parsers for ISO 8583.
We can certainly help you write your own, but we are not going to do the work for you. If that's what you want, then www.rentacoder.com is one possibility. Or the "jobs" section here.
--
Mats
> Could you please help me to develope a ISO 8583 Message Parser in C
Is this the kind of ratio where you spend 1% of the effort saying "help me write a parser", and someone else does the other 99% by doing all the work?
I expect if that's the scenario, 1% is probably a bit high for the proportion of total effort. 0.1% is probably still a bit high - the parse doesn't look extremely complicated, but I expect it will turn into several hundred if not a few thousand lines of code to do a full implementation.
--
Mats
We did the ISO parsing in Oracle PL/SQL , Now palnning to move to Unix/C ,
the actual issue is , in PL/SQL the Filed lenght/Attribute/type are stored in the Table and the parser reads the table to parse the fields.
Could please help me how ro achieve this in C
and pl/SQL
Here some part of it for your reference.
Code:FUNCTION Convertx2b( p_inXbit IN VARCHAR2, p_Bbit OUT VARCHAR2) RETURN BOOLEAN IS
/*=========================================================================================================
Converting the HEX Values into Binary .
==========================================================================================================*/
v_cur_pos INTEGER DEFAULT 1;
v_tot_length INTEGER;
v_iso_bin VARCHAR2(4);
v_count NUMBER(2):=1;
v_cur_value VARCHAR2(1);
BEGIN
v_tot_length := LENGTH(p_inXbit); --total length of Hexadecimal bitmap
--loop through hexadecimal values and replace them one by one
FOR i IN 2..(v_tot_length+1) LOOP
v_cur_value:=SUBSTR(p_inXbit,v_COUNT,1);
BEGIN
SELECT DECODE(v_cur_value,'0', '0000',
'1', '0001',
'2', '0010',
'3', '0011',
'4', '0100',
'5', '0101',
'6', '0110',
'7', '0111',
'8', '1000',
'9', '1001',
'A', '1010',
'B', '1011',
'C', '1100',
'D', '1101',
'E', '1110',
'F', '1111',
'ERR')
INTO v_iso_bin FROM dual ;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END;
IF v_iso_bin <> 'ERR' THEN --junb
p_Bbit:=p_Bbit||TO_CHAR(v_iso_bin); --construct binary output
ELSE
RETURN FALSE;
END IF;
v_count:=v_count+1;
END LOOP;
RETURN TRUE; --if no errors
END;
/*====================================================================================================================
====================================================================================================================*/
PROCEDURE do_initialize
IS
BEGIN
FOR i IN 1..128
LOOP
BEGIN
p_msgrec(i) := NULL;
EXCEPTION
WHEN OTHERS THEN
out_bds_msg := '4202';
RAISE e_error;
END;
END LOOP;
END; -->>initialize End
/*=================================================================================================================
====================================================================================================================*/
FUNCTION CHECK_FLDS( p_Bbit IN VARCHAR2, p_data IN VARCHAR2) RETURN BOOLEAN IS
/*===================================================================================================================
Checking fields in the ISO BIT Message
=====================================================================================================================*/
v_cur_pos INTEGER DEFAULT 1;
v_length INTEGER;
v_tot_length INTEGER;
v_len INTEGER;
v_iso_flds ISO_FIELDS%ROWTYPE;
BEGIN
v_tot_length := LENGTH(p_data); --length of data part
v_len := LENGTH(p_Bbit); --length of binary bitmap
/*loop through binary bitmap to populate fields*/
FOR i IN 2..v_len LOOP
IF SUBSTR(p_Bbit,i,1)='1' THEN --if it is 1 ,field is populated..get length.if 0 skip
IF v_cur_pos > v_tot_length THEN
p_msgrec(72) := 'END OF MESSAGE REACHED';
RETURN FALSE;
END IF;
--get field properties from table
BEGIN
SELECT *
INTO v_iso_flds
FROM ISO_FIELDS
WHERE bit=i;
EXCEPTION
WHEN NO_DATA_FOUND THEN
p_msgrec(72) := 'ISO 8583 REF TAB NOT SETUP. FLD NO.: '||TO_CHAR(i)||' ';
RETURN FALSE;
END;
--get field length
v_length := v_iso_flds.LENGTH;
--incase field format is LLVAR
IF v_iso_flds.format='LLVAR' THEN
BEGIN
--get length of field from first 2 numbers
v_length:=TO_NUMBER(SUBSTR(p_data,v_cur_pos,2));
EXCEPTION
WHEN VALUE_ERROR THEN
p_msgrec(72) := 'NON-NUMERIC LENGTH VALUE FOR LLVAR. FIELD: '||v_iso_flds.name
||' ';
logData(to_char (systimestamp, 'hh24.mi.ss.ff3')||'NON-NUMERIC LENGTH VALUE FOR LLVAR. FIELD:->'||to_char(i)||v_iso_flds.name ||',CardNo'||p_msgrec(2)||'->MsgStanNo'||p_msgrec(11),'E');
RETURN FALSE;
END;
IF v_length > v_iso_flds.LENGTH THEN
p_msgrec(72) := 'LENGTH FOR LLVAR EXCEEDS MAX. FIELD: '
||v_iso_flds.name||' ';
logData(to_char (systimestamp, 'hh24.mi.ss.ff3')||'LENGTH FOR LLVAR EXCEEDS MAX. FIELD:->'||to_char(i)||v_iso_flds.name||',CardNo'||p_msgrec(2)||'->MsgStanNo'||p_msgrec(11),'E');
RETURN FALSE;
END IF;
--skip first 2 numbers since they are length of field
v_cur_pos:=v_cur_pos+2;
--incase field format is LLLVAR
ELSIF v_iso_flds.format='LLLVAR' THEN
BEGIN
--get length of field from first 3 numbers
v_length:=TO_NUMBER(SUBSTR(p_data,v_cur_pos,3));
EXCEPTION
WHEN VALUE_ERROR THEN
p_msgrec(72) := 'NNUM LENGTH VAL FOR LLLVAR. FLD: '|| v_iso_flds.name||' ';
logData(to_char (systimestamp, 'hh24.mi.ss.ff3')||'NNUM LENGTH VAL FOR LLLVAR. FLD:->'||to_char(i)|| v_iso_flds.name||',CardNo'||p_msgrec(2)||'->MSgStanNo'||p_msgrec(11),'E');
RETURN FALSE;
END;
IF v_length > v_iso_flds.LENGTH THEN
p_msgrec(72) := 'LGTH FOR LLLVAR EXCEEDS MAX. FIELD: '||v_iso_flds.name||' ';
logData(to_char (systimestamp, 'hh24.mi.ss.ff3')||'LGTH FOR LLLVAR EXCEEDS MAX. FIELD:-> '||to_char(i)||v_iso_flds.name||',CardNo'||p_msgrec(2)||'->MsgStanNo'||p_msgrec(11),'E');
RETURN FALSE;
END IF;
--skip first 3 numbers since they are length of field
v_cur_pos:=v_cur_pos+3;
END IF;
p_msgrec(i) := SUBSTR(p_data,v_cur_pos,v_length);
v_cur_pos := v_cur_pos+v_length;
END IF;
END LOOP;
RETURN TRUE; --if no errors
END CHECK_FLDS;
The arrogance....
Either pay someone to do your work or just do it yourself. Why would someone do this for you for free?
This is definitely in the scope of getting someone to do the work for you - moved.
am ready pay , posted a bid in rentacoder.com.
Nadeer