Insert binary value through overlay



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Insert binary value through overlay

Postby richagoyal » Tue Aug 03, 2010 11:35 am

Hi,

I want to overwrite a binary value in my file through overlay on a particular condition.

  OUTREC IFTHEN=(WHEN=(5,13,CH,EQ,C'CE10040000005'),
         OVERLAY=(368:C'US',370:C'CE'))
  SORT FIELDS=COPY                           


apart from this I want to overwrite a binary field with 200 at a position 380 on same above mentioned condition .

Can anybody help me in this ?
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Insert binary value through overlay

 

Re: Insert binary value through overlay

Postby richagoyal » Tue Aug 03, 2010 12:06 pm

Hi ,

We can do in this way :

  OUTREC IFTHEN=(WHEN=(5,13,CH,EQ,C'CE10040000005'), 
         OVERLAY=(368:C'US',370:C'CE',380:X'00C8'))


hex value of 200 - 00C8.
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Insert binary value through overlay

Postby Frank Yaeger » Tue Aug 03, 2010 11:26 pm

Yes, that will work. FYI, here's another way to do it with DFSORT that doesn't require knowing that 200 = X'00C8'.

 OUTREC IFTHEN=(WHEN=(5,13,CH,EQ,C'CE10040000005'), 
         OVERLAY=(368:C'US',370:C'CE',380:+200,TO=BI,LENGTH=2))
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Insert binary value through overlay

Postby richagoyal » Wed Aug 04, 2010 5:42 pm

Thanks Frank its working !

Just want to know how binary values will be stored internally and is there any way we can see how they are stored like we can see hex values .
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Insert binary value through overlay

Postby skolusu » Wed Aug 04, 2010 11:04 pm

richagoyal wrote:Thanks Frank its working !

Just want to know how binary values will be stored internally and is there any way we can see how they are stored like we can see hex values .


richagoyal,

Read this FI format positive/negative number and BI for positive number
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Insert binary value through overlay

Postby Frank Yaeger » Wed Aug 04, 2010 11:42 pm

is there any way we can see how they are stored like we can see hex values


Your question doesn't make a lot of sense - hex IS a representation of the bits that are stored.

So when we show +200 as hex 00C4, that is how it is stored internally - in bit representation that would be:
0000000011000100

But we normally use hex to represent the bits rather than 1s and 0s.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post