View previous topic :: View next topic
|
Author |
Message |
vardhan0007
New User
Joined: 05 Jun 2006 Posts: 51 Location: Bangalore,India
|
|
|
|
Hi D.sch,
I am changing because while posting the entire data into a table that enter key not getting posted into table. So if can replace X'0A' with some other value and post it to table perl will recognize.
-Harsha |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why can the perl script not detect and act on the x'0A' (which is octal "012")? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
vardhan0007 wrote: |
Hi D.sch,
I am changing because while posting the entire data into a table that enter key not getting posted into table.
-Harsha |
Why is it not getting posted to the table? |
|
Back to top |
|
|
vardhan0007
New User
Joined: 05 Jun 2006 Posts: 51 Location: Bangalore,India
|
|
|
|
Hi D.sch,
The text is being inserted into a table and again from table we are writing into a falt file and in file if see there is not enter key trapped hence perl is unable act on enter key.
Hi Crag,
The table is a oracle table I am not sure why its unable to show us the enter key in the text.
Thanks,
Harsha |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Sorry to say you have kept confusing everybody with your replies.
If you want to replace one character by another one character, that is one thing.
If you want to replace one character by a word (2 or 3 characters), that is another thing.
vardhan0007 wrote: |
Hi Ronald,
Please confirm whether I can directly inspect the 1000 byte field as u said in ur post and replace with some word which I like. |
If you don't believe the expert advice, then you have 2 choices:
1. Try by yourself.
2. Go to another Forum.
Now, about which character to use:
Stop using strange values, like X'2B' or X'AA', which are not displayable.
Stop using standard characters, like C'2B', which could be misunderstood as part of the text.
Use only '|'. This is the best option, as it is sometimes used as a separator.
Code: |
INSPECT YOUR-VAR REPLACING ALL X'0A' BY '|' |
The correct answer has already been provided. This should be the last reply in this thread. |
|
Back to top |
|
|
vardhan0007
New User
Joined: 05 Jun 2006 Posts: 51 Location: Bangalore,India
|
|
|
|
Hello Marso,
If you don't believe the expert advice, then you have 2 choices:
1. Try by yourself.
2. Go to another Forum.
I just asked for the confirmation it doesn't mean that i dont believe. I really dont know why you are so aggressive?
Regarding your proposed solution, I exactly did what you proposed but again in table I am seeing some special character instead of |.
Thanks for your suggession.
Harsha |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
I really dont know why you are so aggressive? |
24 post without You being able to describe clearly the environment and the issue!
isn' t that a good reason
and now You complain that You have other <strange> characters
post exactly and clearly the data flow and the issues You are facing...
for example ...
the origin of the data
how the data is being processed ( You talk about perl ??? )
how the data is transfered
and so on
and You will see that people will be less aggressive
strong suggestion...
review the application specifications in order to provide proper translation between ...
different character sets/code pages
different record formats ( record VS stream and stream VS record )
if it had been done from the beginning we would not be here wasting time |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
vardhan0007 wrote: |
but again in table I am seeing some special character instead of |. |
Is it getting time for somebody to file this thread into the recycle bin? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
vardhan0007 wrote: |
If you don't believe the expert advice, then you have 2 choices:
1. Try by yourself.
2. Go to another Forum.
I just asked for the confirmation it doesn't mean that i dont believe. I really dont know why you are so aggressive? |
Usually I'm not (aggressive). And note that choice 1 is by all means non-aggressive. Note too that I gave a positive advice.
Bring your string into edit, do a FIND P'.' and a HEX ON. Write down all hex values and modify your INSPECT accordingly.
Check your program: are you storing the replaced string or the original one ?? |
|
Back to top |
|
|
vardhan0007
New User
Joined: 05 Jun 2006 Posts: 51 Location: Bangalore,India
|
|
|
|
Thanks to you all fro the replies. Now the problem is fixed. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
vardhan0007 wrote: |
Thanks to you all fro the replies. Now the problem is fixed. |
How, inquiring minds want to know.... |
|
Back to top |
|
|
vardhan0007
New User
Joined: 05 Jun 2006 Posts: 51 Location: Bangalore,India
|
|
|
|
INSPECT WS-TEXT REPLACING ALL X'0A' WITH '}'
So that } will get inserted into database and again they download the data into flat file. A perl script will pick that file and will recognize } and will treat } as carriage return and form paragraphs.
Thanks,
Harsha |
|
Back to top |
|
|
|