View previous topic :: View next topic
|
Author |
Message |
saranyan_j
New User
Joined: 24 May 2006 Posts: 7
|
|
|
|
Hi there,
I'd like to ask the experts if there is a way to convert data to packed Decimal
Input record looks liks this.
Code: |
ABC+012345.80
CDE-112345.80
ZZZ+000008.05
ZZZ-000008.00
|
I need the numbers converted into their corresponding Comp 3 format .. The output expected would be as below ( in the hex format )
Code: |
--+----1
ABC
CCC01350
1230248C
--------
CDE
CCC01350
3451248D
--------
ZZZ *
EEE00085
9990000C
--------
ZZZ
EEE00380
9990000D |
Is there a standard data format available for +999999.99 which I can use in conversion.
Thanks for your valuable time in advance.
Cheers,
Saran |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Saran,
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC+012345.80
CDE-112345.80
ZZZ+000008.05
ZZZ-000008.00
/*
//SORTOUT DD DSN=... output file (FB/8)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,3,4,10,SFF,TO=PD,LENGTH=5)
/*
|
Quote: |
Is there a standard data format available for +999999.99 which I can use in conversion. |
I don't understand what you're asking here. |
|
Back to top |
|
|
saranyan_j
New User
Joined: 24 May 2006 Posts: 7
|
|
|
|
Dear Frank / CICS guy
Thanks again... It works like a charm...
Quote: |
Is there a standard data format available for +999999.99 which I can use in conversion |
I was actually looking for SFF and I got my answer !!
Cheers,
Saran |
|
Back to top |
|
|
|