|
>If I create a table with a SMALLINT it is >shown as being defined as being 4 digits long. >I can insert a 5 digit long number via SQL >but RPG does not support this length of data. Use h extbinint. This works for me on V5R1 compiled TGTRLS(V4R4). Test environment: strsql CREATE TABLE SQLTABLE (SMALLINT SMALLINT INT INT, BIGINT BIGINT, FLOAT FLOAT, CHARFLD CHAR (10 ), NUMERIC NUMERIC (11 , 2), DECIMAL DECIMAL (11 , 2) insert into sqltable values(12345,12345,12345, 12345,'12345',12345,12345) dspffd sqltable Data Field Field Type Length SMALLINT BINARY 4 0 INT BINARY 9 0 BIGINT BINARY 18 0 FLOAT FLTDBL 16 15 CHARFLD CHAR 10 NUMERIC ZONED 11 2 DECIMAL PACKED 11 2 rpg program included I specs B 1 2 0SMALLINT B 3 6 0INT I 7 14 0BIGINT F 15 22 FLOAT A 23 32 CHARFLD S 33 43 2NUMERIC P 44 49 2DECIMAL I presume that RPG IV includes these fields as 'B' datatype for backward compatibility with RPG III unless the header option extbinint is specified, in which case they are typed as I 1 2 0SMALLINT I 3 6 0INT I 7 14 0BIGINT F 15 22 FLOAT A 23 32 CHARFLD S 33 43 2NUMERIC P 44 49 2DECIMAL --buck
As an Amazon Associate we earn from qualifying purchases.
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.