Restructure signed packed field
search cancel

Restructure signed packed field

book

Article ID: 16116

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

Restructuring a database record, making the following change:

•             RECORD-ELEMENT            from Comp-3 S9(2)V9(4) to Comp-3 S9(2)V9(6)

When restructuring the record, it is not initializing the new byte with a zero as the last byte of the element, but as the first byte of the element.

IDMSRSTT FIELD=(XL1'0',37,1,NEW) INIT RECORD-ELEMENT
IDMSRSTT FIELD=(37,38,4) COPY RECORD-ELEMENT

Can this be done through the restructure utility? Must this be done with a conversion program?

Environment

Release: All supported releases.

Resolution

Restructuring a packed field in this manner would require RESTRUCTURE to manipulate the packed sign bytes along with potential data in those last bytes. It does not have that ability. Do the restructure and then run a conversion program that multiplies that field in each record by 100 to realign the data with the additional 0's at the end of the field.