Saini19
New User
Joined: 12 Apr 2012 Posts: 23 Location: Singapore
|
|
|
|
Q1 : I am facing issue while unloading records using DB2HPU1 utility.
Currently the job is using BMCUNLD utility, but now have to convert my job to DB2HPU1 utility as per latest standards to unload records from table.
Please find below the select query being used in bmcunload which is currently running successfully in production.
Code: |
Select Col1,
Col-year,
Col-timestamp
Into
Col1 Char(10),
Col-year Decimal External (5,0)
Col-timestamp Char(26) IF NULL VALUE (‘ ‘)
From tablename |
The COBOL declaration of table is as follows:
Code: |
Col1 X(10)
Col-year S9(4)V USAGE COMP-3
Col-timestamp x(26)
DCLGEN of table is :
Col1 Char(10) Not Null,
Col-year Decimal (4,0) not Null,
Col-timestamp Timestamp
|
When I am trying to run the same query using DB2HPU1 utility, it is failing at 2 places.
1. It is failing at External(5,0) with below error:
• 234 * Data Lost * SYSREC* * Col2 * * 02012C
When I give EXTERNAL(6,0) , it is working fine. Looks like it is taking extra sign bit which is not required. How do I trim it so that it just takes (5,0)
2. It is failing for Col-timestamp with invalid syntax error.
Code'd, some |
|