Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange Utilities
  3. createdatamaps - Data Map Creation Utility
  4. DTLCCADW - Adabas PCAT Utility
  5. DTLCUIML - IMS Log Marker Utility
  6. DTLINFO - Release Information Utility
  7. DTLREXE - Remote Execution Utility
  8. DTLUAPPL - Restart Token Utility
  9. DTLUCBRG - Batch Registration Utility
  10. DTLUCDEP - CDEP Maintenance Utility
  11. DTLUCSR2 - IDMS SR2 and SR3 Records Utility
  12. DTLUCUDB - DB2 for Linux, UNIX, and Windows CDC Utility
  13. DTLULCAT and DTLULOGC - IDMS Log Catalog Utilities
  14. DTLURDMO - Data Map Utility
  15. DTLUTSK - Task Control Utility
  16. EDMLUCTR - Log Scan and Print Utility
  17. EDMXLUTL - Event Marker Utility
  18. HOSTENT - TCP/IP Address Reporter Utility
  19. PWXCATMY - MySQL Catalog Utility
  20. PWXUCCLPRT - Print Log Summary Utility
  21. PWXUCDCT - Logger for Linux, UNIX, and Windows Utility
  22. PWXUCREG - Capture Registration Suspend Utility
  23. PWXUCRGP - Capture Registrations Print Utility
  24. PWXUDMX - Data Maps Update Time ECSA Memory Utility
  25. PWXUGSK - SSL Reporting Utility for z/OS
  26. PWXUMAP - Map List Utility
  27. PWXUSSL - PowerExchange SSL Reporting Utility

Example: Finding RID Fields

Example: Finding RID Fields

This example describes a control file that is configured to find RID fields.
The control file includes the following global properties that control finding RIDs:
  • cacheConfig (cachePath, flushDataMode)
The control file includes the following data map instance properties that control RID processing:
  • findRecordIds
  • ridConfig (readRecordLimit, recordTypeLimit, fieldWidth)
ridConfig settings are based on the following assumptions about the data:
  • readRecordLimit is set to 5000 because all record types are expected to occur within the first 5000 records of the data set.
  • recordTypeLimit is set to 2 because there are no more than two distinct record types in any data set matching this copybook.
  • fieldWidth is set to 2 because RID values for all data records are two bytes wide.
