It's all about the answers!

Ask a question

How to run a build with DB2 Bind RTCz


2
2
Jorge Nagasaki (17512217) | asked Mar 06 '10, 8:34 p.m.
I am trying to do a build with a step tp bind to DB2 table, as the program access DB2 table.
I configured the build definition ,and when I run the build it gives me an error trying to find the IKJEFT01 program ( this is to ru the DB2 Bind in TSO Environment ), I know the build agent are having problems because if I specify the Loadlib name ( SYS1.LPALIB) it fins the program (IKJEFT01) but this gives Abend 047 ( expected in this case ) ,because the SYS1.lpalib should not require to define the LOADLIB.
Plase can you help?

Accepted answer


permanent link
Robin Bobbitt (59679) | answered Aug 22 '12, 2:18 a.m.
edited Aug 22 '12, 11:35 a.m.
Jorge, it sounds like you need to customize your ISPF bin path, as described in the help here. Set the team.enterprise.build.ant.myISPFBinPath build property (or teamz.build.ant.myISPFBinPath in V3.x) to point to a directory containing a custom ISPZXENV with an entry such as the following for STEPLIB:

STEPLIB ="ISP.SISPLPA:ISP.SISPLOAD:DSN91.SDSNLOAD"

Jorge Nagasaki selected this answer as the correct answer

Comments
Jorge Nagasaki commented Sep 01 '12, 2:30 a.m.

Hi Robin. I tested with your suggestions , and it worked Great ! now I was able to run the Bind succssfully with the build . Thank you very much

11 other answers



permanent link
Tami Takamiya (2011110) | answered Mar 09 '10, 11:33 a.m.
JAZZ DEVELOPER
I see the problem...
Now I read the article, and have some questions on the DB2 bind package macro definition ( Listing 2).

Do I have to include this peace of macro definition in the build.xml ?
may be at the end?
Do you have a sample of the REXX used int this macro ('TAMI.JAZZ.EXEC(PACKBIND)' ) ?


You can add the macro definition in your build.xml file. Even though RTCz stores atuomatically generated macro definitions in the macrodefs.xml file, macors do not have to be defined in that file.

The REXX used in the sample is something like


/* REXX */
trace o
Arg SYSTEM PACKAGE LIBRARY MEMBER OWNER QUALIFIER ACTION ISOLATION
DB2_Line = "BIND PACKAGE("PACKAGE")" ||,
" LIBRARY('"LIBRARY"')" ||,
" MEMBER("MEMBER")" ||,
" OWNER("OWNER")" ||,
" QUALIFIER("QUALIFIER")" ||,
" ACTION("ACTION")" ||,
" ISOLATION("ISOLATION")"
say DB2_Line
queue DB2_Line
queue "END"
Address TSO "DSN SYSTEM("SYSTEM")"
rcode = RC
say "RETURN CODE =" rcode
exit rcode


Tami

permanent link
Tami Takamiya (2011110) | answered Mar 10 '10, 1:52 p.m.
JAZZ DEVELOPER
GREAT!!!!
Bind works fine now...

Sorry if this question is very basic, but now I am trying to execute this Bind After the Compilation and could not figure out how the build chooses the order in which the commands in build file are executed.

I tried to put at the botton of the build.xml but it executes the bind before compilation.. this for sure is a problem.
hints?


In Ant, tasks defined outside of any targets will be executed at first. I will attach the full-source of the build script I used below. In the script, there is the db2bind target and it is executed after the linkedit target (please see the "all" target).


<?xml version="1.0"?>
<project name="MortgageApplication" default="all" xmlns:antz="antlib:com.ibm.teamz.build.ant"
xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
<description>Mortgage Application Sample Build</description>

<taskdef name="startBuildActivity"
classname="com.ibm.team.build.ant.task.StartBuildActivityTask" />
<taskdef name="artifactFilePublisher"
classname="com.ibm.team.build.ant.task.ArtifactFilePublisherTask" />

<!-- List of DD names to be published as log files. -->
<property name="teamz.build.publishoutputs.dds" value="SYSPRINT,ANTPRINT"/>

