호출 스텁 생성기 CSGBatch.xml 파일
CSGBatch.xml Ant 빌드 파일은 디렉토리의 모든 *.cbl 파일과 같이 COBOL 파일의 일괄처리에 대한 <csg> 실행 예를 제공합니다. 호출 스텁 생성기 및 CSGBatch.xml 파일은 WebSphere® Software 제품용 IBM® Rational® Application Developer에 사용 가능합니다.
CSGBatch.xml 입력 특성
CSGBatch.xml은 CSG.xml 파일과 같은 입력 특성을 사용합니다. CSG.xml 입력 특성 설명은 호출 스텁 생성기 CSG.xml 파일에 대한 주제를 참조하십시오. <csg> 속성 및 요소의 설명은 Ant 태스크에서의 호출 스텁 생성기 호출에 대한 주제를 참조하십시오.
<csg> 태스크를 Rational Application Developer 그래픽 인터페이스에서 실행하면, -Dproperty_name=property_value 형식을 사용하여 특성을 정의할 수 있습니다.
CSGBatch.xml은 $_ProgramId_$ 및 $_DataElementName_$ 대체 변수를 사용하여 각 COBOL 파일에 대해 생성된 패키지 이름과 매개변수 이름을 조작합니다.
파일 위치
CSGBatch.xml Ant 빌드 파일은 다음과 같은 위치가 있습니다.
product_installation_root/CobolCallStubGenerator.V1.2/CSGBatch.xml
CSGBatch.xml 컨텐츠
제품과 함께 제공된 CSGBatch.xml 파일은 다음 예와 유사합니다.
<?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