From 0febcad26826dd1b823cc64244d0e8b735feecad Mon Sep 17 00:00:00 2001 From: Alan Seiden Date: Sun, 4 Feb 2024 12:04:28 -0500 Subject: [PATCH] Add indicator type --- samples/data-types.md | 50 ++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/samples/data-types.md b/samples/data-types.md index 459a996..a5726a7 100644 --- a/samples/data-types.md +++ b/samples/data-types.md @@ -1,6 +1,6 @@ # Data Types for XMLSERVICE and PHP Toolkit # -This reference, written by Tony Cairns while at IBM, used to be housed at `http://www.youngiprofessionals.com/wiki/index.php/XMLService/DataTypes`, but that site is no longer available, so we have made it available here. +This reference, written by Tony Cairns while at IBM, used to be housed at `http://www.youngiprofessionals.com/wiki/index.php/XMLService/DataTypes`, but that site is no longer available, so we have made it available here, and added to it. ## Data Type Equivalents for C / RPG / XMLSERVICE XML / SQL ## @@ -28,34 +28,36 @@ uint8/ubyte D myuint8 3u 0 uint16/ushort D myuint16 5u 0 uint32/uint D myuint32 10u 0 uint64/ulonglong D myuint64 20u 0 +[indicator] D myind 1a ``` ## PHP Toolkit Functions That Implement the XMLSERVICE Data Types Shown Above ### ``` -toolkit method/class type i/o comment varName value -======================= ===== ====== ======= ======== ===== -$tk->AddParameterChar ( "both",32, "char", "mychar", ""); -$tk->AddParameterChar ( "both",32, "varchar2", "myvchar2", "", "on"); -$tk->AddParameterChar ( "both",32, "varchar4", "myvchar4", "", 4); -$tk->AddParameterZoned ( "both",12,2,"packed", "mydec", 0.0); -$tk->AddParameterPackDec( "both",12,2,"zoned", "myzone", 0.0); -$tk->AddParameterFloat ( "both", "float", "myfloat", 0.0); -$tk->AddParameterReal ( "both", "real", "myreal", 0.0); -$tk->AddParameterBin ( "both", 9, "binary", "mybin", bin2hex(0xF1F2F3)); // to binary pack("H*", $hex) -$tk->AddParameterHole ( 40, "hole" ); // no output (zero input) -$tk->AddParameterChar ( "both", 4, "boolean", "mybool", "1"); -$tk->AddParameterChar ( "both", 8, "time", "mytime", "09.45.29"); -$tk->AddParameterChar ( "both", 26, "timestamp", "mystamp", "2011-12-29-12.45.29.000000"); -$tk->AddParameterChar ( "both", 10, "date", "mydate", "2009-05-11"); -new ProgramParameter ("3i0","both", "byte", "myint8", 0); // work around missing $tk->AddParameterInt8 -new ProgramParameter ("5i0","both", "short", "myint16", 0); // work around missing $tk->AddParameterInt16 -$tk->AddParameterInt32 ( "both", "int", "myint32", 0); -$tk->AddParameterInt64 ( "both", "longlong", "myint64", 0); -new ProgramParameter ("3u0","both", "ubyte", "myuint8", 0); // work around missing $tk->AddParameterUInt8 -new ProgramParameter ("5u0","both", "ushort", "myuint16", 0); // work around missing $tk->AddParameterUInt16 -$tk->AddParameterUInt32 ( "both", "uint", "myuint32", 0); -$tk->AddParameterUInt64 ( "both", "ulonglong", "myuint64", 0); +toolkit method/class type i/o comment varName value +======================= ===== ====== ======= ======== ===== +$tk->AddParameterChar ( "both",32, "char", "mychar", ""); +$tk->AddParameterChar ( "both",32, "varchar2", "myvchar2", "", "on"); +$tk->AddParameterChar ( "both",32, "varchar4", "myvchar4", "", 4); +$tk->AddParameterZoned ( "both",12,2,"packed", "mydec", 0.0); +$tk->AddParameterPackDec( "both",12,2,"zoned", "myzone", 0.0); +$tk->AddParameterFloat ( "both", "float", "myfloat", 0.0); +$tk->AddParameterReal ( "both", "real", "myreal", 0.0); +$tk->AddParameterBin ( "both", 9, "binary", "mybin", bin2hex(0xF1F2F3)); // to binary pack("H*", $hex) +$tk->AddParameterHole ( 40, "hole" ); // no output (zero input) +$tk->AddParameterChar ( "both", 4, "boolean", "mybool", "1"); +$tk->AddParameterChar ( "both", 8, "time", "mytime", "09.45.29"); +$tk->AddParameterChar ( "both", 26, "timestamp", "mystamp", "2011-12-29-12.45.29.000000"); +$tk->AddParameterChar ( "both", 10, "date", "mydate", "2009-05-11"); +new ProgramParameter ("3i0","both", "byte", "myint8", 0); // work around missing $tk->AddParameterInt8 +new ProgramParameter ("5i0","both", "short", "myint16", 0); // work around missing $tk->AddParameterInt16 +$tk->AddParameterInt32 ( "both", "int", "myint32", 0); +$tk->AddParameterInt64 ( "both", "longlong", "myint64", 0); +new ProgramParameter ("3u0","both", "ubyte", "myuint8", 0); // work around missing $tk->AddParameterUInt8 +new ProgramParameter ("5u0","both", "ushort", "myuint16", 0); // work around missing $tk->AddParameterUInt16 +$tk->AddParameterUInt32 ( "both", "uint", "myuint32", 0); +$tk->AddParameterUInt64 ( "both", "ulonglong", "myuint64", 0); +$tk->AddParameterChar ( "out", 1, "ind '0'/'1'" "myind", ""); // indicator type is boolean 1-byte character ```