Fichier CSGBatch.xml de générateur de module de remplacement d'appel

Le fichier de génération Ant CSGBatch.xml fournit un exemple d'exécution de <csg> sur un lot de fichiers COBOL, tels que tous les fichiers *.cbl d'un répertoire. Le fichier CSGBatch.xml et le générateur de module de remplacement d'appel sont disponibles avec le produit IBM® Rational Application Developer for WebSphere Software.

Propriétés d'entrée du fichier CSGBatch.xml

CSGBatch.xml utilise les mêmes propriétés d'entrée que le fichier CSG.xml. Pour obtenir une description des propriétés d'entrée de CSG.xml, voir la rubrique sur le fichier CSG.xml du générateur de module de remplacement d'appel. Pour obtenir une description des attributs et éléments <csg>, voir la rubrique sur l'appel du générateur de module de remplacement d'appel à partir d'une tâche Ant.

Si vous exécutez la tâche <csg> dans l'interface graphique de Rational Application Developer, vous pouvez définir les propriétés à l'aide du format -Dnom_propriété=valeur_propriété.

CSGBatch.xml utilise les variables de substitution $_ProgramId_$ et $_DataElementName_$ pour manipuler le nom de package et les noms de paramètre générés pour chaque fichier COBOL.

Emplacement de fichier

Exemple d'emplacement du fichier de génération Ant CSGBatch.xml :

product_installation_root/CobolCallStubGenerator.V1.2/CSGBatch.xml

Contenu de CSGBatch.xml

Le fichier CSGBatch.xml qui est fourni avec le produit se présente comme suit :

<?xml version="1.0" encoding="UTF-8"?>
<!-- .......................................................................... -->
<!-- This Ant build file can run the COBOLCallStubGenerator (CSG) within Rational
     Application Developer. See CSG.xml for a more complete description of this file.  
     Except this file takes a directory of COBOL files (*.cbl) and runs <csg> against 
     each file. 

     Note: This file is configured to append the COBOL PROGRAM-ID to the callStubPackage
     and to prepend the PROGRAM-ID to each parameter name (see the <callStubPackage>
     and <dataElementsClass> elements).                                          -->
<!-- .......................................................................... -->

<project default="CSGBatch">
  <property name="csgDir" value="${basedir}" />
  <property name="debug" value="false" />
<taskdef resource="com/ibm/ws/batch/cobol/ant/callstub/antlib.xml" 
         classpath="${csgDir}/lib/COBOLCallStubGenerator.jar"/> 

  <!-- These input properties are required. They can be specified as arguments to the Ant build. -->
  <property name="cobolSourceDir"     value="" />   <!-- full path to COBOL source directory -->
  <property name="workSpace"          value="" />   <!-- full path to Eclipse workspace -->
  <property name="eclipseProjectName" value="" />
  <property name="callStubPackage"    value="" />
  <property name="antBuildFile" value="${workSpace}/${eclipseProjectName}/src/GenAllBindings.xml" />

  <target name="CSGBatch">
    <csg configFile="${csgDir}/csg.properties" 
         workSpace="${workSpace}" 
         eclipseProjectName="${eclipseProjectName}" 
         antBuildFile="${antBuildFile}" >

      <!-- Process all *.cbl files in the given cobolSourceDir. -->
      <fileset dir="${cobolSourceDir}" includes="**/*.cbl" />  

      <!-- Append the COBOL PROGRAM-ID to the callStubPackage using substitution variables. -->
      <callStubPackage>${callStubPackage}.$_ProgramId_$</callStubPackage> 

      <!-- Prepend the COBOL PROGRAM-ID to the parameter class name using substitution variables. -->
      <dataElementsClass>$_ProgramId_$_$_DataElementName_$</dataElementsClass>

    </csg>

    <eclipse.refreshLocal depth="infinite" resource="${eclipseProjectName}" />

    <!-- Run the data binder in a radlogcheck to detect and print errors. -->
    <radlogcheck workSpace="${workSpace}" stage="begin"  />
    <ant antfile="${antBuildFile}" />
    <radlogcheck workSpace="${workSpace}" stage="end" />

    <!-- Delete the antBuildFile. It is no longer needed and is merely a build artifact. -->
    <delete file="${antBuildFile}" failonerror="false"/>
  </target>
</project

Icône indiquant le type de rubrique Rubrique de référence



Icône d'horodatage Dernière mise à jour: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rgrid_csgbatch_xml_file
Nom du fichier : rgrid_csgbatch_xml_file.html