Convert Signed Zoned Decimal to Packed Decimal



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Convert Signed Zoned Decimal to Packed Decimal

Postby vnktrrd » Fri Aug 26, 2016 3:54 pm

Hi,

I have a problem of similar kind to this http://www.ibmmainframeforum.com/syncsort-synctool/topic9521.html. Please advise.

I have a ZD input like -9(11).9(2) and I want to conver it to PD.

When I use the below SORT card
SORT FIELDS=(501,10,CH,A)                            
SUM FIELDS=NONE                                      
OUTREC FIELDS=(1:501,10,11:511,6,17:C'XXXXXX',      
               80,15,ZD,PD,LENGTH=8,31:132,10,41:40X)

I got this output
000000B0
0000530C
--------
000004B0
0000115C
--------
000001B2
0000003C
--------
000001B2
0000012C
.

Not sure why there is a B for every hexadecimal. I am worried because when I open this in STARTOOl, I cannot see any value but '?'
Coded
vnktrrd
 
Posts: 7
Joined: Thu Mar 31, 2011 12:32 am
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Signed Zoned Decimal to Packed Decimal

Postby NicC » Fri Aug 26, 2016 4:40 pm

Do not tail-gate old topics. Your post has been split and cross-referenced.
Also, use the code tags to present stuff on your screen.

You have not shown us any input. How can we determine the cause if we cannot see what you are converting?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Convert Signed Zoned Decimal to Packed Decimal

Postby vnktrrd » Fri Aug 26, 2016 4:47 pm

Here are the input values.

 0000000004.50
 00000000010.32
 00000000054.44
 00000000141.50
 00000000105.78
 00000000011.22
 00000000027.76
 00000000007.21
 00000000179.81
 00000000008.76
 00000000339.70
 00000000048.35
 00000000503.00
 00000000011.48
 
vnktrrd
 
Posts: 7
Joined: Thu Mar 31, 2011 12:32 am
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Signed Zoned Decimal to Packed Decimal

Postby vnktrrd » Fri Aug 26, 2016 4:55 pm

I think I am not clear in the above question. Here I reframe it again.

I have above values in the input file and they are of format -9(11).9(2). I want to convert them to PD(S9(11)V9(2)) using sort and write to another file.
When I use below sort card it is not giving me expected results. 80,15,ZD,PD,LENGTH=8 is to do this conversion.


SORT FIELDS=(501,10,CH,A)                            
SUM FIELDS=NONE                                      
OUTREC FIELDS=(1:501,10,11:511,6,17:C'XXXXXX',        
               80,15,ZD,PD,LENGTH=8,31:132,10,41:40X)
 
vnktrrd
 
Posts: 7
Joined: Thu Mar 31, 2011 12:32 am
Has thanked: 0 time
Been thanked: 0 time

Re: Convert Signed Zoned Decimal to Packed Decimal

Postby vnktrrd » Fri Aug 26, 2016 7:26 pm

I have solved the prob.
I have used INREC to edit and then converted from ZD to PD.


INREC FIELDS=(1:1,79,80:80,15,UFF,EDIT=(IIIIIIIIIIIIIIT),
               95:95,905)                                
 
vnktrrd
 
Posts: 7
Joined: Thu Mar 31, 2011 12:32 am
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post