Page 1 of 1

Update comp-field within a char field

PostPosted: Fri Mar 26, 2021 4:21 pm
by slufter
Hello !

I will update a substring in a data field with a COMP value:

hex
-+----2---
J08279 ø  
DFFFFF4701
108279000C
 


I want to update 7001C (= 70001) to 21120C :

hex
-+----2---
J08279 ø  
DFFFFF4210
108279012C
 


I will update the field with overlay, but I have no idea how to convert '21120' to the packed value.

Any suggestions?

Greets
Axel

Re: Update comp-field within a char field

PostPosted: Fri Mar 26, 2021 11:59 pm
by sergeyken
In your example the value ‘21120’ is presented exactly in IBM packed decimal format. I’m 100% sure of this.

What do you need to convert, from where, and to where?