<!-- Publish files to be used in the build. -->
<target name="publish" description="Publish">
<startBuildActivity label="Publish"
autoComplete="true"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"/>
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="${teamz.scm.fetchDestination}/buildableFiles.xml"
label="Buildable file list"/>
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="${teamz.scm.fetchDestination}/FAOperationList.xml"
label="File Agent operations list"/>
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="${teamz.scm.fetchDestination}/fetchedFiles.xml"
label="Fetched file list"/>
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="${teamz.scm.fetchDestination}/macrodefs.xml"
label="Antz macro definitions"/>
<artifactFilePublisher repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${buildResultUUID}"
filePath="${teamz.scm.fetchDestination}/build.properties"
label="Antz build properties"/>
</target>

<import file="${teamz.scm.fetchDestination}/macrodefs.xml"/>

<!-- Macro definition for DB2 BIND PACKAGE command -->
<macrodef name="db2BindPackage">
<attribute name="system"/>
<attribute name="package"/>
<attribute name="library"/>
<attribute name="member"/>
<attribute name="owner"/>
<attribute name="qualifier"/>
<attribute name="action"/>
<attribute name="isolation"/>
<sequential>
<exec executable="tso" failonerror="true">
<arg line=""EXEC 'TAMI.JAZZ.EXEC(PACKBIND)' '@{system} @{package} @{library} @{member} @{owner} @{qualifier} @{action} @{isolation}'""/>
</exec>
</sequential>
</macrodef>

<!-- Macro definition for CICS CEMT SET PROGRAM command -->
<macrodef name="cicsCemtSetProgram">
<attribute name="system"/>
<attribute name="program"/>
<sequential>
<exec executable="/u/tami/oeconsol" failonerror="true">
<arg line=""F @{system},'CEMT SET PROG(@{program}) NEWCOPY'""/>
</exec>
</sequential>
</macrodef>


<!-- Compile all source files with data set names that do not end with 'LINK'. This sample script assumes source data sets that ends with 'LINK' are link-edit input files. -->
<target name="compile" description="Compile">
<startBuildActivity label="Compile"
autoComplete="true"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"/>
<!--
<antz:compile>
<restrict>
<antz:buildableset buildableList="${teamz.scm.fetchDestination}/buildableFiles.xml"/>
<antz:langdefselector name="BMS"/>
</restrict>
</antz:compile>
<antz:compile>
<restrict>
<antz:buildableset buildableList="${teamz.scm.fetchDestination}/buildableFiles.xml"/>
<rsel:or>
<antz:langdefselector name="COBOL*"/>
</rsel:or>
</restrict>
</antz:compile>
-->
<antz:compile>
<!--restrict-->
<antz:buildablelist>
<antz:buildable datasetName="${teamz.scm.dataset.prefix}.BMS" memberName="EPSMORT" langDefName="BMS"/>
</antz:buildablelist>
<!--antz:buildableset buildableList="${teamz.scm.fetchDestination}/buildableFiles.xml"/-->
<!--antz:langdefselector name="BMS"/-->
<!--/restrict-->
</antz:compile>
<antz:compile>
<!--restrict-->
<antz:buildablelist>
<antz:buildable datasetName="${teamz.scm.dataset.prefix}.COBOL" memberName="EPSCMORT" langDefName="COBOL-4"/>
</antz:buildablelist>
<!--antz:buildableset buildableList="${teamz.scm.fetchDestination}/buildableFiles.xml"/-->
<!--rsel:or>
<antz:langdefselector name="COBOL*"/>
</rsel:or-->
<!--/restrict-->
</antz:compile>

</target>

<!-- Link-edit all link-edit input files. -->
<target name="linkedit" description="Link-Edit">
<startBuildActivity label="Link-Edit"
autoComplete="true"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"/>
<antz:compile>
<restrict>
<antz:buildableset buildableList="${teamz.scm.fetchDestination}/buildableFiles.xml"/>
<antz:langdefselector name="LINKEDIT"/>
</restrict>
</antz:compile>
</target>

<!-- DB2 BIND -->
<target name="db2bind" description="DB2 Bind">
<startBuildActivity label="DB2 Bind"
autoComplete="true"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"/>
<db2BindPackage system="DSN9" package="DEV2" library="${teamz.scm.dataset.prefix}.DBRM"
member="EPSCMORT" owner="DEVDBA" qualifier="DEVDBA" action="REPLACE" isolation="CS"/>
</target>

