search cancel

CA Fast Unload for DB2 for Z/OS : x'FF' found in unloaded data

book

Article ID: 227738

calendar_today

Updated On:

Products

Fast Unload for DB2 for z/OS

Issue/Introduction

Running Fast Unload unloading a DECIMAL 3,2 column with OUTPUT-FORMAT FIXED and noticed that before the column x'FF' is present.  Why?

Environment

DB2 for Z/OS

Resolution

The x'FF' is the null indicator.  

Sample table:

   CREATE TABLE authid.TBEMPM
       (EMPID INTEGER
 WITH DEFAULT NULL
       ,DEPTID CHARACTER(8) FOR MIXED DATA
 WITH DEFAULT NULL
       ,SALARY DECIMAL(9, 2)
                                                       NOT NULL
       ,BONUS DECIMAL(9, 2)
 WITH DEFAULT NULL
       )
       IN DBCORP.TSEMP2
  APPEND NO
  NOT VOLATILE CARDINALITY
  DATA CAPTURE NONE
  AUDIT NONE
  CCSID EBCDIC;

Sample unload cards:

//SYSIN   DD  *
FASTUNLOAD
DISCARDS 100
DISPLAY-STATUS 10000
EXCP YES
INPUT-FORMAT TABLE
IO-BUFFERS 50
LOAD-CONTROL DB2LOAD
OUTPUT-FORMAT FIXED
PART-INDEPENDENCE NO
SHRLEVEL REFERENCE
SORTFLAG ALL
SORTSIZE 4M
SORTNUM 8
ESTIMATED-ROWS 75
SQL-ACCESS  ONLY
SELECT * FROM authid.TBEMPM;

Sample data seen via RC/Update:
DT32 ----------------------------------------------------------
N:EMPID          N:DEPTID   SALARY        N:BONUS
N          6,000 Y --------          5.99 N          5.99
N          7,000 Y --------          5.99 N          5.99
N          8,000 Y --------          5.99 N          5.99

Sample unloaded data showing the x'FF' in column 7.

=COLS> ----+----1----+----2----+---
000006
       000017FF00000000000590000059
       000070FF000000000009C000009C
--------------------------------------
000007
       000015FF00000000000590000059
       0000B8FF000000000009C000009C
--------------------------------------
000008
       000014FF00000000000590000059
       0000F0FF000000000009C000009C
--------------------------------------

Sample load cards:

LOAD DATA   INDDN SYSREC01
 RESUME NO   REPLACE
 EBCDIC  CCSID(1027,5035,4396)
INTO TABLE  authid.TBEMPM
  (
   EMPID                          POSITION(            3:           6 )
     INTEGER
       NULLIF(           1 ) = X'FF'
    ,
   DEPTID                         POSITION(            9:          16 )
     CHAR                MIXED (     8)
       NULLIF(           7 ) = X'FF'
    ,
   SALARY                         POSITION(           17:          21 )
     DECIMAL PACKED
    ,
   BONUS                          POSITION(           24:          28 )
     DECIMAL PACKED
       NULLIF(          22 ) = X'FF'
  )