Reputation: 3
I have subfile with first record using as fields for adding new file record. It's have to look like this.
___ ___ ___
FOO 001 002
BOO 003 004
Some of the fields must be numeric with leading zeros. A the same time for the first row it have to be not zeros but empty fields. Is it any solutions except casting all such fields to char or exclude the "add row" from subfile?
Upvotes: 0
Views: 1187
Reputation: 1859
Assuming these are output-only fields, you can keep the add row in the subfile with numeric fields, but put a DSPATR(ND) keyword on the fields that shouldn't show in the first row. Tie that DSPATR(ND) to an indicator that is set to *ON for the first row but *OFF for all subsequent rows.
Upvotes: 0
Reputation: 4014
Define the field as character and populate it with the %editc
function when the value is numeric.
Upvotes: 1