× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





I try to explain this problem of mine (even if it is not easy); my friends
has developed an App for Android that exchanges data with As400 through of
the calls of Web Service AS400 that send / read file Json (in practice some
WSs serve for importing data on APP therefore they send data JSon to the
Tablet, while other WSs receive data JSon from the Tablet). We have
implemented these WSs starting from the examples furnished in the site
http://www.powerext.com/2015/06/03/my-first-wp-homepage /; everything has
regularly worked up to the day before yesterday, when suddenly the call to
the WS, from one of the two devices, that had to read and to unload the data
on As400 has begun to go to error, as the function "storeToStmf(jsonStore:
'/ myjson.json':1208) " (you see link above according to example it rules
86) was recalled passing him -1 in the parameter jsonStore. From what I
have understood, it seems that the value -1 have passed when the file Json
is empty (I have made some verifications and the file Json Non it is empty)
or it has some other problems of encoding or something similar. Premised
that the other device keeps on regularly working and the version of the App
is the same one on both the devices and on As400 y has not been modified
anything, I don't absolutely succeed in understanding from thing can spring
this problem; the only things that can come me to mind are:

1. could have been change some setings in the tablet that has influenced
in the use of the coding of the characters of the file Json, that is
produced by the device?

2. an updating of the version of Android could have been performed that is
causing this problem? (almost surely Android has been adjourned the same
day when they have begun out the problems. N.B. in the device in which I
have problems I have Android 5.1.1, while in the other one I have the 4.3)


To try to understand what the problem could be, I have made a program ex new
that goes to read the data Json sent by the Device (following the suggestion
of Henrik Rützou owner http://powerEXT.com) and it performs how much under
brought:

//?Clear powerEXT Service Program & Response Objects

clearSrvPgm();

//?get input from Apache

httpStore = getExtInputRaw();

// Process the request

// .. save what is received for testing

storeToStmf(httpStore: '/tmp//myjson.json'+
%Trim(%Char(%TimeStamp)):1208);

the content of the file coming from the device "incriminated", and saved in
the IFS it is the following:

************Inizio dei dati****************


BtBb'CaC»ChCaBØ# CdCý^Ca ChCjBbBª BtBbCu;CuBµ CuC~ Bµ' BbBªBbBbBðBb'C£ ;#
CuBØC¿ BØ CjCdCd


BbBðBbBµBµ;C¡C£Ct;C£ ';'Cs BbBªB°BðBbC¡C£Ct;C£ ';'Cs BbBªB°BðBb CÝ
;C¡C£Cv*

BØCt Cd Ce BbBðBbBµBµ;C¡C£Ct;C£ ';'Cs BbBªB°BðBbC¡C£Ct;C£ ';'Cs
BbBªB°BðB

BbBªB°BðBb C~C¡Cu;C¿Cu BbBªB°BðBb C~C¡Cu;C¿CuBqBbBªB°BðBbCu #; BµCvBµCzCzC£
B

Cu;C¿CuBlBbBªB°BðBb C~C¡Cu;C¿CuBmBbBªB°BðBb C~C¡Cu;C¿CuBnBbBªB°BðBb
C~C¡Cu;C¿C

************Fine dati**********************



While the content of the file coming from the device Ok, and saved in the
Ifs, it is the following:

************Inizio dei dati****************

£ }ÁËÈÁ {?ÄÍ_Á>ÈÑ $£ { } ^ä!+ëáå+ < }ñ}í{ñ+á ñ(&!+^

ñ(&!+^ ñ(&!+^ ä!{^ä íë^( å éé îá ä!{^î <í}

ä!{^ä<ñá+}á^ã } ^ ää!+}!^ë^ë <{! ä!

!ê ^ë} (& ë^ñ+îñ }!^ {^ ë + !ê ^ñ+ëáêñ(

+!}á ä!{^( å ééñ+! !ê ^ñ+îñ!^ {^ ë ä!{

êñã^ñ+}^}â!< +í(^êñå\á^{!ä í}á+}á <ñ]í^ñî ^

<ñ]í^ñî ^ ä^ä +äá<< }! }ñ&!^ñî ^ { } ^( +í}á

}ñ&!^ñî ^ <ñ]í^ñî ^ +í(^{!ä }ñ&!^ñî ^

<ñ]í^ñî ^ }ñ&!^ñî ^ ä!{^é!+ ^ ((ñ+ ä!{^ä<ñá

}!}^ñ+ä ëë }! ^êñã^ñ+}^}â!< êñã^!ê{ñ+á !ê ^{!ä

}}!^ñ(&!+ { } ^ñ+îñ!^ {^ ë { } ^ë} (&

}ñ+! ñî ^ ñî ^ ñî ^ ñî ^ ñî ^

ñ+!^ ^î î { } ^{!ä ñ(&!+^!( ååñ { } ^êáåñ

ë^{!ä^ ä]íñëñ}! + ë^{!ä^ë} (& }! ë ++!^{!ä

!+^ ñ(&!+^ ä!{^ëä!+}! ä!{^(!{^}ê ë& ') êÑÅÇ

<ñá+}á^ë&á { } ^ä!+ëáå+ ä!{^ ê}ñä!<!

^ñî }ñ&!^{!ä ã åêí&&!^ä<ñá+}á { } ^ñ+îñ!^ {^ ë

&áê^ <ñ]í^ñî ñ(&!ê}!^+á}}!^êñå ä!{^( êä\ñ!

************Fine dati**********************

Now beyond the fact that both the documents are incomprehensible (I have to
understand well thing they make these procedures that I have used in the
program) the other strange thing is that if from the EDTF I perform F15 in
the first file (the incriminated one) I see:



1. Copia da file flusso . . . .
/tmp/myjson.json2015-11-05-15.34.45.493000

2. Copia da file database . . . . Nome


Libreria. . . . . . . . . . . Nome, *LIBL, *CURL


Membro . . . . . . . . . . . Nome, *FIRST


3. Modifica CCSID del file. . . . 00500 CCSID lav: 00280


4. Modifica CCSID della riga . . *NONE


5. Opzione EOL file di flusso . . *LF -- *CR, *LF, *CRLF, *LFCR,
*USRDFN

Definito dall'utente . . . . Valore esadecimale



While in the other one I see:

1. Copia da file flusso . . . .
/tmp/myjson.json2015-11-05-15.35.34.027000

2. Copia da file database . . . . Nome


Libreria. . . . . . . . . . . Nome, *LIBL, *CURL


Membro . . . . . . . . . . . Nome, *FIRST


3. Modifica CCSID del file. . . . 01208 CCSID lav: 00280


4. Modifica CCSID della riga . . *NONE


5. Opzione EOL file di flusso . . *USRDFN -- *CR, *LF, *CRLF, *LFCR,
*USRDFN

Definito dall'utente . . . . Valore esadecimale




As it is possible that has taken two different CCSIDs and different EOL? if
I have well understands the CCSID should take that brought in the call to
the procedure "storeToStmf?.. :1208)



Don't I know thing to check to verify anymore.. there is someone that can
give me some right-hand / suggestions?

Thanks in advance




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.