An integer variable is basically a binary field. Expand 40E2 into binary and add up the powers of two, you will get 123456. N format uses one byte per position. Since I ran this on a PC, the prefix for each digit is 3.
Packed decimal stores two digits in a byte, and has a sign indicator in the low order half byte.
Well, actually no hardware / language (I know of) supports an I3 “datatype”, C datatypes are byte (I1) short (I2) and int (I4) respectively, for example.
Plus IBM hardware can’t deal with an I1 in math operations directly.
I am confused:) In your example Numeric field is holding same value as the Input Binary value.
Let me put my question more elobrate
I have an adastrip extract that includes the ISN of the record. ISN has been extracted into the output as B4. Now I need to use this ISN to read the record in the file and do some actions.
My extract has ISN has 31738, but in the file the ISN seems to be different it is 202552 and the format of ISN in the peek is N10.
PEEK translates from I4 to N10 for readability. On the mainframe you don’t need to execute an ASSIGN to convert the field, just define (or REDEFINE) it as I4.