Conversion from Binary to ZD

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

Conversion from Binary to ZD

Postby mainframe_novice » Fri May 14, 2010 7:04 pm

I have a following file with Structure
SalesMan_Id CHAR(5)
Sales_Amount Decimal(9,2)
SalesMan_ID SEQ_NUM  Sales_Amount
A0001              1                  237890.80
A0001              2                 4545365.80
A0002              1                   98563.75
A0002              2                   58663.75
A0002              3                   28563.75
A0002              4                  198563.75

I need to load this data to Sales Table which has structure
SalesMan_Id CHAR(5)
SEQ_NUM Integer(4)
Sales_Amount Decimal(9,2)

In order to get the seq_num I unload SalesMan_ID and Max Seq_num for that SalesMan
SalesMan_ID Max_Seq_Num
A0001               5
A0002               8

But this Max Seq Num is unloaded in Binary Format

Before Load I need to join this unloaded data with SalesFile shown above and add Max Seq Num to Seq Num to
SalesMan_ID SEQ_NUM  Sales_Amount
A0001              6                 237890.80
A0001              7                4545365.80
A0002              9                  98563.75
A0002             10                  58663.75
A0002             11                  28563.75
A0002             12                 198563.75

How Can I convert Binary to ZD so that using ADD in Outrec I can add the SEQ_NUM .
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion from Binary to ZD

Postby Alissa Margulies » Tue May 18, 2010 2:24 am

I'm not sure I follow your entire process, but if all you are asking is how to convert a BI field to ZD, then you can code the following INREC statement:

Just be aware that your output field is now going to be 8 bytes long.

If this is not what you are looking for, then please provide us with sample input and output records with HEX turned on, so that we can better assist you.
Alissa Margulies
Syncsort Mainframe Product Services
Alissa Margulies
Global moderator
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 2 times

Return to Syncsort/Synctool


  • Related topics
    Last post