Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issue while unloading records using DB2HPU1 utility.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Issue while unloading records using DB2HPU1 utility.
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: 2365
Location: Hampshire, UK

PostPosted: Wed Dec 16, 2015 7:05 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem while trying to manipulate re... amitc23 DFSORT/ICETOOL 3 Tue Jun 30, 2020 1:19 pm
No new posts Need to select all records belonging ... Q5P418 DB2 2 Mon Jun 22, 2020 11:34 pm
No new posts How to filter out certain records bas... manugeorge2004 JCL & VSAM 5 Wed Jun 17, 2020 10:05 pm
No new posts Need to delete inactive records from ... Sanchayita Sinha DB2 5 Fri May 29, 2020 10:47 pm
No new posts Need SQL for two latest records havin... Q5P418 DB2 10 Sun May 10, 2020 8:24 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us