Back to SPR List Previous Next
Second and Third missing values can disappear from a database after unrelated schema mod
Severe - Data loss Closed - Fixed Found:XS.01.07 07 MAR 2008 Fixed:XS.01.08 20 MAR 2008

DETAILS
 A database has some variables with two or more missing values defined. An unrelated
 schema modification (like changing i/o columns) can cause some of the missing values
 become undefined. This is the data in the record that changes, not the schema
 definition. It doesn't happen in all circumstances but it will in this attached
 example.

 1) import the attached database;


 2) run system.data. This shows you the values of the two variables in the one case in
 this database. It also shows MISSING and MISNUM for each. The first variable is a date
 with one missing value (99/99/9999) and the second is an integer with two missing
 values (-1 & -3).
 ********** 99/99/9999 1
 * -3 2

 3) run system.schema. This was created with a write schema and is no different to the
 current schema.

 4) run system.data again an the second variable has changed from missing 2 to
 undefined.
 ********** 99/99/9999 1
 * * 0


 This does not effect the first missing values, only the second and third. If you take
 away the first variable in this schema then it is ok.

EXAMPLE PROGRAM
 RUN NAME        MISS2                            EXPORT
 TASK NAME       INITIALIZATION
 CREATE DATABASE MISS2
 JOURNAL         OFF
 CASE ID         ID                               (A)
 N OF CASES      30000
 RECS PER CASE   1023
 MAX INPUT COLS  3000
 RECTYPE COLS    1  2
 MAX REC TYPES   99
 MAX REC COUNT   200
 TASK NAME       Record Definition for CIR

 RECORD SCHEMA   0  CIR
 DATA LIST
                 ID                               *             (A8)
 VAR LABEL       ID                               'ID'
 END SCHEMA
 TASK NAME       Record Definition for REC1 Record Number     1

 RECORD SCHEMA   1  REC1
 MAX REC COUNT   1
 DATA LIST
                 ID                                   3 -    10 (A8)
                 VAR1                                17 -    26 (I4)
                 VAR2                                46 -    49 (I1)
 VAR RANGES      VAR1                             (0 11111111)
                 VAR2                             (0 1)
 MISSING VALUES  VAR1                             (99999999)
                 VAR2                             (-1
                                                   -3)
 VALUE LABELS    VAR1                             (99999999)'Unknown'
                 VAR2                             (0)'No'
                                                  (1)'Yes'
                                                  (-1)'Unknown'
                                                  (-3)'N/A'
 VAR LABEL       VAR1                             'Var1'
                 VAR2                             'var2'
 END SCHEMA
 STRING LENGTH   32
 REMARK 'Begin import of members'
 PROCEDURE      SYSTEM.DATA:T  (155373,58736)  |Last amended Mar 07, 2008,16:18:56
 retrieval
 process cases
 process record 1
 write VAR1 [missing(VAR1)] [misnum(VAR1)]
 write VAR2 [missing(VAR2)] [misnum(VAR2)]
 end record
 end case
 end retrieval
 END PROCEDURE
 PROCEDURE      SYSTEM.SCHEMA:T  (155373,58627)  |Last amended Mar 07, 2008,16:17:07
 TASK NAME       Record Definition for REC1 Record Number     1

 RECORD SCHEMA   1  REC1
 MAX REC COUNT   1
 DATA LIST
                 ID                                   3 -    10 (A8)
                 VAR1                                17 -    26 (DATE'MMIDDIYYYY')
                 VAR2                                46 -    49 (I1)
 VAR RANGES      VAR1                             ('01 01 2000' '01 01 2050')
                 VAR2                             (0 1)
 MISSING VALUES  VAR1                             ('99/99/9999')
                 VAR2                             (-1
                                                   -3)
 VALUE LABELS    VAR1                             ('99/99/9999')'Unknown'
                 VAR2                             (0)'No'
                                                  (1)'Yes'
                                                  (-1)'Unknown'
                                                  (-3)'N/A'
 VAR LABEL       VAR1                             'Var1'
                 VAR2                             'var2'
 END SCHEMA
 STRING LENGTH   32
 END PROCEDURE
 REMARK 'Import of members complete'
 TASK NAME       IMPORT
 IMPORT          1
 0/1/11/1/M1/M2/
WORKAROUND
Back to SPR List Previous Next