There are two REDEFINES there. Both a doing the same thing, which is using a different number of decimal places than the original definition.
For the data, since there is no actual indication of the decimal-point, once choice is to do nothing. The data is identical to look at, whichever COBOL definition you use. That may not be enough for your receiver. But it may. Somewhere in the record will be one or more items which identify the circumstances in which one field is used, as against the other. Some general ways to deal with that: rely on the receiver being able to accurately mimic the existing business logic; create two fields, one will have a value, the other always zero, and populate appropriately on your side; have an actual decimal point, which is in different places depending on the business logic (having BUILT the record, IFTHEN=(WHEN=(logcalexpression) with OVERLAY and a different edit mask for the non-default records. Other than the physical decimal-point, you could have an extra field for the number of decimal places (effectively a scaling-factor). Going to an external source, it is best that your data does not need interpretation. So scaling-factor or actual decimal-point for all non-integer (even perhaps integer) fields, and consult with the receiver as to which they'd be able to process more easily. Of course, if there is already code written, you can end up with a less-than-elegant mix. Which can confuse, annoy, be source of error, cause consternation to auditors, etc. If you're still designing, just provide the most simple format possible. If in the middle of things and no way back, try to keep it simple. On Thursday, 4 February 2016 15:24:38 UTC, Ron Thomas wrote: > Thanks Bill . Here is one structure that has redefines so in this case how > the sort need to be to be put in ? > > 01 WEIGHT-TABLE1. > 02 WEIGHT-TABLE. > 03 KEY1. > 04 KEY-CODE PICTURE X(1). > 04 KEY-DIV PICTURE X(1). > 04 KEY-BRAND PICTURE X(2). > 04 KEY-STYLE PICTURE X(7). > 04 KEY-FILLER PICTURE X(8). > 03 WGHT-SPRD. > 04 UNIT-WGHT PICTURE S9(3)V9(4) > OCCURS 8 TIMES. > 03 WGHT-SPRD-SCRN > REDEFINES WGHT-SPRD. > 04 UNIT-WGHT-SCRN > PICTURE S9(7) > OCCURS 8 TIMES. > 03 SOLID-CAS-SPRD. > 04 SOLID-CAS-PAIRS > PICTURE S9(4) > OCCURS 8 TIMES. > 03 CAS-FACTOR PICTURE S9(1)V9(4). > 03 POS-FACTOR > REDEFINES CAS-FACTOR > PICTURE S9(2)V9(3). > 03 CHG-DATE. > 04 CHG-YY PICTURE X(1). > 04 CHG-MM PICTURE X(1). > > Thanks > Ron T ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
