## How to convert ZD to BI?

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

### How to convert ZD to BI?

HI all,

How to convert ZD to BI in Syncsort?????
Thanks and Regards,
Jagathis P
pjagathis

Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

### Re: How to convert ZD to BI?

Hello pjagathis.

Here is an example:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,2,ZD,BI)
/*

If you provide sample data, or details about the actual record layout, we will be able to provide you with better assistance.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator

Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 2 times

### Re: How to convert ZD to BI?

Hi Alissa,

My input record is as follows..

LRECL=20

22222222222222222222
22222222222222222222
22222222222222222222

My output should be in COMP(BI)..

I tried using the below code...

SORT FIELDS=COPY
OUTREC BUILD=(1,20,ZD,BI)

I tried your code but it saying error as follows..

OUTREC ARITHMETIC OVERFLOW
SYNCSMF CALLED BY SYNCSORT; RC=0000

Thanks and Regards,
Jagathis P
pjagathis

Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

### Re: How to convert ZD to BI?

why not review a bit Your understanding of the representation of numbers in the different bases,
and the relative limit for the maximum number of digits that can be represented

a stupid programmers hand calculator would have shown that
18446744073709551615 is the greatest unsigned that can be represented in 64 bits

as a reminder here is the powers of 2 table up to 2**64

2**00                    1
2**01                    2
2**02                    4
2**03                    8
2**04                   16
2**05                   32
2**06                   64
2**07                  128
2**08                  256
2**09                  512
2**10                 1024
2**11                 2048
2**12                 4096
2**13                 8192
2**14                16384
2**15                32768
2**16                65536
2**17               131072
2**18               262144
2**19               524288
2**20              1048576
2**21              2097152
2**22              4194304
2**23              8388608
2**24             16777216
2**25             33554432
2**26             67108864
2**27            134217728
2**28            268435456
2**29            536870912
2**30           1073741824
2**31           2147483648
2**32           4294967296
2**33           8589934592
2**34          17179869184
2**35          34359738368
2**36          68719476736
2**37         137438953472
2**38         274877906944
2**39         549755813888
2**40        1099511627776
2**41        2199023255552
2**42        4398046511104
2**43        8796093022208
2**44       17592186044416
2**45       35184372088832
2**46       70368744177664
2**47      140737488355328
2**48      281474976710656
2**49      562949953421312
2**50     1125899906842624
2**51     2251799813685248
2**52     4503599627370496
2**53     9007199254740992
2**54    18014398509481984
2**55    36028797018963968
2**56    72057594037927936
2**57   144115188075855872
2**58   288230376151711744
2**59   576460752303423488
2**60  1152921504606846976
2**61  2305843009213693952
2**62  4611686018427387904
2**63  9223372036854775808
2**64 18446744073709551616

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator

Posts: 2765
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 143 times

### Re: How to convert ZD to BI?

pjagathis,

Why, oh why, would you want to do that? 20 digits! What real 20 digits do you have that you need to represent in binary?
BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times