× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Barbara

My main issue is that the RPG reference says that in an i-spec, if the type is blank and decimals are specified, that it is zoned - now I understand that this gets converted to packed.

So if you have this

myfile ns 01
1 3 0fld1

then fld1 is zoned - but RDi 9.1 reports that it is packed 5,0 - it should be zoned 3,0 - I do see that the compile listing says it is packed 3,0 - NOT 5,0

I am a little sorry that I mentioned how RDi should present it - that's for another thread - but THIS presentation is incorrect.

I was thinking that yes, I-spec was input buffer - as I recall, RPG moves things from the input buffer to its internal structures, right?

So am I still missing something? I an looking at page 382 of the 7.1 ILE RPG Reference that says a blank in position 36 of I-spec is either alpha or zoned.

Thx
Vern

On 10/24/2014 6:19 PM, Barbara Morris wrote:
On 2014-10-24 16:04, Vernon Hamberg wrote:

I'd like the outline to display the data type as defined, not as
internally processed - that's more useful when editing, seems to me. I
know it's not "the truth" - but I don't know if I can handle the truth!


The I spec doesn't define the field in the program, it just defines the field in the input buffer. The I spec actually defines a assignment operation from the input buffer to the program field.

If the field on the I spec is not explicitly defined, either directly or in an externally-described data structure, the compiler will use the length and decimals information to define the field. (Packed if the field doesn't appear anywhere in the D specs, or zoned if the field is listed in a data structure with no type information.)

For dates and times, the default format (*ISO or whatever is specified by the H spec DATFMT or TIMFMT) is always used for I spec fields that aren't defined explicitly.

I don't think RDI should show the type specified on the I spec. The Fields list shows the data types of the actual fields in the program. Also, it's possible to define the same field on multiple I specs with different formats. This is valid:

Imyfile ns 01
I p 1 3 0fld1
I *ymd d 4 11 fld2
Imyfile2 ns 01
I s 1 5 0fld1 I *iso d 6 15 fld2




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.