What are Host Variables?
HOST variable is temporary variable, which is declared in working –storage section with data type length, equal to DB2 column data type length.
Below shows the COBOL vs DB2 declaration.
For more details please go through the below video.
HOST variable is temporary variable, which is declared in working –storage section with data type length, equal to DB2 column data type length.
Below shows the COBOL vs DB2 declaration.
- INT -> S9(9)COMP
- SMALL INT -> S9(4) COMP
- DECIMAL(M,N) -> S9(M)V9(N) COMPS
- CHAR(N) -> X(N)
- VARCHAR(N) -> S9(4) COMP X(N)
- DATE -> X(10) YYYY-MM-DD
- TIME -> X(8) HH:MM:SS
- TIMESTAMP -> X(26) YYYY-MM- DD:HH:MM:SS:NNNNNN
For more details please go through the below video.
ConversionConversion EmoticonEmoticon