creating HCD mapping for COBOL copybook
cobol copybook :
01 DTS-LAYOUT.
05 OUT1-BOOL PIC S9(3) COMP-3.
05 OUT1-BYTE1 PIC S9(3) COMP-3.
05 OUT1-DATE1 PIC X(10).
05 OUT1-DECIMAL1 PIC S9(15)V9(03).
05 OUT1-DECIMAL2 PIC S9(15)V9(03).
05 OUT1-DOUBLE1 COMP-2.
05 OUT1-DOUBLE2 PIC S9(09)V9(09).
05 OUT1-INT1 PIC S9(09) COMP.
05 OUT1-INT2 PIC S9(09) COMP-3.
05 OUT1-INT3 PIC S9(10) DISPLAY.
05 OUT1-SHORT1 PIC S9(04) COMP.
05 OUT1-SHORT2 PIC S9(04) COMP-3.
05 OUT1-SINGLE1 COMP-1.
05 OUT1-SINGLE2 PIC S9(05)V9(10).
05 OUT1-STRING1 PIC X(4000).
05 OUT1-TIME1 PIC X(08).
05 OUT1-TSTAMP1 PIC X(26).
The corresponding HCD will be :
[Stats]
CreatedOn=06/29/06 15:18:50
[Files]
USERID.KSDS.BOOL=1
USERID.KSDS.BYTE=1
USERID.KSDS.DATE1=1
USERID.KSDS.DECIMAL2=1
USERID.KSDS.DECIMAL=1
USERID.KSDS.DOUBLE=1
USERID.KSDS.INT1=1
USERID.KSDS.INT2=1
USERID.KSDS.DOUBLE22=1
USERID.KSDS.INT3=1
USERID.KSDS.SHORT2=1
USERID.KSDS.SHORT=1
USERID.KSDS.SINGLE1=1
USERID.KSDS.SINGLE2=1
USERID.KSDS.STRING12=1
USERID.KSDS.TIME=1
USERID.KSDS.TSTAMP=1
[USERID.KSDS.DATE1]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;Y;
Col2=0;COL2;COL2;0;0;10;DATE;DATE;N;37; ;Y;
[USERID.KSDS.DOUBLE]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;0;0;8;DOUBLE;DOUBLE;N;37; ;N;
[USERID.KSDS.DECIMAL2]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;18;3;18;ZONED;NUMERIC;N;37; ;N;
[USERID.KSDS.INT1]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;10;0;4;LONG;LONG;N;37; ;N;
[USERID.KSDS.INT2]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;10;0;4;LONG;LONG;N;37; ;N;
[USERID.KSDS.DOUBLE22]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;18;9;18;ZONED;DOUBLE;N;37; ;N;
[USERID.KSDS.SHORT2]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;4;0;4;PACKED;DECIMAL;N;37; ;N;
[USERID.KSDS.SHORT]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;4;0;4;SHORT;SHORT;N;37; ;N;
[USERID.KSDS.SINGLE1]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;0;0;4;SINGLE;FLOAT;N;37; ;N;
[USERID.KSDS.SINGLE2]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;15;10;15;ZONED;NUMERIC;N;37; ;N;
[USERID.KSDS.STRING12]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;0;0;4;SINGLE;FLOAT;N;37; ;N;
Col2=0;COL2;COL2;0;0;4000;CHAR;CHAR;N;37; ;N;
[USERID.KSDS.TIME]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;0;0;8;TIME;TIME;N;37; ;N;
[USERID.KSDS.TSTAMP]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;0;0;26;TIMESTAMP;TIME;N;37; ;N;
[USERID.KSDS.BOOL]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;5;0;2;SHORT;SHORT;N;37; ;N;
[USERID.KSDS.BYTE]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;0;0;8;BINARY;BINARY;N;37; ;N;
[USERID.KSDS.DECIMAL]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;18;3;18;ZONED;DECIMAL;N;37; ;N;
[USERID.KSDS.INT3]
UseForFileTransfer=0
DelimiterField=
DelimiterRecord=
TextQualifier=
FileCreationType=0
KeyPosition=0
KeyLength=0
KeySort=A
Col1=0;COL1;COL1;10;0;4;LONG;LONG;N;37; ;N;
Col2=0;COL2;COL2;10;0;4;LONG;LONG;N;37; ;N;
Find more details of OLE DB data types that result from the mapping of the host data types by the Microsoft OLE DB Provider for AS/400 and VSAM :