Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
Have issues with zoned numeric fields after v7r1 upgrade?
has no ratings.
Published: 21 May 2015
Revised: 21 Jun 2015 - 3231 days ago
Last viewed on: 23 Apr 2024 (3799 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Have issues with zoned numeric fields after v7r1 upgrade? Published by: Chris Proctor on 21 May 2015 view comments(4)

Good afternoon

I'm running into somthing really weird while debugging a program. I retrieve a record from a file using CHAIN(E) and the record has data in zoned numeric fields, but when I display the field in debug immediately after the chain, the value is zero. This appears to be only happening with zoned numeric fields. Pack fields are displaying just fine. We just upgraded our test box to v7r1 and I was wondering if anyone else has had this issue.

I'm not sure if it's upgrade related or not, but I've never seen this before. Any suggestions would be greatly appreciated!

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: chrisp
Premium member *
Portland, OR
Comment on: Have issues with zoned numeric fields after v7r1 upgrade?
Posted: 8 years 11 months 5 days 11 hours 2 minutes ago

Disregard. There was a rename of the field in the I specs and apparently it's not valid, or something, because neither the actual field name or the renamed field name displayed a value. So, I guess with that said, if you can't rename a field in the I specs anymore, how can I do it without having to do it at the file level?

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Have issues with zoned numeric fields after v7r1 upgrade?
Posted: 8 years 11 months 5 days 11 hours ago

If a field isn't touched by the program, the optimizer will throw it out. Perhaps it is related to your issue?

Posted by: DaleB
Premium member *
Reading, PA
Comment on: Have issues with zoned numeric fields after v7r1 upgrade?
Posted: 8 years 11 months 5 days 10 hours 25 minutes ago

I don't think you can do it at file level, but in control spec (H-spec), you can use OPTION(*UNREF) to force it to generate all variables. Or *NOUNREF, which means unreferenced variables are not generated unless needed by some other module. The same values are in the OPTION keyword on CRTBNDRPG and CRTRPGMOD.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Have issues with zoned numeric fields after v7r1 upgrade?
Posted: 8 years 10 months 4 days 13 hours 45 minutes ago

Just thinking... often times we forget that D-spec oriented numeric fields will default to Packed when no datatype is specified, where as Input spec defined fields default to Zoned. I'm wondering if you have an Input field that has been previously defined on a D spec (D specs appear before I specs) if it forces the field defintion to the D-spec attributes.

Suppose you have an Input spec that is Zoned, but there is also a D-spec version of the field that is Packed. I'm wondering if there is a priority of "I over D" or if normal chronology is taken into account? Something to set and document, I suppose.