Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To unload decimal field in readable format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
p.anbuselvan

New User


Joined: 09 Jun 2008
Posts: 6
Location: India

PostPosted: Wed Nov 12, 2014 4:45 pm    Post subject: To unload decimal field in readable format
Reply with quote

Hi All,

My requirement to unload a table data in readable format. I have handles few datatypes. Problem with Decimal fields.

I tried with DIGITS. It is showing in readable but without decimal point.

If the value is 123.45, same should be populated while unloading.

Utility used : INZUTILB
Tried with DECIMAL EXTERNAL keyword -> Seems not supported.

Appreciate your help !
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1230
Location: Israel

PostPosted: Wed Nov 12, 2014 8:33 pm    Post subject:
Reply with quote

Hello and Welcome to the Forum.
You can try to select the column as CHAR(MY_COLUMN) or LPAD(MY_COLUMN,15)
(NB. LPAD returns a varchar)
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1720
Location: NY,USA

PostPosted: Wed Nov 12, 2014 11:13 pm    Post subject:
Reply with quote

Run DSNTEP2 which automatically expand all the columns to readable format. But the only problem with this is the LRECL is limited to 133 bytes. so the output will will span multiple lines
Back to top
View user's profile Send private message
p.anbuselvan

New User


Joined: 09 Jun 2008
Posts: 6
Location: India

PostPosted: Thu Nov 13, 2014 12:23 pm    Post subject:
Reply with quote

Thanks Marso.

CHAR(MY_COLUMN) works for me. icon_biggrin.gif
Back to top
View user's profile Send private message
p.anbuselvan

New User


Joined: 09 Jun 2008
Posts: 6
Location: India

PostPosted: Thu Nov 13, 2014 1:57 pm    Post subject:
Reply with quote

When I am using CHAR(MY_COLUMN), seems first byte is reserved for sign.

When the value is negative, it shows '-' whereas spaces for positive value.

Is there any way to get '+' populated for positive values?
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us