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
 

 

Supressing of Trailing Zeroes after Decimal Point

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
sathyajes

New User


Joined: 02 Mar 2006
Posts: 24
Location: Chennai

PostPosted: Tue Apr 07, 2009 10:22 am    Post subject: Supressing of Trailing Zeroes after Decimal Point
Reply with quote

Hi,

I am woring on PL/I.
I have a requirement to supress the trailing zeroes after the decimal Point.
But, I could able to supress only the leading Zeroes of fractional part and not in the Decimal Part.

Example : 0000125.9000
My desired result : 125.9

But, I could able to get only 125.9000

Please help me in the syntax.

Thanks,
Sathya.
Back to top
View user's profile Send private message

bauer

New User


Joined: 03 Mar 2009
Posts: 26
Location: germany

PostPosted: Wed Apr 08, 2009 11:59 am    Post subject:
Reply with quote

Try this:


Code:



TEST:
  PROC  OPTIONS(MAIN) REORDER  ;

  DCL Z DEC FIXED(11,4) AUTO INIT(123.45);

  PUT SKIP EDIT(TRIM(CHAR(Z),'0','0'))(A);

  END;

Back to top
View user's profile Send private message
sathyajes

New User


Joined: 02 Mar 2006
Posts: 24
Location: Chennai

PostPosted: Wed Apr 08, 2009 12:39 pm    Post subject: Reply to: Supressing of Trailing Zeroes after Decimal Point
Reply with quote

Hi Bauer,

It worked , thanks a lot for your timely reply.
It was driving us crazy...

With Regds,

Sathya.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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