XML Output xpath for group field
Posted: Tue Jun 09, 2009 5:57 pm
Hi,
I am trying to generate xml file for below fields :
Partial definition:
record
{record_length=259, delim=none, quote=none, binary, ebcdic, native_endian, round=round_inf, nofix_zero}
(
............................
PSD_BLF_UNIT_PRICE_PCT:decimal[8,6] {default=0,packed};
FILLER_2:subrec {redefines='PSD_BLF_UNIT_PRICE_PCT'} (
PSD_BLF_UNIT_PRICE_FLAT:decimal[8,2] {default=0,packed};
);
PSD_BLF_BALANCE_AMT:decimal[13,2] {default=0,packed};
..............................
)
I have CFF >>>> Trf >>> XML Output
In the transformer Column definitions are
Level Name Key SQL Type
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 FILLER_2 No Char[5]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
If I use only 2 fields and xpath like below its generating xml file without any errors.
PSD_BLF_UNIT_PRICE_PCT : /dadblf0c_rec/PSD_BLF_UNIT_PRICE_PCT/text()
PSD_BLF_BALANCE_AMT : /dadblf0c_rec/PSD_BLF_BALANCE_AMT/text()
But If Include these fields
FILLER_2 and PSD_BLF_UNIT_PRICE_FLAT inbetween I am getting erros like FILLER_2 in not a value field.
I tired xpaths like below also
for
for FILLER_2 : " / " and " /rec/ FILLER_2" and " /rec/ FILLER_2"
for PSD_BLF_UNIT_PRICE_FLAT : " / " and " /rec/ PSD_BLF_UNIT_PRICE_FLAT/" and " /rec/ PSD_BLF_UNIT_PRICE_FLAT/text()"
But getting the error messages
" Error when checking operator: Could not find input field "PSD_BLF_UNIT_PRICE_FLAT". " etc.,
I also tried droping the FILLER_2 and making level of PSD_BLF_UNIT_PRICE_FLAT 05 then
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
but no luck
I Could write to Sequential file by simply removing the FILLER_2 like below
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
But cant do same in xml output file.
Please let me know how to define xpaths in xml output stage for below field definitions.
Level Name Key SQL Type
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 FILLER_2 No Char[5]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
(FILLER_2 redefines PSD_BLF_UNIT_PRICE_PCT )
or
PSD_BLF_UNIT_PRICE_PCT:decimal[8,6] {default=0,packed};
FILLER_2:subrec {redefines='PSD_BLF_UNIT_PRICE_PCT'} (
PSD_BLF_UNIT_PRICE_FLAT:decimal[8,2] {default=0,packed};
);
PSD_BLF_BALANCE_AMT:decimal[13,2] {default=0,packed};
Thanks In advance..
Srini
I am trying to generate xml file for below fields :
Partial definition:
record
{record_length=259, delim=none, quote=none, binary, ebcdic, native_endian, round=round_inf, nofix_zero}
(
............................
PSD_BLF_UNIT_PRICE_PCT:decimal[8,6] {default=0,packed};
FILLER_2:subrec {redefines='PSD_BLF_UNIT_PRICE_PCT'} (
PSD_BLF_UNIT_PRICE_FLAT:decimal[8,2] {default=0,packed};
);
PSD_BLF_BALANCE_AMT:decimal[13,2] {default=0,packed};
..............................
)
I have CFF >>>> Trf >>> XML Output
In the transformer Column definitions are
Level Name Key SQL Type
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 FILLER_2 No Char[5]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
If I use only 2 fields and xpath like below its generating xml file without any errors.
PSD_BLF_UNIT_PRICE_PCT : /dadblf0c_rec/PSD_BLF_UNIT_PRICE_PCT/text()
PSD_BLF_BALANCE_AMT : /dadblf0c_rec/PSD_BLF_BALANCE_AMT/text()
But If Include these fields
FILLER_2 and PSD_BLF_UNIT_PRICE_FLAT inbetween I am getting erros like FILLER_2 in not a value field.
I tired xpaths like below also
for
for FILLER_2 : " / " and " /rec/ FILLER_2" and " /rec/ FILLER_2"
for PSD_BLF_UNIT_PRICE_FLAT : " / " and " /rec/ PSD_BLF_UNIT_PRICE_FLAT/" and " /rec/ PSD_BLF_UNIT_PRICE_FLAT/text()"
But getting the error messages
" Error when checking operator: Could not find input field "PSD_BLF_UNIT_PRICE_FLAT". " etc.,
I also tried droping the FILLER_2 and making level of PSD_BLF_UNIT_PRICE_FLAT 05 then
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
but no luck
I Could write to Sequential file by simply removing the FILLER_2 like below
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
But cant do same in xml output file.
Please let me know how to define xpaths in xml output stage for below field definitions.
Level Name Key SQL Type
05 PSD_BLF_UNIT_PRICE_PCT No Decimal [8,6]
05 FILLER_2 No Char[5]
06 PSD_BLF_UNIT_PRICE_FLAT No Decimal[8,2]
05 PSD_BLF_BALANCE_AMT No Decimal[13,2]
(FILLER_2 redefines PSD_BLF_UNIT_PRICE_PCT )
or
PSD_BLF_UNIT_PRICE_PCT:decimal[8,6] {default=0,packed};
FILLER_2:subrec {redefines='PSD_BLF_UNIT_PRICE_PCT'} (
PSD_BLF_UNIT_PRICE_FLAT:decimal[8,2] {default=0,packed};
);
PSD_BLF_BALANCE_AMT:decimal[13,2] {default=0,packed};
Thanks In advance..
Srini