Format I, N and U

which the minimum and maximum size
I1 that fits in? and an I2 and I4?

excuse the ignorance of the question, most do not understand it well.

N and U, where it is recommended to use one or the other?

N and U both have automatically saved the sign of positive and negative?

for decimal numbers, for example: 12.2 (123.44)
I should use N14 or U14? calculation as the format / size?

I thank you. and apologize for your questions.

I’m Cobol programmer and in cobol to me seems more straightforward this.

I format is COMP.
I1 <= 127
I2 <= 32767
I4 <= 2147483647
For array indexes, always use I4.

N format is external decimal.
For computations, use P format - COMP-3.

In Natural, U format is for Unicode characters. In Adabas, U is for unpacked decimal.

Well, Claudio, I don’t think you should apologies for your questions: asking for help is NOT shameful.
Personally I’ve seen a lot of Natural code where N format is used for tax calculations - not the very efficient way to do it at all. By the way, all of those I1, I2, I4, P and N may be negative - just as in COBOL I assume; example: -128 <= I1 <= 127; -32768 <= I2 <= 32767 and so on.
As for “…in cobol to me seems more straightforward this” I’d say “everything is relative, and only Sweden vodka is Absolut” :slight_smile:

Best regards.

and for decimal places, a COBOL PIC S9(12)V2 COMP-3 would be (P12.2) in Natural.

thanks to all.

Here’s a link to the regarding Documentation:

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat6313win/pg/pg_defi_dv.htm#Format_Length_Def