Has anyone tried building Scott's YAJL IBM i port from source (as opposed to the installation of precompiled version)? When I run BUILDYAJL, I am getting abend at CRTCMOD. Apparently, the system fails to correctly convert the include members from IFS to source file. Here is one of the QSH commands I extracted from debugging session.
cat /yajl/include/yajl/yajl_common.h | sed "s:yajl/yajl_common.h:yajl/common.h:g" | sed "s:yajl/yajl_gen.h:yajl/gen.h:g" | sed "s:yajl/yajl_parse.h:yajl/parse.h:g" | sed "s:yajl/yajl_iconv.h:yajl/iconv.h:g" | sed "s:yajl/yajl_tree.h:yajl/tree.h:g" | sed "s:yajl/yajl_version.h:yajl/version.h:g" | Rfile -wQ "YAJL/YAJL(common.h)"
The include files look appropriate in IFS. In the source file, the members end up containing sets of unreadable characters. Both the IFS file and the source file YAJL/YAJL have CCSID 37. I am at IBM i 7.4, and, prior to compiling BUILDYAJL, I changed the initial value for variable &tgtrls to *CURRENT and the initial value of variable &tgtrls2 to V7R4M0.
BUILDYAJL Error
Re: BUILDYAJL Error
Just a wild guess. Should the job CCSID attribute matter? In the system where I currently am, the QCCSID is 65535 and so would be the job CCSID attribute unless explicitly changed.
-
- Site Admin
- Posts: 872
- Joined: Sun Jul 04, 2021 5:12 am
Re: BUILDYAJL Error
The line of code you cited is for importing the C-language YAJL source from the IFS (YAJL originally came from GitHub) to source phyiscal files. I normally ship YAJL with that already done, so you shouldn't need to run that unless you are working with the source and want to make changes, etc.
That said, if your IFS files are marked with CCSID 37, you will have big problems. They should be CCSID 819.
That said, if your IFS files are marked with CCSID 37, you will have big problems. They should be CCSID 819.
Re: BUILDYAJL Error
Thanks for the guidance, Scott, and for pointing me to where my actual big problem was. Originally, I unzipped the YAJLIFS.ZIP from ACS IFS window, and the system did so by creating a CCSID 37 folder on the fly! Tried jar then, and, this time, had a CCSID 1208 folder for /yajl instead of CCSID 819.
jar -xvf /tmp/YAJLIFS.ZIP
I'll probably keep experimenting for a little while, and, if still unlucky, will get to the pre-compiled install, as you suggested. Unfortunately, I don't have 7-zip available.
jar -xvf /tmp/YAJLIFS.ZIP
I'll probably keep experimenting for a little while, and, if still unlucky, will get to the pre-compiled install, as you suggested. Unfortunately, I don't have 7-zip available.
-
- Site Admin
- Posts: 872
- Joined: Sun Jul 04, 2021 5:12 am
Re: BUILDYAJL Error
the CCSIDs won't be preserved in a .ZIP since .ZIP is a cross-platform file format used all over the place, but CCSIDs are unique to IBM i (and similar IBM machines.)
I would use the open source unzip tool, you can instal it with yum
But Jar will probably work fine. If the CCSID isn't what you expect, you can just change them with the CHGATR CL command or the setccsid QSH command. But, 1208 will probably work fine.
I would use the open source unzip tool, you can instal it with yum
Code: Select all
yum install unzip
Re: BUILDYAJL Error
Yep, CHGATR did the trick. I was able to run BUILDYAJL to successful completion after that.
I have only a couple of slight suggestions.
1. On BUILDYAJL, qualify the name of the binder language source file qsrvsrc for the crtsrvpgm command (or modify the library list upfront) to avoid getting CPF5D05.
2. Slightly edit the README file (Restore the RPG/CL source under Install All Sources And Build From Source) to point to save file QGPL/YAJLLIB72 and add objects QPNLSRC and QCMDSRC to the list of restored objects.
Thanks again, Scott!
I have only a couple of slight suggestions.
1. On BUILDYAJL, qualify the name of the binder language source file qsrvsrc for the crtsrvpgm command (or modify the library list upfront) to avoid getting CPF5D05.
2. Slightly edit the README file (Restore the RPG/CL source under Install All Sources And Build From Source) to point to save file QGPL/YAJLLIB72 and add objects QPNLSRC and QCMDSRC to the list of restored objects.
Thanks again, Scott!