View previous topic :: View next topic
|
Author |
Message |
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
Hi,
In Input File i have first 4 bytes as Binary field(That is Key filed in the File and it is unsigned filed) and Using Sort I need to Convert the 4 byte Binary filed to CHAR Field. Can someone help how to get solution for this?
Thanks,
Subramanian |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post a few sample input records and the output you want when these input records are processed. Mention how wide the output char field should be. Also mention the recfm and lrecl of the files. |
|
Back to top |
|
|
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
Input Layout(When HEX On) Record Length is 80
2C4A TEXT1....
2E1A TEXT1....
Output Required Record Lengh is 80
11338
11802 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your input is length 4 and the output might be length 5 (as posted). Should the "text" be shifted to the right or remain as is? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Subramanian,
2C4A is 2 bytes (X'2C4A'), not 4 bytes. If the input field is 2 bytes and you just want to display it as character (without the other fields in the record), you can use these DFSORT statements:
Code: |
OPTION COPY
INREC BUILD=(1,2,BI,EDIT=(TTTTT))
|
If the input field is 4 bytes (e.g. X'00002C4A'), you can use:
Code: |
OPTION COPY
INREC BUILD=(1,4,BI,EDIT=(TTTTT))
|
If that's not what you want, then you need to do a better job of explaining what you do want. |
|
Back to top |
|
|
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
Thanks Frank I got the expected Solution. It is working fine |
|
Back to top |
|
|
|