View previous topic :: View next topic
|
Author |
Message |
Madhan Mohan Pendyala
New User
Joined: 18 Mar 2008 Posts: 6 Location: Hyderabad
|
|
|
|
Like the company code in hex is x'1C'. I want in out put the company code displayed as '28' in character format.
Please suggest how can this be achieved in Eazytrieve |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
I think,this post need to go for SORT.Please use the below SORT card to change the co -id from hex.
Sort fileds=copy
outrec fields=(1,1,bi,edit=(tt))
1-------->Start position of the co-id
1-------->length.
Thanks
Krishy |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I think,this post need to go for SORT |
No, this is an Easytrieve question.
Please post the definition of the data that contains the x'1C' as well as how you want the output - is it a data field or a report field, etc? |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
It sounds like the input field is binary (input 1 B 0)and the output field is numeric (output 1 N 0). Move the input to the output (output = input) and you are done. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the sample could not be worse ...
1C is misleading or at least doubtful
is the byte a true binary or simply a packed 1 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I expect it is a binary number, rather than a packed-decimal one, as an x'1C' = decimal 28. . . which is what TS wants to see. |
|
Back to top |
|
|
pranav yadav
New User
Joined: 04 Apr 2008 Posts: 9 Location: Noida, India
|
|
|
|
I think the input is a binary field having value X'1C'
so there are two cases for ouput fields
a) if it is a numeric field then , its very simple,
just do ouput field = input field ,
b) if the ouput is a alphanumeric field , then there would be two statements, as u cannot directly move a binary field to a alphanumeric.
so binary to numeric field and then
numeric to alphanumeric.
I hope this helps. |
|
Back to top |
|
|
|