When you map a field to a DB2® DATE column, you must supply a picture clause.
A typical picture clause for a DATE column is a series of 2-byte constants, where CC represents century, YY represents year, MM represents month, and DD represents day. In the sample VIDKSDS file, the field VIDF007 is mapped to the DATE column ITEM_DATE_FSHIP. The mapping for VIDF007 is shown in Figure 1.
--------------------------- CICS VT: Display field ------------------------- Command ===> ________________________________________________ Scroll ===> CSR Data set name . : VIDKSDS Creator . . . . : CIRDL + Table . . . . . : VID_ITEM + Data set length : 00080 Field name . . . : VIDF007 Field length . . : 00005 Field type . . . : P Column name . . : ITEM_DATE_FSHIP + Starting position: 00039 Picture or FBE . : CCYYMMDD Parameters . . . : Special function : Mapped from table: P Build order . . : 00008 Press: PF3=Exit PF1=Help
Picture | Source value | Converted value |
---|---|---|
CCYY/MM/DD | 2008/12/31 | 2008-12-31 |
CCYY:MM:DD | 2008:12:31 | 2008-12-31 |
ZZCCMMDD | 20081231 | 1908-12-31 |
CCZZMMDD | 20081231 | 2000-12-31 |
CCYYZZDD | 20081231 | 2008-01-31 |
CCYYMMZZ | 20081231 | 2008-12-01 |
Picture | Source value | Converted value |
---|---|---|
CCYY/MM/DD | 2004-12-31 | 2004/12/31 |
CCYY:MM:DD | 2004-12-31 | 2004:12:31 |
CCYYMM01 | 2004-12-31 | 20041201 |
CCZZMMDD | 2000-12-31 | 20ZZ1231 |
CCYYZZDD | 2004-01-31 | 2004ZZ31 |
CCYYMMZZ | 2004-12-01 | 200412ZZ |
CICS® VT always uses the same picture string for converting VSAM to DB2 and DB2 to VSAM. A simple FBE is required to enable different picture strings for VSAM to DB2 and DB2 to VSAM conversions.