<!-- CICS -->
<target name="cics" description="CICS cemt">
<startBuildActivity label="CICS cemt"
autoComplete="true"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSCMORT"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSCSMRD"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSCSMRT"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSMLIS"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSMLIST"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSMORT"/>
<cicsCemtSetProgram system="CICSTS32" program="EPSMPMT"/>
</target>

<!-- Invoke distributed build -->
<target name="distributed" description="Distributed build">
<ant antfile="${teamz.scm.fetchDestination}/Automation/automation.xml"/>
</target>

<!-- Compile and link-edit all buildable files. -->
<target name="all" depends="publish,compile,linkedit,db2bind,cics" description="Full build"/>
</project>


permanent link
Jorge Nagasaki (17512217) | answered Mar 06 '10, 9:26 p.m.
I have now specified just the Program name ( wihtou the Loadlib name), and for some reason nw it looks like is finding the IKJEFT01 program , but I am getting ABEND047.. that means not authorized .
But if I run a standard JOB with JCL it works fine.. may be the buid agent uses some kind of steplib internally ?

permanent link
Tami Takamiya (2011110) | answered Mar 08 '10, 9:59 a.m.
JAZZ DEVELOPER
I have now specified just the Program name ( wihtou the Loadlib name), and for some reason nw it looks like is finding the IKJEFT01 program , but I am getting ABEND047.. that means not authorized .
But if I run a standard JOB with JCL it works fine.. may be the buid agent uses some kind of steplib internally ?


IKJEFT01 is a special module for executing TSO command from JCL. Because RTCz Ant build invokes translator modules dynamically from Java, which is not an authorized program, without using JCL and cannot use IKJEFT01. DB2 BIND can be invoked from REXX EXEC, however, you cannot specify REXX EXEC as a translator on RTCz V2.

One possible workaround is to define your own Ant task to invoke REXX EXEC from RTCz Ant build script. An example of such Ant task is shown in the article:

Using IBM Rational Team Concert for System z and the Jazz platform: Part 4. How cross-system development with Rational Team Concert for System z works
http://www.ibm.com/developerworks/rational/library/10/part4usingibmrationalteamconcertforsystemzandthejazzplatform/index.html

Let us know if you have further questions on this.

Tami

permanent link
Jorge Nagasaki (17512217) | answered Mar 08 '10, 4:12 p.m.
I see the problem...
Now I read the article, and have some questions on the DB2 bind package macro definition ( Listing 2).

Do I have to include this peace of macro definition in the build.xml ?
may be at the end?
Do you have a sample of the REXX used int this macro ('TAMI.JAZZ.EXEC(PACKBIND)' ) ?

permanent link
Jorge Nagasaki (17512217) | answered Mar 09 '10, 2:31 p.m.
GREAT!!!!
Bind works fine now...

Sorry if this question is very basic, but now I am trying to execute this Bind After the Compilation and could not figure out how the build chooses the order in which the commands in build file are executed.

I tried to put at the botton of the build.xml but it executes the bind before compilation.. this for sure is a problem.
hints?

permanent link
Jorge Nagasaki (17512217) | answered Mar 11 '10, 1:28 p.m.
Hi Tami,
Now I see. Thanks this works for me. :)

permanent link
Jorge Nagasaki (17512217) | answered Aug 21 '12, 8:08 p.m.
Hi ,  I am trying to implement this in another system (z/OS) and I am struggling with a problem during the execution of the REXX program.   I am getting errors that says command/program  DSN was not found .  this also occurrs for the BIND.   I have the experience with bind using a batch Job, and I normally fix it by adding a steplib to the DB2 loadlibs  ( for example   DSN91.SDSNLOAD )  and this work well for batch jobs.  But for this REXX programs running on RTC builds does not work at all..   I tried to add an ALLOC command in the REXX program but it says STEPLIB is a restricted name for use in this environment and it fails.    Does anybody knows how we could fix this?

permanent link
Jorge Nagasaki (17512217) | answered Aug 22 '12, 1:08 p.m.
thanks.. I am in travel, now.  But I will be back on this weekend , and will test your suggestion. 

Your answer


Register or to post 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.