View previous topic :: View next topic
|
Author |
Message |
sandybadam
New User
Joined: 09 Oct 2006 Posts: 14
|
|
|
|
Hi,
I have a input file consists of Hexa Decimal(may have negative value) feilds and I want to convert it to display/char format.
both A and B are in Hexa decimal format.
Code: |
A = 00033333
0033333C |
Code: |
B = 00022222
0022222D |
I tried to do by using the below code.
Code: |
OUTREC FIELDS=(64,8,PD,TO=ZD,X,
72,8,PD,TO=ZD,X)
|
Below is the ourput i got
Code: |
A = 000003333333333
B = 00000222222222K |
I am geeting K as a sign bit but i want it to be displayed as -2222222222 and also I dont want to display the trailing zeros.
Code'd and title clarified |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Look up EDIT in the manual.
What "trailing zeros"? You mean "leading zeros"? EDIT can do it all, and more. |
|
Back to top |
|
|
sandybadam
New User
Joined: 09 Oct 2006 Posts: 14
|
|
|
|
Thanks Bill Woodger. It worked.
But now I have another question.
I want to merge 2 files using the same sort step.
File1 is a Header file
File2 is a record file
There is no need of formatting the header file, |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
We have no way of knowing.
Please start a new topic with the request, showing representative input data for both files and expected output, RECFM and LRECL of all files. Use the Code tags, please, to preserve spacing of data. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
sandybadam wrote: |
Thanks Bill Woodger. It worked.
|
Can you show us the code "that worked"?
It may help the next person will the same/similar question.
Thanks. |
|
Back to top |
|
|
sandybadam
New User
Joined: 09 Oct 2006 Posts: 14
|
|
|
|
Code: |
OUTREC FIELDS=(64,8,PD,EDIT=(SIIIIIIIIIIIIIII),SIGNS=(,-),X,
72,8,PD,EDIT=(SIIIIIIIIIIIIIII),SIGNS=(,-),X)
|
|
|
Back to top |
|
|
|