I can not complie with IBM Enterprise COBOL for z/OS (31 bit). END-DISPLAY on comment: I can compile, link and run. The displays are in the attachment. Please excuse this way, I am not able to post in GnuCOBOL.
I see, posting in GnuCOBOL board (original topic [b658501916] needs register+login ; your help is very useful in any case!
I always forget about the END-DISPLAY not being available - I've adjusted the code for others.
But the results are quite unexpected in nearly every place.
Which Enterprise COBOL version was this?
Do you have any idea what is happening with the JSON-TEXT values?
Do you get readable results when there is no overflow? I've adjusted the code for a test case 4 with a long enough string, re-executing and posting results - as well as insights for JSON-TEXTwould be helpful.
I have register as gartemis. The mail found I in the spam directory.
Adding the attachment deletes the post. So the half post.
IBM Enterprise COBOL for z/OS 6.3.0 P210301
We work with diferent cobol compiler, so xml and json we do not use. On GnuCOBOL 4 and 3.2 I can not use json. I found no rpm in the official distro.
In the attachment the new result with case 4.
On GnuCOBOL 4 and 3.2 I can not use json. I found no rpm in the official distro.
Those are unlikely to be found in anything but "unstable" - because they are not released yet. If you want to give them a try you can build them from source, using the tarball from the nightly snapshots (and as long as you have the development package for libjson-c installed or copy two files from cJSON as noted in the DEPENDENCIES you'll also get JSON support).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I remember when I first did XML cobol on the mainframe and then we moved it off to the Linux server using the xml-parse for MicroFocus. I spent awhile trying to get it to work on linux, and then noticed the codepage issue. I changed the reference in the xml statement for code page and it worked great. Did not have to change the xml cobol program.
Unix XML files use encoded "UTF-8" Mainframe XML files use encoded "ibm-1140"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can not complie with IBM Enterprise COBOL for z/OS (31 bit). END-DISPLAY on comment: I can compile, link and run. The displays are in the attachment. Please excuse this way, I am not able to post in GnuCOBOL.
I see, posting in GnuCOBOL board (original topic [b658501916] needs register+login ; your help is very useful in any case!
I always forget about the
END-DISPLAYnot being available - I've adjusted the code for others.But the results are quite unexpected in nearly every place.
Which Enterprise COBOL version was this?
Do you have any idea what is happening with the
JSON-TEXTvalues?Do you get readable results when there is no overflow? I've adjusted the code for a test case 4 with a long enough string, re-executing and posting results - as well as insights for
JSON-TEXTwould be helpful.Related
Discussion: b658501916
I have register as gartemis. The mail found I in the spam directory.
Adding the attachment deletes the post. So the half post.
IBM Enterprise COBOL for z/OS 6.3.0 P210301
We work with diferent cobol compiler, so xml and json we do not use. On GnuCOBOL 4 and 3.2 I can not use json. I found no rpm in the official distro.
In the attachment the new result with case 4.
Thank you for the update.
Those are unlikely to be found in anything but "unstable" - because they are not released yet. If you want to give them a try you can build them from source, using the tarball from the nightly snapshots (and as long as you have the development package for libjson-c installed or copy two files from cJSON as noted in the DEPENDENCIES you'll also get JSON support).
Translating case 4 str from ansi to ebcdic with own routine I get
{"valid-rec":{"a":"aa","b":"bb"}}
Small point :
ansi to ebcdic ?
Do you mean ASCII to EBCDIC ?
tso with codepage 1141
compile with CODEPAGE(1140)
ansi ISO 8859-1
The result is 7 bit ascii, so it can be also utf-8.
I remember when I first did XML cobol on the mainframe and then we moved it off to the Linux server using the xml-parse for MicroFocus. I spent awhile trying to get it to work on linux, and then noticed the codepage issue. I changed the reference in the xml statement for code page and it worked great. Did not have to change the xml cobol program.
Unix XML files use encoded "UTF-8" Mainframe XML files use encoded "ibm-1140"
Json generate translated from ibm 1140 to utf-8 and my test routine reversal.
Json generate to national translate to utf-16.