Comments (5)
Can you please show me more details on what the result/error was? Was the URI chars were escaped in the browser? Was the job calling XMLService in the job ccsid as you expected? What ccids was your cmd/pgm expecting for chars encoded with?
from xmlservice.
@jimoibm @kadler
I need to run cmd and store the china chars into DB2.
Below is cmd results:
<?xml version="1.0"?> <xmlservice> <cmd><success><![CDATA[+++ success CHGLIBL LIBL(QGPL QTEMP)]]></success> </cmd> <cmd exec='rexx'><success><![CDATA[+++ success CMD1 SSNID(1i6cvqpz0ce84ws040gc8wsg4) USR(USE) PAE(''A002'') RTNMSG(?) TSKTXT(''皜祈岫'')]]></success> <row> <data desc='RTNMSG'><![CDATA[ Task A002 already exists. Cannot add.]]></data> </row> </cmd> </xmlservice>
I try encode at my nodejs code but now working.
Big5 is charset
from xmlservice.
Are you saying it is working now?
- If yes, is anything else expected from us to look at? are you indicating errrors in nodejs?
- If no,
Did you use HTTP server or nodejs?
Looks like CMD1 is a placeholder for your own object? Did you check the ccsid/encoding from there?
from xmlservice.
Not working,
I use Postman to debug it and Post method url is http://xxx.xxxx.com:portNum/cgi-bin/xmlcgi.pgm
The CMD1 is placeholder, yes.
I try to use hex='on' as below:
<?xml version="1.0"?> <xmlservice> <cmd>CHGLIBL LIBL(ACMSALIB QGPL QTEMP)</cmd> <cmd exec='rexx' hex='on' before='937/37'>CMD1 SSNID(1i6cvqpz0ce84ws040gc8wsg4) USR(XUDONGZ) PAE(''A002'') RTNMSG(?) TSKTXT(''測試'')</cmd> </xmlservice>
My web page show missing codes:
OR give us some example for ccsid convert
https://xmlservice.readthedocs.io/en/latest/functions.html?highlight=hex#advanced-ccsid
bin2hex('China_ascii_raw_chars')
I see the above docs but not get clear solution for CMD/PGM
from xmlservice.
hex='on' means you need to give hexadecimal....
before/after='fromCCSID/toCCSID' you need consider well on your job ccsid/parm ccsid pgm taking in
if using command call, you need to HEX'd all the command string..
You may consider using pgm call for better control of ccsid conversion on the only needed parms
If hit error complaining Argument list too long., it is caused by a bug below if receiver needs to be bigger than input for iconv(). Try using hex without conversion and workaround in your code..
size = anyBIG(index).bigsize; <-- should be bigger for receiver
rc = iconv(conv.conv
:%addr(fromPtr):%addr(fromBytes)
:%addr(toPtr):%addr(toBytes)); <-- toBytes should greater than fromBytes
Possible one spot change:
P cacAddBig B export
D cacAddBig PI 10i 0
D bsize 10i 0 value
D btype 1A value
...
/free
bsize = bsize * 4; <--- make a bigger receiver size...
....
Command call example:
CHGLIB LIB(JIMOCN) TEXT('中')
935 -> 1208
hex -> IN: C3C8C7D3C9C240D3C9C24DD1C9D4D6C3D55D40E3C5E7E34D7D0E5BCF0F7D5D404040404040404040
hex -> OUT: 4348474C4942204C4942284A494D4F434E2920544558542827E4B8AD2729202020202020202020
&ipc=*NA&ctl="*here"&xmlin="<?xml version='1.0'?><cmd hex='on' before='1208/935' after='935/1208'>4348474C4942204C4942284A494D4F434E2920544558542827E4B8AD2729202020202020202020</cmd>"&xmlout=500000
Result:
<?xml version='1.0'?><cmd hex='on' before='1208/935' after='935/1208'><success>+++ success CHGLIB LIB(JIMOCN) TEXT('�$õ�')</success>
</cmd>
from xmlservice.
Related Issues (20)
- DATA tags in output have wrong converted chars after migrated to new build environment HOT 8
- Is there any example to show how to call stored procedures? HOT 18
- XMLSTOREDP service program not exporting RUNASCII HOT 1
- xmlcgi only supports password length less/equal to 10 HOT 1
- Multiple result sets HOT 2
- Add support for Free Format parameter declaration HOT 3
- Changing 'commit' option in XML SQL statement does NOT work HOT 7
- Itoolkit's iPgm - Library setup HOT 17
- How to deal with DBCS chars at IBMi db2 HOT 1
- How to fix IPLUG15M in QXMLSERV type *N not found. error HOT 2
- Stored procedures truncate result HOT 3
- Drop calling /usr/lib/start32 to bring PASE up
- spawn call overwrites instead of ORs flags HOT 1
- [feature] job name will always be XMLSERVICE HOT 2
- Qp0sDisableSignals ??? HOT 5
- Call to service program functions don't have %PARMS() set properly - ie with *NOPASS parameters and <pgm mode="ile"> HOT 3
- Calls to programs or service program functions with mode="opm" do not handle *OMIT parameters properly HOT 1
- Fix copyright headers on source files
- Properly escape content in built CDATA blobs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmlservice.