Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
The Challenge:
When a key field is defined to be Packed Decimal in an External Table, there is no way that the mapper can correctly fetch the record as it is.
The Solution: Create a DDS specification to build a logical file against this physical file that will redefine the packed fields.
1. Take note of the following:
a. Physical file name - EXTTABLEP
b. List of all key fields including the ones that are NOT packed decimal – FIELD1P and FIELD2P.
c. The cross reference field - NAME.
2. Find out what is the record format name of the physical file by looking at the DDS which created it or using the command: DSPFD FILE(yourlib/yourfile) TYPE(*RCDFMT). Take note of the record format – REXT_TABLE:
3. Please consult with your IT department/ERP Coordinator/Database Administrator before doing anything from this step on.
4. Create a DDS logical file definition:
5. Compile.
6. Modify the External Table Definition to pick up the newly created logical.
Note: There are other ways of doing this, but we are recommending this not-so-easy solution because we are assured that this modification/addition will be documented in your change management system.
Do you have a new CHALLENGE? Let us know HERE.