ravi_gupta2u
Member
There is a field problem-desc in database table and data type is char with format x(30). But this is holding the value more than 30 in length.For example there is a value in this field -
"[FONT="]loaddb swt/orcdrstatus.p : No product history (csm-productHistory) record for CPS call[/FONT]"
Similar to this there are many records and i want to send these values in a txt file.So below is the small part of the code written for same -
Temp table defination -
define temp-table tt-clicarrier
rcode-information
field cli as character label "CLI"
field carrier as character label "Carrier"
field errordesc as character label "Problem Desc"
field t-week as integer label "No. within week"
field t-month as integer label "No. within month"
field t-2month as integer label "No. within 2 months"
field t-3month as integer label "No. within 3 months"
field t-total as integer label "Total"
field l-first as date initial today label "First" format "99/99/9999"
field l-last as date initial 01/01/01 label "Last" format "99/99/9999"
field availserv as character label "On System"
field t-hmnl as character label "HM-NL"
index ix-main
cli
carrier
errordesc.
-----some code---
-------
Assignment to lc-pdesc -
assign lc-pdesc = if fr-load-errors.problem-desc begins 'Duplicate CDR'
then substring(fr-load-errors.problem-desc,1,20)
else if fr-load-errors.problem-desc begins 'sweep to
one' then substring(fr-load-errors.problem-desc,21,30)
else if fr-load-errors.problem-desc begins 'loaddb' then
substring(fr-load-errors.problem-desc,28,30)
else if fr-load-errors.problem-desc begins 'DayOfBillSplit'
then substring(fr-load-errors.problem-desc,33,30)
else substring(fr-load-errors.problem-desc,1,100).
Creation of temp table in program -
create tt-clicarrier.
assign tt-clicarrier.cli = fr-load-errors.orig-service
tt-clicarrier.carrier = fr-load-errors.data_source
tt-clicarrier.availserv = 'On System' when not lc-subproblem
matches '*Not available csm-service*'
tt-clicarrier.errordesc = lc-pdesc
tt-clicarrier.t-hmnl = lc-hmnl.
Sending temp table output to text file-
for each tt-clicarrier:
export delimiter '|' tt-clicarrier.
end.
output close.
My Query
In text file i am getting the output "[FONT="]No product history (csm-produc" [/FONT]
instead of complete message which is [FONT="]"loaddb swt/orcdrstatus.p :[/FONT][FONT="] No product history (csm-produc[/FONT][FONT="]tHistory) record for CPS call[/FONT]".
I am not able to understand why complete message is not going into text file.
Could you please help me to send complete message into the text file.
Thanks
"[FONT="]loaddb swt/orcdrstatus.p : No product history (csm-productHistory) record for CPS call[/FONT]"
Similar to this there are many records and i want to send these values in a txt file.So below is the small part of the code written for same -
Temp table defination -
define temp-table tt-clicarrier
rcode-information
field cli as character label "CLI"
field carrier as character label "Carrier"
field errordesc as character label "Problem Desc"
field t-week as integer label "No. within week"
field t-month as integer label "No. within month"
field t-2month as integer label "No. within 2 months"
field t-3month as integer label "No. within 3 months"
field t-total as integer label "Total"
field l-first as date initial today label "First" format "99/99/9999"
field l-last as date initial 01/01/01 label "Last" format "99/99/9999"
field availserv as character label "On System"
field t-hmnl as character label "HM-NL"
index ix-main
cli
carrier
errordesc.
-----some code---
-------
Assignment to lc-pdesc -
assign lc-pdesc = if fr-load-errors.problem-desc begins 'Duplicate CDR'
then substring(fr-load-errors.problem-desc,1,20)
else if fr-load-errors.problem-desc begins 'sweep to
one' then substring(fr-load-errors.problem-desc,21,30)
else if fr-load-errors.problem-desc begins 'loaddb' then
substring(fr-load-errors.problem-desc,28,30)
else if fr-load-errors.problem-desc begins 'DayOfBillSplit'
then substring(fr-load-errors.problem-desc,33,30)
else substring(fr-load-errors.problem-desc,1,100).
Creation of temp table in program -
create tt-clicarrier.
assign tt-clicarrier.cli = fr-load-errors.orig-service
tt-clicarrier.carrier = fr-load-errors.data_source
tt-clicarrier.availserv = 'On System' when not lc-subproblem
matches '*Not available csm-service*'
tt-clicarrier.errordesc = lc-pdesc
tt-clicarrier.t-hmnl = lc-hmnl.
Sending temp table output to text file-
for each tt-clicarrier:
export delimiter '|' tt-clicarrier.
end.
output close.
My Query
In text file i am getting the output "[FONT="]No product history (csm-produc" [/FONT]
instead of complete message which is [FONT="]"loaddb swt/orcdrstatus.p :[/FONT][FONT="] No product history (csm-produc[/FONT][FONT="]tHistory) record for CPS call[/FONT]".
I am not able to understand why complete message is not going into text file.
Could you please help me to send complete message into the text file.
Thanks