Alternatively, you could specify the findRecordIds and ridConfig properties at the global level instead of the data map instance level.
Command Line
To run this example on the Informatica services machine, enter the following command at the command line:
Informatica_services_installation_directory
\isp\bin\infacmd pwx createDatamaps
-pwxLocation
pwx_location
-datamapOutputDir
Output -controlFile seq_rid.xml -logFile Output\seq_rid.log
-verbosity
INFO
For the -pwxLocation parameter, specify the location of the PowerExchange Listener as specified in a NODE statement in the PowerExchange DBMOVER configuration file.
Control File
The control file for this example, seq_rid.xml, contains the following lines:
<?xml version="1.0" encoding="UTF-8"?> <DatamapGeneration xmlSchemaVersion="1.0" xmlns="http://com.informatica.cmd.pwx.createdatamaps/DatamapGeneration"> <seqGen> <!-- New for 10.0. Data cache configuration. Global setting only. --> <cacheConfig> <cachePath>c:\temp\imgcache</cachePath> <flushDataMode>e</flushDataMode> </cacheConfig> <globalGenConfig> <schemaName>SEQRID</schemaName> <datamapName>MAP</datamapName> </globalGenConfig> <datamapInstances> <seqDatamapInstance> <genConfig> <!-- New for 10.0. Flag triggers new behaviour. --> <findRecordIds>true</findRecordIds> </genConfig> <importCopybookDetails> <filePath> <zosPath>DEV.IMG.COBOL(RID1)</zosPath> </filePath> </importCopybookDetails> <datamapProperties> <seqFileName> <zosPath>DEV.IMG.DATA(RID1)</zosPath> </seqFileName> <!-- New for 10.0. Skip records and record ID configuration --> <skipRecordCount>0</skipRecordCount> <ridConfig> <readRecordLimit>5000</readRecordLimit> <recordTypeLimit>2</recordTypeLimit> <fieldWidth>2</fieldWidth> </ridConfig> </datamapProperties> </seqDatamapInstance> </datamapInstances> </seqGen> </DatamapGeneration>
COBOL Copybook File
The COBOL copybook for the data map in this example, DEV.IMG.COBOL(RID1), contains the following lines:
01 NAME_REC. 04 ACCOUNT PIC 9(3). 04 RECTYPE PIC X(2). 04 NAME PIC X(20). 04 SEX PIC X. 04 ITEMCT PIC 9. 04 ITEMS OCCURS 3 DEPENDING ON ITEMCT PIC X(10). 04 FILLER PIC X. 01 ACCOUNT_REC. 04 ACCOUNT PIC 9(3). 04 RECTYPE PIC X(2). 04 AMOUNT PIC 9(9)V99. 04 POLICY_DATE PIC X(8). 04 FILLER PIC X.
The copybook includes two 01-level records and no REDEFINE statements. The copybook defines two record layouts: one for each 01-level record.
Data File
The data file in this example, DEV.IMG.DATA(RID1), contains the following lines:
00501Mark Jones M3apple orange pear . 005020000012345087-12-31. 01001Shirley Wong F1raspberry . 010020000000025657-07-04. 02001John Jackson M2pansy daisy . 03001Donald Leary M0. 030020000000004566-01-12. 04001David Wu M1fox . 05001Jean Connor F3dog cat rabbit . 050020000000091196-02-29. 06001Ronald Rose M2horse pony . 060020000100000001-01-01. 07001Betsy Martin F1wolf . 070020000064000141-12-07.
The first three characters of each record in this file are the ACCOUNT field. The next two characters of each record are the RECTYPE field.
Identifying RID Fields
For each 01-level record, the createdatamaps utility goes through a three-step process to identify the RID field and associate its values with specific record layouts.
For the
NAME_REC
record, the utility goes through the following steps:
Step 1
examines the metadata model to find candidate RID fields.
The following table shows the results of Step 1 for the NAME_REC record:
Field in NAME_REC Record
Candidate RID Field?
ACCOUNT
No - field exceeds maximum width
REC_TYPE
Yes
NAME
No - field exceeds maximum width
SEX
Yes
ITEMCT
Yes
ITEMS
No - field exceeds maximum width, RID field cannot be a variable-length field
Based on these findings, the createdatamaps utility determines the offset and length of candidate RID fields.
Step 2
reads data records from the DEV.IMG.DATA(RID1) data set that is specified in the control file. Using the offsets and lengths of the candidate fields from Step 1, Step 2 saves the data values for each candidate RID field. The utility compares the number of distinct data values with the value of recordTypeLimit in the control file. Because recordTypeLimit=2, the utility rejects candidate fields with more than two distinct data values in the data file.
The result must be one RID field selected from the candidates. In this example, the REC_TYPE and SEX fields both meet the recordTypeLimit=2 criteria and remain valid candidate fields. The utility chooses the first candidate field, REC_TYPE, as the RID field.
Step 3
generates all possible record layouts. Because the COBOL copybook in this example includes no REDEFINE statements, Step 3 generates only one record layout for the ACCOUNT_REC record type.
After completing Step 3 for the ACCOUNT_REC record type, the utility repeats the three steps for the
NAME_REC
record type.
Step 1
examines the metadata model to find candidate RID fields.
The following table shows the results of Step 1 for the ACCOUNT_REC record:
Field in ACCOUNT_REC record
Candidate RID Field?
ACCOUNT
No - field exceeds maximum width
REC_TYPE
Yes
AMOUNT
No - field exceeds maximum width
POLICY_DATE
No - field exceeds maximum width
Step 2
reads data records from the DEV.IMG.DATA(RID1) dat set. The utility compares the number of distinct data values with the value of recordTypeLimit (2, in this example) in the control file. The result must be one RID field selected from the candidates. In this example, the REC_TYPE field is the only candidate from Step 1 and also meets the Step 2 criteria.
Step 3
generates all possible record layouts. Because the COBOL copybook in this example includes no REDEFINE statements, the step generates only one record layout for the ACCOUNT_REC record type.
After performing the three steps for each 01-level record, the utility creates a data map with the following records:
Record
REC_TYPE Value
NAME_REC
01
ACCOUNT_REC
02
Log File
The log file this example, seq_rid.log, contains the following lines:
2015-10-09 12:10:41 INFO [MDO_34613] Configuration for this run: location=MyListener, user name=, datamap directory=Output, control file=seq_rid.xml 2015-10-09 12:10:46 INFO [MDAdapter_34100] Finding metadata. Path filter = DEV.IMG.COBOL(RID1) 2015-10-09 12:10:46 INFO [MDAdapter_34101] Fetching file DEV.IMG.COBOL(TST101) 2015-10-09 12:10:47 INFO [MDAdapter_34100] Finding metadata. Path filter = DEV.IMG.DATA(RID1) 2015-10-09 12:10:47 INFO [MDO_34641] Metadata record 'NAME_REC' - Candidate record id field 'RECTYPE' found. 2015-10-09 12:10:47 INFO [MDO_34641] Metadata record 'NAME_REC' - Candidate record id field 'SEX' found. 2015-10-09 12:10:47 INFO [MDO_34641] Metadata record 'NAME_REC' - Candidate record id field 'ITEMCT' found. 2015-10-09 12:10:48 INFO [MDO_34643] Metadata record 'NAME_REC' - Valid record id field 'RECTYPE' found from reading the data records. 2015-10-09 12:10:48 INFO [MDO_34612] Copybook 'NAME_REC' has 1 possible layouts (Maximum configured limit is 2). 2015-10-09 12:10:48 INFO [MDO_34641] Metadata record 'ACCOUNT_REC' - Candidate record id field 'RECTYPE_1' found. 2015-10-09 12:10:48 INFO [MDO_34643] Metadata record 'ACCOUNT_REC' - Valid record id field 'RECTYPE_1' found from reading the data records. 2015-10-09 12:10:48 INFO [MDO_34612] Copybook 'ACCOUNT_REC' has 1 possible layouts (Maximum configured limit is 2). 2015-10-09 12:10:48 INFO [JDMX2_34801] 2 records imported. 2015-10-09 12:10:48 INFO [JDMX2_34802] 12 fields imported. 2015-10-09 12:10:48 INFO [JDMX2_34803] 2 tables imported. 2015-10-09 12:10:48 INFO [MDO_34619] Datamap file 'Output\SEQ_RID.MAP.dmp' was written. 2015-10-09 12:10:48 INFO [MDO_34614] Run complete: 1 datamap(s) created. 0 error and 0 warning messages.
Data Map Files
This example creates a data map with the following file name and relative path:
  • Output\SEQ_RID.MAP.dmp

0 COMMENTS

We’d like to hear from you!