sashi
New User
Joined: 14 Sep 2005 Posts: 54 Location: Chennai
|
|
|
|
Hi All,
I have one file with some data in it.
i need to store the data into one DB2 table.
Input file declared as following
10 DLR-SALES-BAL PIC S9(8)V9(2).
10 DLR-SERVICE-BAL PIC S9(8)V9(2).
10 CORP-SALES-BAL PIC S9(8)V9(2).
10 CORP-SERVICE-BAL PIC S9(8)V9(2).
Db2 table copybook layout
DB2 Table variables:
FCUO09_DLR_SLS_A DECIMAL(10, 2) NOT NULL,
FCUO09_DLR_SRV_A DECIMAL(10, 2) NOT NULL,
FCUO09_CORP_SLS_A DECIMAL(10, 2) NOT NULL,
FCUO09_CORP_SRV_A DECIMAL(10, 2) NOT NULL,
Host Lang variables
10 DLR-SLS-A PIC S9(8)V9(2) USAGE COMP-3.
10 DLR-SRV-A PIC S9(8)V9(2) USAGE COMP-3.
10 CORP-SLS-A PIC S9(8)V9(2) USAGE COMP-3.
10 CORP-SRV-A PIC S9(8)V9(2) USAGE COMP-3.
When am trying to MOVE the negative values to DB2 variables negative sign is missing.
can any one please explain why it is missing and how to get the -ve sign in the table records??
MOVE statement:
MOVE DLR-SALES-BAL TO DLR_SLS_A
MOVE DLR-SERVICE-BAL TO DLR_SRV_A
MOVE CORP-SALES-BAL TO CORP_SLS_A
MOVE CORP-SERVICE-BAL TO CORP_SRV_A
I used DISPLAY statement in to check the values
In SYSOUT it is showing as following.
INPUT FILE
0000000000
-000000242
0000000000
0000000000
COPY BOOK
0000000000
0000000242
0000000000
0000000000 |
|