Using scm and jbe in USS...
![]()
Hello,
I recently tried to use the SCM command line and Jazz Build Engine to manage source code and builds of an existing UNIX-compatible code-base...in the Unix System Services environment on a z/OS mainframe :shock:. The results were a bit unexpected. One major sticking point is that the SCM command line extracts files encoded as text...in ASCII. Since USS utilities expect text to be EBCDIC encoded it's impossible to edit using any of the text editors available to me. Similar story for attempts to compile source or run checked-in shell or Perl scripts. Another issue is that since Jazz Builds use the same SCM support, they too extract in ASCII. A bit of a surprise, though, is that ANT builds actually work with this setup. But to clarify, only ant itself works and only with ant scripts encoded in ASCII: Any attempt to run programs other than ant don't do too well. I can think of a few workarounds, but am wondering if this usage pattern was actually tested and what approaches came out of said testing. In short, how are JBE and SCM intended to be used on USS? - chris |
12 answers
![]()
Hi Chris,
By default, the SCM doesn't do any conversion -- it should extract the files from the repository in the same encoding with which they were checked in. If these files will only be worked with on USS (or if you have tooling on your distributed machines which can handle EBCDIC files), one solution would be to simply store them in EBCDIC in the repository. Alternatively, support was added in RTC V3.0.1 to allow the SCM to perform some under-the-covers conversion when loading/checking in files to/from USS. It's triggered by the presence of a user property, "mvsCodePage", on the files in the repository. When this property is set on a file, the SCM will convert the file's contents from UTF-8 to either the platform default encoding (if the value of the property is unset or blank), or to an encoding you specify as the value of that property. For example, if you had files containing Japanese characters, you could set mvsCodePage to IBM-939 on those files. Please note that the files must not be marked as binary (i.e. they must have a line-delimiter property other than 'none') in order for this conversion to occur. - John |
![]()
Hi all, I tried the mvsCodePage user propery (set to IBM-037) on a file that needs to be sent to USS and converted to IBM-037, but it seems to have no effect. Can you please tell me if you tried it? Did it work? Any suggestions? Thanks a lot, Claudio |
![]()
Claudio,
After loading your repository workspace that includes the file that needs to be converted, what is the output of a 'scm property list /path/to/file' command? - John |
![]() Claudio, Hi John, here is the output of the scm command on the file: ----- D:\Program Files\IBM\SDP\scmtools\eclipse>scm property list D:\projects\RTCZ\workspace\CProject\babylon\src\libs\OPCQueue.C -r cla4Z D:\projects\RTCZ\workspace\CProject\babylon\src\libs\OPCQueue.C jazz.encoding - Cp1252 jazz.executable - false jazz.line-delimiter - Platform jazz.mime - text/plain mvsCodePage - IBM-037 ----- I confirm that after fetching, the file in the USS partition is UTF-8. Thanks for your help, Claudio |
![]()
Thanks, Claudio -- that all looks okay at first glance. How is your fetch being done onto USS? Is it being done as part of a JBE build, like the original poster?
|
![]() Thanks, Claudio -- that all looks okay at first glance. How is your fetch being done onto USS? Is it being done as part of a JBE build, like the original poster? Hi John, let me sum up the steps I followed: 1. Created a C++ project (not zProject) on RTC client with a C++ file (UTF-8) in it 2. With Team->share, then deliver, I uploaded it to RTC 3. then I set the user property mvsCodePage as suggested in this post, delivered this change, as you can see with the output of the scm command 4. Defined a build of type "Ant with Enterprise Extensions - Rational Build Agent"; in the "Ant with Enterprise Extensions" tab, I selected "Use an existing build file". Finally I associated the build definiiton to a build engine of type "Rational Build Agent". When we trigger a build, the code is fetched to the rational build agent, but it's UTF-8. I use an empty build file (the xml build file for Ant) for now. Of course, after the fetch, the build fails because the build file is empty, and so incorrect. Maybe can this be a problem? I assumed that the C code is converted before taking into account the build file. Or should I code the conversion as an explicit task inside the build file? If this is the case, do you know where can I find the library of ant activities, tasks, ... specific for this purpose? Thanks a lot for your help, Claudio |
![]()
Hi Claudio,
Thanks for the detailed additional information. I've followed your steps with my setup here, and I've confirmed that my build does correctly convert my file from UTF-8 to IBM-037 on the fetch. You are correct in your assumption that the empty build file should not influence this behavior -- this support is built into the SCM itself, rather than being a conversion done post-download. One additional thing I can think of to check: in your build log, you should see a line like: ENV BLD_TOOLKIT=/usr/lpp/jazz/v3.0/buildsystem/buildtoolkit What is the output of the following command when run from USS (substituting the path with the value of BLD_TOOLKIT as shown in your build.log, as appropriate?): ls /usr/lpp/jazz/v3.0/buildsystem/buildtoolkit | grep fileagent_ - John |
![]()
Hi John, I confirm that the build log contains the line: ENV BLD_TOOLKIT=/usr/lpp/jazz/v3.0/buildsystem/buildtoolkit The requested output is: BPXROOT:/:>ls /usr/lpp/jazz/v3.0/buildsystem/buildtoolkit | grep fileagent_ com.ibm.teamz.fileagent_1.1.0.v20101110_2353.jar Thanks, Claudio |
![]()
Hi Claudio,
Okay -- that explains it. In my first response to the original poster, I indicated that this support was added in V3.0.1. However, the timestamp on that JAR file indicates that your build toolkit on z/OS is currently at a V3.0 level, which explains why the conversion is not being done. - John |
![]() Hi Claudio, John, I noticed the indication on version (3.0.1) and as a first step I made this check: - connected th RTC client to the RTC server - right-click on my repository connection -> Properties - accessed the "Server Information" tab, whereI can read: Server: Rational Jazz Team Server Version: 3.0.1 Build-ID: RJF-I20110602-0017 License-key: Permanent I thought this was enough. Now I get that also the build engine, with the corresponding build toolkit must be at version 3.0.1. I'll have it upgraded to 3.0.1. Can you please tell me how to check the version of the build engine? Thanks a lot for you support, Claudio |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.