View previous topic :: View next topic
|
Author |
Message |
MSTP
New User
Joined: 21 Jun 2007 Posts: 30 Location: Baltimore
|
|
|
|
I am trying to convert a value in the file which is in the format of 9(9) which needs to be converted into S9(9). Please help me out here.
INPUT
015162234
015177350
013607226
OUTPUT
01516223D
01517735{
01360722F
thanks
Prasad. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What have you tried? You need to check in the manual (link at the top of the page) for datatypes. You have an unsigned zoned decimal which needs to go to a signed zoned decimal. |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
MSTP,
See if below helps...
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
015162234
015177350
013607226
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC OVERLAY=(1,9,ZD,TO=ZDC,LENGTH=9)
/* |
OUTPUT
Code: |
01516223D
01517735{
01360722F |
Thanks, |
|
Back to top |
|
|
MSTP
New User
Joined: 21 Jun 2007 Posts: 30 Location: Baltimore
|
|
|
|
sqlcode1 it worked like a charm.Thanks for your help.
By any chance can you point out to me the different data type formats.
Prasad. |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
MSTP,
Turn HEX ON and see the difference between input and output yourself.
Input has F for positive and your expected output wants C for positive sign.
Thanks |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Does this lead you to what you want? |
|
Back to top |
|
|
|