search cancel

RC/Migrator : Analyzing a table with a migration strategy does not generate POSITION ( 1) for the 1st column in LOAD SYSIN

book

Article ID: 19781

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS

Issue/Introduction

A migration where data are being unloaded/loaded generates LOAD cards where the first column in the load cards has a starting position higher than 1; e.g. POSITION( 2). Why?

Environment

Release: R20
Component: RCM

Resolution

When the Batch Processor UNLOAD program is utilized, the unload dataset will have extra byte(s) at the beginning of each row if a nullable column exists on the table. 
Because of this, the first column in the load cards is coded as starting at a higher position than 1 and the NULLIF parm is added as the last card, e.g. (NULLIF( 1) = X'FF). 
Here is an example where the first column EMPNO starts in POSITION( 11) because the first 10 bytes are NULLIF indicators.

 

.DATA

LOAD DATA RESUME NO      LOG NO
 ENFORCE NO
 ERRDDN    PTIERR
 MAPDDN    PTIMAP
 WORKDDN   (PTIUT1,PTIOUT)
 SORTDEVT  SYSDA
 CONTINUEIF (72) = X'FF'
 INDDN     PTILOAD
 DISCARDDN PTIDISC
 INTO TABLE DSN81210.EMP
 IGNOREFIELDS NO
 (EMPNO                            POSITION(    11 )
  CHAR(     6)
 ,FIRSTNME                         POSITION(      *)
  VARCHAR
 ,MIDINIT                          POSITION(      *)
  CHAR(     1)
 ,LASTNAME                         POSITION(      *)
  VARCHAR
 ,WORKDEPT                         POSITION(      *)
  CHAR(     3)                     NULLIF(     1) = X'FF'
 ,PHONENO                          POSITION(      *)
  CHAR(     4)                     NULLIF(     2) = X'FF'
 ,HIREDATE                         POSITION(      *)
  DATE EXTERNAL(    10)            NULLIF(     3) = X'FF'
 ,JOB                              POSITION(      *)
  CHAR(     8)                     NULLIF(     4) = X'FF'
 ,EDLEVEL                          POSITION(      *)
  SMALLINT                         NULLIF(     5) = X'FF'
 ,SEX                              POSITION(      *)
  CHAR(     1)                     NULLIF(     6) = X'FF'
 ,BIRTHDATE                        POSITION(      *)
  DATE EXTERNAL(    10)            NULLIF(     7) = X'FF'
 ,SALARY                           POSITION(      *)
  DECIMAL                          NULLIF(     8) = X'FF'
,BONUS                            POSITION(      *)
 DECIMAL                          NULLIF(     9) = X'FF'
,COMM                             POSITION(      *)
 DECIMAL                          NULLIF(    10) = X'FF'
)

.ENDDATA

Additional Information

UNLOAD Using the UNLOAD Program