Skip to content

Documentation needs to be completed - var types not defined in here. #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jsanguin opened this issue Mar 18, 2022 · 2 comments · May be fixed by #405
Open

Documentation needs to be completed - var types not defined in here. #341

jsanguin opened this issue Mar 18, 2022 · 2 comments · May be fixed by #405
Labels
enhancement New feature or request

Comments

@jsanguin
Copy link

Code examples on how to invoke an RPGLE program make reference to a variable type, but there is no list of the supported types.

Documentation should include the supported types and their mapping from RPG.

Found the following link contains what I need, but others might be looking around without any luck.
http://www.youngiprofessionals.com/wiki/index.php/XMLService/DataTypes

Thanks

@jsanguin jsanguin added the enhancement New feature or request label Mar 18, 2022
@abmusse
Copy link
Member

abmusse commented Oct 26, 2022

I agree this information would be handy. This PR would be handy as well which adds wrappers to the data types:

https://github.com/IBM/nodejs-itoolkit/pull/321/files

@abmusse
Copy link
Member

abmusse commented Sep 26, 2024

Found the following link contains what I need, but others might be looking around without any luck.
http://www.youngiprofessionals.com/wiki/index.php/XMLService/DataTypes

This link is no longer available but luckily this information can be found here: https://web.archive.org/web/20220627043438/http://www.youngiprofessionals.com/wiki/index.php/XMLService/DataTypes

C types          RPG types                     XMLSERVICE types                                   SQL types
===============  ============================  ================================================   =========
int8/byte        D myint8    3i 0              <data type='3i0'/>                                 TINYINT   (unsupported DB2)
int16/short      D myint16   5i 0 (4b 0)       <data type='5i0'/>                                 SMALLINT
int32/int        D myint32  10i 0 (9b 0)       <data type='10i0'/>                                INTEGER
int64/longlong   D myint64  20i 0              <data type='20i0'/>                                BIGINT
uint8/ubyte      D myuint8   3u 0              <data type='3u0'/>
uint16/ushort    D myuint16  5u 0              <data type='5u0'/>
uint32/uint      D myuint32 10u 0              <data type='10u0'/>
uint64/ulonglong D myuint64 20u 0              <data type='20u0'/>
char             D mychar   32a                <data type='32a'/>                                 CHAR(32)
varchar2         D myvchar2 32a   varying      <data type='32a' varying='on'/>                    VARCHAR(32)
varchar4         D myvchar4 32a   varying(4)   <data type='32a' varying='4'/>
packed           D mydec    12p 2              <data type='12p2'/>                                DECIMAL(12,2)
zoned            D myzone   12s 2              <data type='12s2'/>                                NUMERIC(12,2)
float            D myfloat   4f                <data type='4f2'/>                                 FLOAT
real/double      D myreal    8f                <data type='8f4'/>                                 DOUBLE
binary           D mybin    (any)              <data type='9b'>F1F2F3</data>                      BINARY
hole (no out)    D myhole   (any)              <data type='40h'/>
boolean          D mybool    1n                <data type='4a'/>                                  CHAR(4)
time             D mytime     T   timfmt(*iso) <data type='8A'>09.45.29</data>                    TIME
timestamp        D mystamp    Z                <data type='26A'>2011-12-29-12.45.29.000000</data> TIMESTAMP
date             D mydate     D   datfmt(*iso) <data type='10A'>2009-05-11</data>                 DATE

I'm going to work on getting this added to the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants