View previous topic :: View next topic
|
Author |
Message |
deepak_pathania
New User
Joined: 10 Jan 2006 Posts: 1
|
|
|
|
Hi ,
I am trying to convert Packed Decimal to Readable form and it hould have sign also but I am not sure where I am making mistake in my sort card. output file is getting default negative sign. I have provided the file information and sort card.
Input File :CORP.USER.MIS.PRODTYPE.FINAL1
-------------
VIEW CORP.USER.MIS.PRODTYPE.FINAL1
000001 1190A005 d )
FFFFCFFF0444440000038150444444
1190100550000000003243D5000000
----------------------------------------
000002 13J80328 n *
FFDFFFFF0444440000090150444444
1318032850000000000556C5000000
----------------------------------------
000003 14906125 lçÁ*
FFFFFFFF0444440000094650444444
1490612550000000002385C5000000
Sort Card Used:
------------------------
//STEP75 EXEC PGM=DFSORT
//SORTIN DD DISP=SHR,
// DSN=CORP.USER.MIS.PRODTYPE.FINAL1
//SORTOUT DD DSN=ECNS.PHCM800V.MIS.FORMAT.F1SEP50J,
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=28,RECFM=FB)
//SYSUDUMP DD SYSOUT=C
//SYSIN DD *
SORT FIELDS=(COPY)
OUTREC FIELDS=(1:1,8,10:15,10,PD,EDIT=(SIIIIIIIIIIIIITT.TTI),
SIGNS=(,-))
Desired Output :
1190A005 -3328413.50
13J80328 -950516.5
14906125 -2934865.5
Actual Output:
----------------
1190A005 3328413.50
13J80328 -950516.5
14906125 -2934865.5 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
i would suggest looking at the syntax for SIGNS= |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Are you sure of the length of the PD? Looks like 9 to me. The first is negative, the remaining two are positive. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Your understanding of Your data is just plain wrong or You posted the wrong data ...
after a bit of alignment Your data looks like
Code: |
123456789012345678901234567890
1190A005 d )
FFFFCFFF0444440000038150444444
1190100550000000003243D5000000
----------------------------------------
123456789012345678901234567890
13J80328 n *
FFDFFFFF0444440000090150444444
1318032850000000000556C5000000
----------------------------------------
123456789012345678901234567890
14906125 lç *
FFFFFFFF0444440000094650444444
1490612550000000002385C5000000
123456789012345678901234567890 |
the packed decimal is NINE bytes ... the x'05' which follows id a <tab>
here is what You get with Your card
Code: |
********************************* TOP OF DATA **********************************
1190A005 -3328413.500
13J80328 -950516.5 0
14906125 -2934865.5 0
******************************** BOTTOM OF DATA ********************************
|
and here what You would get with a proper decoding of a PACKED number
Code: |
********************************* TOP OF DATA **********************************
1190A005 -33284.135
13J80328 9505.165
14906125 29348.655
******************************** BOTTOM OF DATA ******************************** |
review Your issue and post proper data
and the output You posted cannot come from that data ... |
|
Back to top |
|
|
|