IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issue while unloading records using DB2HPU1 utility.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Saini19

New User


Joined: 12 Apr 2012
Posts: 23
Location: Singapore

PostPosted: Wed Dec 16, 2015 3:30 pm
Reply with quote

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
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Dec 16, 2015 7:05 pm
Reply with quote

Why not ask the people who told you to do this? They might have some conversion guidelines that cover these situations and if they do not then they should be made aware of them as others may run into the same problems.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top