scm zimport mapping file example
Hi,
I am trying to understand how the zimport mapping file works. In the example in the infocenter section "Reference > Source control command line reference > System z source control command line reference > System z mass import tool overview > Mass import tool mapping file format" it shows:
# Member to zComponent project mappings
# Specify the zComponent project and, optionally, the zFolder that will
# contain the imported members.
#
# Format:
# P:<member>=<zComponent>
P:MORTGAGE.*.(*).*=MortgageApp:%1
With no explanation of what the %1 or parenthesized Astrix implies...
What is the "%1" doing? Is it a typo?
What does the "(*)" do?
Neither of theses two appear to be documented in the RTC info-center.
Where would I learn more about how the mapping file works?
Thanks,
Frank
I am trying to understand how the zimport mapping file works. In the example in the infocenter section "Reference > Source control command line reference > System z source control command line reference > System z mass import tool overview > Mass import tool mapping file format" it shows:
# Member to zComponent project mappings
# Specify the zComponent project and, optionally, the zFolder that will
# contain the imported members.
#
# Format:
# P:<member>=<zComponent>
P:MORTGAGE.*.(*).*=MortgageApp:%1
With no explanation of what the %1 or parenthesized Astrix implies...
What is the "%1" doing? Is it a typo?
What does the "(*)" do?
Neither of theses two appear to be documented in the RTC info-center.
Where would I learn more about how the mapping file works?
Thanks,
Frank
2 answers
Hi Frank,
The (*) and %1 is an example of a backreference. If you are importing all of the members from MYHLQ.MORTGAGE.FOO.COBOL and using that example mapping, COBOL would be captured by the parens, and then referenced by the %1, resulting in a zFolder being created named COBOL. This is discussed at the bottom of this page in the help: http://pic.dhe.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.scm.doc/topics/r_RTCz_massimpoptns.html
It is point number 3 under Important.
Robin
The (*) and %1 is an example of a backreference. If you are importing all of the members from MYHLQ.MORTGAGE.FOO.COBOL and using that example mapping, COBOL would be captured by the parens, and then referenced by the %1, resulting in a zFolder being created named COBOL. This is discussed at the bottom of this page in the help: http://pic.dhe.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.scm.doc/topics/r_RTCz_massimpoptns.html
It is point number 3 under Important.
Robin
Hi,
I am trying to understand how the zimport mapping file works. In the example in the infocenter section "Reference > Source control command line reference > System z source control command line reference > System z mass import tool overview > Mass import tool mapping file format" it shows:
# Member to zComponent project mappings
# Specify the zComponent project and, optionally, the zFolder that will
# contain the imported members.
#
# Format:
# P:<member>=<zComponent>
P:MORTGAGE.*.(*).*=MortgageApp:%1
With no explanation of what the %1 or parenthesized Astrix implies...
What is the "%1" doing? Is it a typo?
What does the "(*)" do?
Neither of theses two appear to be documented in the RTC info-center.
Where would I learn more about how the mapping file works?
Thanks,
Frank
Below is the completed sample files we are using, hope this could help
We have a PDS MASSLOAD.ANTZRC0.COBOL which has 1000 members inside (Z1~Z1000), to import Z1110 ~ Z1119 we use below mapping file and shell script:
mapping.txt:
# Member to zComponent project mappings
# Specify the zComponent project and, optionally, the zFolder that will
# contain the imported members.
#
# Format:
# P:<member>=<zComponent>?:<zFolder>?
P:ANTZRC0.COBOL.Z111*=zImportProject10Opt:zImportFolder10Opt
# zComponent project to Jazz Component mappings
# Specify the Jazz Component that each zComponent project will be shared to.
#
# Format:
# C:<zComponent>=<Jazz>
C:zImportProject10Opt=zImportComponent
Shell script:
/usr/lpp/jazz/v3.0/scmtools/eclipse/scm.sh zimport --hlq MASSLOAD --mapfile /u/zimport/mapping.txt --projectarea "Build Test" -s zImportStream -r https://xxx.ibm.com:9444/ccm -u xxx -P xxx
Please note:
1. Project area "Build Test" is created before the test
2. Stream zImportSteam and component zImportComponent are created before the test
If the script ran successfully
1. A new repository workspace will be created
2. zImportProject10Opt will contain Z1110~Z1119
We have a PDS MASSLOAD.ANTZRC0.COBOL which has 1000 members inside (Z1~Z1000), to import Z1110 ~ Z1119 we use below mapping file and shell script:
mapping.txt:
# Member to zComponent project mappings
# Specify the zComponent project and, optionally, the zFolder that will
# contain the imported members.
#
# Format:
# P:<member>=<zComponent>?:<zFolder>?
P:ANTZRC0.COBOL.Z111*=zImportProject10Opt:zImportFolder10Opt
# zComponent project to Jazz Component mappings
# Specify the Jazz Component that each zComponent project will be shared to.
#
# Format:
# C:<zComponent>=<Jazz>
C:zImportProject10Opt=zImportComponent
Shell script:
/usr/lpp/jazz/v3.0/scmtools/eclipse/scm.sh zimport --hlq MASSLOAD --mapfile /u/zimport/mapping.txt --projectarea "Build Test" -s zImportStream -r https://xxx.ibm.com:9444/ccm -u xxx -P xxx
Please note:
1. Project area "Build Test" is created before the test
2. Stream zImportSteam and component zImportComponent are created before the test
If the script ran successfully
1. A new repository workspace will be created
2. zImportProject10Opt will contain Z1110~Z1119